same machine
online backup include logs
from db2inst1 to db2inst2
db2 "restore db sample from '/test' on '/home/db2inst2' into sample LOGTARGET '/home/db2inst2/db2inst2/NODE0000/SQL00001/SQLOGDIR/' REDIRECT"
--db2 "set tablespace containers for 0 using (file '/home/db2inst2/db2inst2/NODE0000/SAMPLE/T0000000/C0000000.CAT' 20000)"
--db2 "set tablespace containers for 3 using (file '/home/db2inst2/db2inst2/NODE0000/SAMPLE/T0000003/C0000000.LRG' 20000)"
--db2 "set tablespace containers for 4 using (file '/home/db2inst2/db2inst2/NODE0000/SAMPLE/T0000004/C0000000.LRG' 20000)"
--db2 "set tablespace containers for 5 using (path '/home/db2inst2/db2inst2/NODE0000/SAMPLE/T0000005/')"
db2 "set tablespace containers for 6 using (file '/home/db2inst2/db2inst2/NODE0000/SAMPLE/TS1.CTN' 20000)"
db2 RESTORE DATABASE SAMPLE CONTINUE
db2 rollforward db sample to end of logs;
db2 rollforward db sample complete
分享到:
相关推荐
db2 RESTORE DATABASE dbname FROM backup_path TAKEN AT timestamp TO new_storage_path REDIRECT ``` 例如,如果你的数据库名为`NB_DATA`,备份文件位于`E:\db_databack_up`,并且你想将表空间重定向恢复到`E:\...
db2 "restore db gyzx from /home/db2inst1/dbbak taken at 20181005145914 to /home/db2inst1 intogyzx log target /home/db2inst1/log/ redirect generate script gyzx.ddl" ``` - **修改脚本内容**:根据实际...
db2 restore db db1_dwe from c:\dwe95 taken at 20071213133623 redirect generate script db1.clp ``` 其中,`db1_dwe`是要恢复的数据库名;`c:\dwe95`是指定的备份文件所在路径;`20071213133623`是备份时间戳;`...
db2 RESTORE DATABASE <original_database_name> ON <new_database_location> REDIRECT WITHOUT ROLLING FORWARD ``` 例如,将`testdb`恢复到`/new_location`的新位置: ```sql db2 "RESTORE DATABASE testdb ON /...
db2 RESTORE DATABASE flm FROM TAKEN AT 20080603115210 TO REDIRECT ``` - **步骤三**:使用`SET TABLESPACE CONTAINERS FOR`命令更新表空间容器的信息,将表空间指向新的物理位置。例如: ```sql db2 SET ...