Erro SQL1005N durante RESTORE no DB2

Tive esse problema abaixo durante um RESTORE no DB2.
Acredito que o problema seja porque esta é uma máquina clonada, onde todos filesystems foram copiados, exceto os de dados.
Dessa forma, o catalogo do DB2 também não foi, e o Banco QAS existia mas não existia, e foi necessário utilizar o comando UNCATALOG. Foi utilizado o comando ROLLFORWARD STOP após o RESTORE pois tratava-se de um Backup OFFLINE.

db2 => RESTORE DATABASE QAS USE TSM OPEN 3 SESSIONS
SQL1005N  The database alias "QAS" already exists in either the local database
directory or system database directory.  SQLSTATE=00000
db2 => CREATE DATABASE QAS
SQL1005N  The database alias "QAS" already exists in either the local database
directory or system database directory.
db2 => DROP DATABASE QAS
SQL1031N  The database directory cannot be found on the indicated file system.
SQLSTATE=58031
db2 => quit
DB20000I  The QUIT command completed successfully.
MeuServidorQAS:db2qas 14> db2 UNCATALOG DATABASE QAS
DB20000I  The UNCATALOG DATABASE command completed successfully.
MeuServidorQAS:db2qas 16> db2 RESTORE DATABASE QAS USE TSM OPEN 3 SESSIONS
DB20000I  The RESTORE DATABASE command completed successfully.
MeuServidorQAS:db2qas 18> db2 ROLLFORWARD DATABASE QAS STOP
Rollforward Status
Input database alias                   = QAS
 Number of nodes have returned status   = 1
Node number                            = 0
 Rollforward status                     = not pending
 Next log file to be read               =
 Log files processed                    =  -
 Last committed transaction             = 2010-11-21-10.09.12.000000 UTC
DB20000I  The ROLLFORWARD command completed successfully.
MeuServidorQAS:db2qas 19> db2
(c) Copyright IBM Corporation 1993,2002
Command Line Processor for DB2 ADCL 9.1.6
You can issue database manager commands and SQL statements from the command
prompt. For example:
db2 => connect to sample
db2 => bind sample.bnd
For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
? CATALOG DATABASE for help on the CATALOG DATABASE command
? CATALOG          for help on all of the CATALOG commands.
To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.
For more detailed help, refer to the Online Reference Manual.
db2 => CONNECT TO QAS
Database Connection Information
Database server        = DB2/AIX64 9.1.6
SQL authorization ID   = DB2QAS
Local database alias   = QAS
db2 => SELECT TABNAME FROM SYSCAT.INDEXES WHERE INDNAME IN (SELECT INDNAME FROM SYSCAT.INDEXCOLUSE WHERE COLNAME = 'BANKN')
TABNAME
--------------------------------------------------------------------------------------------------------------------------------
DFK006B
DFK006E
FKKBRINSEQ
BUT0BK
JGTBKEZ
JGTBKVW
JGTBKVW
JJTBS
KNBK
KNBK
LFBK
LFBK
FMLGD_H_VG_05_02
PSO31
PSO32
KNEA
SPBB1
T042R
TIBAN
TIBAN_APAR
TFK006X
TFK006XS
TFK006XT
TINV_INV_BANK
24 record(s) selected.
db2 =>

Leave a Reply

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Esse site utiliza o Akismet para reduzir spam. Aprenda como seus dados de comentários são processados.