DB2 7.2 restore generating system error 1326

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ScottH

    DB2 7.2 restore generating system error 1326

    I am running 7.2 with fixpack 10a under W2K. I got a backup from someone
    else in an attempt to debug a data issue. The other person created the
    database with UTF-8 (codepage 1208), so I created a new database with that
    codepage, cd to the directory where the backup was located, but the restore
    failed:

    db2 => create database MYDB using codeset UTF-8 territory us
    DB20000I The CREATE DATABASE command completed successfully.

    db2 => restore database twh_md to MYDB
    SQL2529W Warning! Restoring to an existing database that is different from
    the backup image database, and the alias name "MYDB" of the existing
    database does not match the alias name "TWH_MD" of the backup image, and the
    database name "MYDB" of the existing database does not match the database
    name "TWH_MD" of the backup image. The target database will be overwritten
    by the backup version.
    The Roll-forward recovery logs associated with the target database will be
    deleted.

    Do you want to continue ? (y/n) y

    SQL0902C A system error (reason code = "1326") occurred. Subsequent SQL
    statements cannot be processed. SQLSTATE=58005

    See db2diag.log below. It appears it wants to put it in G:, which is where
    the original database was. What gives here ? I would think db2 would know
    to put it wherever it created the new database MYDB. Any ideas what is
    going on here ?

    Thanks,
    Scott
    Error acquiring container 0 (g:\db2\node000 0\sql00002\sql0 000.0) for tbsp 0.
    Rc = FFFFB52E

    2003-11-13-15.21.34.731000 Instance:DB2 Node:000

    PID:1504(db2sys cs.exe) TID:3316 Appid:none

    buffer_pool_ser vices sqlbAddContaine rsToNewPool Probe:2

    DIA9999E An internal error occurred. Report the following error code :

    "0xFFFFB52E ".

    2003-11-13-15.21.34.761000 Instance:DB2 Node:000

    PID:1504(db2sys cs.exe) TID:3316 Appid:none

    database_utilit ies sqludProcessSPC S Probe:40

    DiagData

    2eb5 ffff 2e05 0000 .µÿÿ....



    2003-11-13-15.21.34.771000 Instance:DB2 Node:000

    PID:1504(db2sys cs.exe) TID:3316 Appid:none

    database_utilit ies sqludProcessSPC S Probe:40

    2eb5 ffff 2e05 0000 .µÿÿ....



    2003-11-13-15.21.34.791000 Instance:DB2 Node:000

    PID:1504(db2sys cs.exe) TID:3316 Appid:none

    database_utilit ies sqludCheckObjHe ader Probe:10

    DiagData

    1ef6 ffff 0000 0000 .öÿÿ....



    2003-11-13-15.21.34.801000 Instance:DB2 Node:000

    PID:1504(db2sys cs.exe) TID:3316 Appid:none

    database_utilit ies sqludCheckObjHe ader Probe:10

    1ef6 ffff 0000 0000 .öÿÿ....



    2003-11-13-15.21.34.951000 Instance:DB2 Node:000

    PID:1504(db2sys cs.exe) TID:3016 Appid:*LOCAL.DB 2.031113211649

    database_utilit ies sqludrsa Probe:0 Database:AKER_M D

    Restore terminated.



    The new database I ctreated is in sql00007, not sql00002.


  • Gert van der Kooij

    #2
    Re: DB2 7.2 restore generating system error 1326


    You need to use the INTO option instead of the TO option.
    [color=blue]
    >
    > db2 => restore database twh_md to MYDB[/color]

    restore database twh_md into MYDB



    Comment

    • ScottH

      #3
      Re: DB2 7.2 restore generating system error 1326

      Tried that, same error.

      "Gert van der Kooij" <gert@invalid.n l> wrote in message
      news:MPG.1a1e27 0223fd93a69896a 1@news.xs4all.n l...[color=blue]
      >
      > You need to use the INTO option instead of the TO option.
      >[color=green]
      > >
      > > db2 => restore database twh_md to MYDB[/color]
      >
      > restore database twh_md into MYDB
      >
      >
      >[/color]


      Comment

      • P. Saint-Jacques

        #4
        Re: DB2 7.2 restore generating system error 1326

        From the ? on the command line:
        G:\SQLLIB\BIN>d b2 ? restore db
        RESTORE DATABASE source-database-alias { restore-options | CONTINUE |
        ABORT }

        restore-options:
        [USER username [USING password]] [{TABLESPACE [ONLINE] |
        TABLESPACE (tblspace-name [ {,tblspace-name} ... ]) [ONLINE] |
        HISTORY FILE [ONLINE]}] [INCREMENTAL [AUTOMATIC | ABORT]]
        [{USE {TSM | XBSA} [OPEN num-sess SESSIONS] [OPTIONS {options-string |
        options-filename}] | FROM dir/dev [ {,dir/dev} ... ] | LOAD shared-lib
        [OPEN num-sess SESSIONS] [OPTIONS {options-string | options-filename}]}]
        [TAKEN AT date-time] [TO target-directory] [INTO target-database-alias]
        [NEWLOGPATH directory] [WITH num-buff BUFFERS] [BUFFER buffer-size]
        [DLREPORT file-name] [REPLACE EXISTING] [REDIRECT] [PARALLELISM n]
        [WITHOUT ROLLING FORWARD] [WITHOUT DATALINK] [WITHOUT PROMPTING]

        You probably need to specify:
        FROM source directory
        TO target path of the new created db
        INTO db alias you want to use
        .....
        REPLACE EXISTING


        Even then I'm not sure that this woulld work because of code page
        difference. Also, error 1326 means:
        SQL1326N The file or directory "<name>" cannot be accessed.

        Explanation:

        The file or directory "<name>" cannot be accessed because either
        the file permissions are incorrect, the file path is incorrect,
        or there is insufficient space in the directory or path.

        User Response:

        Verify that any path or filename specified in the command is
        valid, you have the proper permissions to access the path or
        filename, and there is sufficient space to contain the file.
        Correct the problem and resubmit the command. If the problem
        persists, contact your System Administrator.

        HTYH, Pierre.
        ScottH wrote:
        [color=blue]
        > Tried that, same error.
        >
        > "Gert van der Kooij" <gert@invalid.n l> wrote in message
        > news:MPG.1a1e27 0223fd93a69896a 1@news.xs4all.n l...
        >[color=green]
        >>You need to use the INTO option instead of the TO option.
        >>
        >>[color=darkred]
        >>>db2 => restore database twh_md to MYDB[/color]
        >>
        >>restore database twh_md into MYDB
        >>
        >>
        >>[/color]
        >
        >
        >[/color]

        --
        Pierre Saint-Jacques - Reply to: sesconsjunk at attglobaljunk dot com
        Reconstruct address: Remove the two junk and replace at and dot by
        their symbols.
        IBM DB2 Cerified Solutions Expert - Administration
        SES Consultants Inc.

        Comment

        • jane

          #5
          Re: DB2 7.2 restore generating system error 1326

          "P. Saint-Jacques" <p.stjacques@vi deotron.ca> wrote in message news:<3FB56EA3. 2000201@videotr on.ca>...[color=blue]
          > From the ? on the command line:
          > G:\SQLLIB\BIN>d b2 ? restore db
          > RESTORE DATABASE source-database-alias { restore-options | CONTINUE |
          > ABORT }
          >
          > restore-options:
          > [USER username [USING password]] [{TABLESPACE [ONLINE] |
          > TABLESPACE (tblspace-name [ {,tblspace-name} ... ]) [ONLINE] |
          > HISTORY FILE [ONLINE]}] [INCREMENTAL [AUTOMATIC | ABORT]]
          > [{USE {TSM | XBSA} [OPEN num-sess SESSIONS] [OPTIONS {options-string |
          > options-filename}] | FROM dir/dev [ {,dir/dev} ... ] | LOAD shared-lib
          > [OPEN num-sess SESSIONS] [OPTIONS {options-string | options-filename}]}]
          > [TAKEN AT date-time] [TO target-directory] [INTO target-database-alias]
          > [NEWLOGPATH directory] [WITH num-buff BUFFERS] [BUFFER buffer-size]
          > [DLREPORT file-name] [REPLACE EXISTING] [REDIRECT] [PARALLELISM n]
          > [WITHOUT ROLLING FORWARD] [WITHOUT DATALINK] [WITHOUT PROMPTING]
          >
          > You probably need to specify:
          > FROM source directory
          > TO target path of the new created db
          > INTO db alias you want to use
          > ....
          > REPLACE EXISTING
          >
          >
          > Even then I'm not sure that this woulld work because of code page
          > difference. Also, error 1326 means:
          > SQL1326N The file or directory "<name>" cannot be accessed.
          >
          > Explanation:
          >
          > The file or directory "<name>" cannot be accessed because either
          > the file permissions are incorrect, the file path is incorrect,
          > or there is insufficient space in the directory or path.
          >
          > User Response:
          >
          > Verify that any path or filename specified in the command is
          > valid, you have the proper permissions to access the path or
          > filename, and there is sufficient space to contain the file.
          > Correct the problem and resubmit the command. If the problem
          > persists, contact your System Administrator.
          >
          > HTYH, Pierre.
          > ScottH wrote:
          >[color=green]
          > > Tried that, same error.
          > >
          > > "Gert van der Kooij" <gert@invalid.n l> wrote in message
          > > news:MPG.1a1e27 0223fd93a69896a 1@news.xs4all.n l...
          > >[color=darkred]
          > >>You need to use the INTO option instead of the TO option.
          > >>
          > >>
          > >>>db2 => restore database twh_md to MYDB
          > >>
          > >>restore database twh_md into MYDB
          > >>
          > >>
          > >>[/color]
          > >
          > >
          > >[/color][/color]

          I think you need to do the redirect restore or create the same
          containers with the old one, then do the restore.

          Check the syntax in restore command for the redirect restore.

          Comment

          Working...