DB2V8.2資料恢復到v9.5 ONAIX
db2 => connect to bpfdb
Database Connection Information
Database server = DB2/AIX64 9.5.7
SQL authorization ID = DB2INST1
Local database alias = BPFDB
db2 => select * from sysibm.sysversions
VERSIONNUMBER VERSION_TIMESTAMP AUTHID
------------- -------------------------- -------------------
9050700 2011-02-24-08.51.05.354359 DB2INST1
1 record(s) selected.
bash-3.2$ db2set -all
[i] DB2_HASH_JOIN=Y
[i] DB2COMM=tcpip
[g] DB2FCMCOMM=TCPIP4
[g] DB2SYSTEM=test2
[g] DB2INSTDEF=db2inst1
[g] DB2ADMINSERVER=dasusr1
bash-3.2$ db2 list database directory
System Database Directory
Number of entries in the directory = 2
Database 1 entry:
Database alias = BPFDB
Database name = BPFDB
Local database directory = /db2/bpfdb
Database release level = c.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 2 entry:
Database alias = SAMPLE
Database name = SAMPLE
Local database directory = /home/db2inst1
Database release level = c.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
bash-3.2$ db2 force applications all
DB20000I The FORCE APPLICATION command completed successfully.
DB21024I This command is asynchronous and may not be effective immediately.
bash-3.2$ db2 list tablespaces
SQL1024N A database connection does not exist. SQLSTATE=08003
bash-3.2$ db2 connect to bpfdb
db2 list tablespaces
SQL1119N A connection to or activation of database "BPFDB" cannot be made
because a previous restore is incomplete or still in progress. SQLSTATE=57019
bash-3.2$ db2 restore database BPFDB from /db2/back/ taken at 20110221030637 to /db2/bpfdb with 3 buffers buffer 1024 replace existing redirect WITHOUT ROLLING FORWARD
SQL2523W Warning! Restoring to an existing database that is different from
the database on the backup image, but have matching names. The target database
will be overwritten by the backup version. The Roll-forward recovery logs
associated with the target database will be deleted.
SQL1277W A redirected restore operation is being performed. Table space
configuration can now be viewed and table spaces that do not use automatic
storage can have their containers reconfigured.
DB20000I The RESTORE DATABASE command completed successfully.
bash-3.2$ db2 list tablespaces
Tablespaces for Current Database
Tablespace ID = 0
Name = SYSCATSPACE
Type = System managed space
Contents = All permanent data. Regular table space.
State = 0x2001100
Detailed explanation:
Restore pending
Storage must be defined
Storage may be defined
Tablespace ID = 1
Name = TEMPSPACE1
Type = System managed space
Contents = System Temporary data
State = 0x2001100
Detailed explanation:
Restore pending
Storage must be defined
Storage may be defined
Tablespace ID = 2
Name = USERSPACE1
Type = System managed space
Contents = All permanent data. Regular table space.
State = 0x2001100
Detailed explanation:
Restore pending
Storage must be defined
Storage may be defined
Tablespace ID = 3
Name = UTMTP32
Type = System managed space
Contents = User Temporary data
State = 0x2001100
Detailed explanation:
Restore pending
Storage must be defined
Storage may be defined
Tablespace ID = 4
Name = SYSTOOLSPACE
Type = System managed space
Contents = All permanent data. Regular table space.
State = 0x2001100
Detailed explanation:
Restore pending
Storage must be defined
Storage may be defined
Tablespace ID = 5
Name = QCTEMPTSbash-3.2$ pwd
/db2/bpfdb
bash-3.2$ mkdir 0
bash-3.2$ db2 "set tablespace containers for 0 using (path '/db2/bpfdb/0')"
DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
bash-3.2$ db2 "set tablespace containers for 1 using (path '/db2/bpfdb/1')"
SQL0299N Container is already assigned to the table space. SQLSTATE=42731
bash-3.2$ db2 "set tablespace containers for 2 using (path '/db2/bpfdb/2')"
db2 "set tablespace containers for 3 using (path '/db2/bpfdb/3')"
db2 "set tablespace containers for 4 using (path '/db2/bpfdb/4')"
db2 "set tablespace containers for 5 using (path '/db2/bpfdb/5')"
SQL0299N Container is already assigned to the table space. SQLSTATE=42731
bash-3.2$ db2 "set tablespace containers for 3 using (path '/db2/bpfdb/3')"
SQL0299N Container is already assigned to the table space. SQLSTATE=42731
bash-3.2$ db2 "set tablespace containers for 4 using (path '/db2/bpfdb/4')"
SQL0299N Container is already assigned to the table space. SQLSTATE=42731
bash-3.2$ db2 "set tablespace containers for 5 using (path '/db2/bpfdb/5')"
SQL0299N Container is already assigned to the table space. SQLSTATE=42731
bash-3.2$
Type = System managed space
Contents = User Temporary data
State = 0x2001100
Detailed explanation:
Restore pending
Storage must be defined
Storage may be defined
bash-3.2$ db2 restore database bpfdb continue
SQL2519N The database was restored but the restored database was not migrated
to the current release. Error "-1006" with tokens " 3 j
" is returned.
bash-3.2$ db2 migrate db bpfdb
SQL1006N The code page "648535941224547762I" of the application does not
match the code page "648535941224547765I" of the database.
bash-3.2$ db2set db2codepage=1386
bash-3.2$ db2 terminate
DB20000I The TERMINATE command completed successfully.
bash-3.2$ db2 migrate db bpfdb
DB20000I The MIGRATE DATABASE command completed successfully.
bash-3.2$ db2 connect to bpfdb
Database Connection Information
Database server = DB2/AIX64 9.5.7
SQL authorization ID = DB2INST1
Local database alias = BPFDB
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/11134849/viewspace-688005/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 恢復資料,資料塊恢復
- Bak檔案恢復到資料庫資料庫
- 資料恢復:AMDU資料抽取恢復資料恢復
- RAC資料庫恢復到單例項資料庫資料庫單例
- 【資料庫資料恢復】SAP資料庫資料恢復案例資料庫資料恢復
- 【資料庫資料恢復】透過恢復NDF檔案修復資料庫的資料恢復過程資料庫資料恢復
- Oracle 11g資料庫恢復:場景11:資料檔案損壞,不能恢復到原來的位置, 恢復到新的路徑Oracle資料庫
- 【資料庫資料恢復】Sql Server資料庫資料恢復案例資料庫資料恢復SQLServer
- 資料庫修復資料恢復資料庫資料恢復
- 【Vsan資料恢復】Vsan資料恢復案例資料恢復
- Vsan資料恢復—Vsan資料恢復案例資料恢復
- NAS陣列恢復資料資料恢復開盤陣列資料恢復
- 記一次刪庫到資料恢復資料恢復
- 恢復RAC資料庫到單例項(ASM)資料庫單例ASM
- Sybase ASE資料庫恢復,Sybase資料恢復,資料誤刪除恢復工具READSYBDEVICE資料庫資料恢復dev
- 寶塔資料庫恢復 mysql資料庫丟失恢復 mysql資料庫刪除庫恢復 寶塔mysql資料庫恢復資料庫MySql
- 伺服器資料恢復—透過拼接資料庫碎片恢復SqlServer資料庫資料的資料恢復案例伺服器資料恢復資料庫SQLServer
- 伺服器資料恢復-ESX SERVER資料恢復案例伺服器資料恢復Server
- 【伺服器資料恢復】Vsan資料恢復案例伺服器資料恢復
- 【伺服器資料恢復】SUN SOLARIS資料恢復案例伺服器資料恢復
- 使用恢復建議恢復資料庫資料庫
- 【備份恢復】資料恢復指導資料恢復
- 【資料庫資料恢復】如何恢復Oracle資料庫truncate表的資料資料庫資料恢復Oracle
- 【資料庫資料恢復】windows server下SqlServer資料庫的資料恢復資料庫資料恢復WindowsServerSQL
- TRUNCATE資料恢復資料恢復
- ORACLE資料恢復Oracle資料恢復
- 恢復資料庫資料庫
- mysql資料恢復MySql資料恢復
- 硬碟資料恢復硬碟資料恢復
- MAC資料恢復Mac資料恢復
- SQL Server資料庫恢復,SQL Server資料恢復,SQL Server資料誤刪除恢復工具SQLRescueSQLServer資料庫資料恢復
- PE裝到行動硬碟的資料恢復方案硬碟資料恢復
- 北亞企安資料恢復-XSAN資料恢復案例資料恢復
- 【北亞資料恢復】硬碟壞道故障如何恢復資料?資料恢復硬碟
- 【VSAN資料恢復】VSAN儲存資料恢復案例資料恢復
- 儲存崩潰資料恢復過程;資料恢復案例資料恢復
- EMC 儲存資料恢復案例詳解【資料恢復方案】資料恢復
- 【資料庫資料恢復】Oracle資料庫誤truncate table的資料恢復案例資料庫資料恢復Oracle