By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,817 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

DB2 7.2 restore generating system error 1326

P: n/a
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\node0000\sql00002\sql0000.0) for tbsp 0.
Rc = FFFFB52E

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

PID:1504(db2syscs.exe) TID:3316 Appid:none

buffer_pool_services sqlbAddContainersToNewPool 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(db2syscs.exe) TID:3316 Appid:none

database_utilities sqludProcessSPCS Probe:40

DiagData

2eb5 ffff 2e05 0000 .....

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

PID:1504(db2syscs.exe) TID:3316 Appid:none

database_utilities sqludProcessSPCS Probe:40

2eb5 ffff 2e05 0000 .....

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

PID:1504(db2syscs.exe) TID:3316 Appid:none

database_utilities sqludCheckObjHeader Probe:10

DiagData

1ef6 ffff 0000 0000 .....

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

PID:1504(db2syscs.exe) TID:3316 Appid:none

database_utilities sqludCheckObjHeader Probe:10

1ef6 ffff 0000 0000 .....

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

PID:1504(db2syscs.exe) TID:3016 Appid:*LOCAL.DB2.031113211649

database_utilities sqludrsa Probe:0 Database:AKER_MD

Restore terminated.

The new database I ctreated is in sql00007, not sql00002.
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

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

Nov 12 '05 #2

P: n/a
Tried that, same error.

"Gert van der Kooij" <ge**@invalid.nl> wrote in message
news:MP************************@news.xs4all.nl...

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

Nov 12 '05 #3

P: n/a
From the ? on the command line:
G:\SQLLIB\BIN>db2 ? 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:
Tried that, same error.

"Gert van der Kooij" <ge**@invalid.nl> wrote in message
news:MP************************@news.xs4all.nl...
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



--
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.

Nov 12 '05 #4

P: n/a
"P. Saint-Jacques" <p.*********@videotron.ca> wrote in message news:<3F**************@videotron.ca>...
From the ? on the command line:
G:\SQLLIB\BIN>db2 ? 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:
Tried that, same error.

"Gert van der Kooij" <ge**@invalid.nl> wrote in message
news:MP************************@news.xs4all.nl...
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



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.
Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.