文章主要向大家描述的是DB2数据库复原的正确操作,此文章主要是描述其操作代码来引出DB2数据库复原的正确操作步骤,以下就是文章的主要内容的详细描述,望大家在浏览之后会对其有更深的了解。
数据库数据库
DB2数据库复原支持的文件类型主要有三种:裸设备、path路径、文件类型
一个表空间的大小不能超过64G.每个页大小为4K.
有时候需要将数据库架构放到数据库的安装目录,而数据库容器可以指定到其他地方。
昨天还原的原始命令为:
- RESTORE DATABASE T_CENTER FROM "E:\T_CENTER" TAKEN AT 20091231124541 TO "C:" INTO T_CENTER WITH 2 BUFFERS BUFFER 1024 REDIRECT
PARALLELISM 1 WITHOUT PROMPTING;
- SET TABLESPACE CONTAINERS FOR 0 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00003");
- SET TABLESPACE CONTAINERS FOR 1 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00004\SQLT0001.0");
- SET TABLESPACE CONTAINERS FOR 2 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00003");
- SET TABLESPACE CONTAINERS FOR 3 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "C:\DB2\NODE0000\SQL00003\TSASNCA03" 512000,
FILE "C:\DB2\NODE0000\SQL00003\TSASNCA01" 512000);
- SET TABLESPACE CONTAINERS FOR 4 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "C:\DB2\NODE0000\SQL00003\TSASNUOW" 5888);
- SET TABLESPACE CONTAINERS FOR 5 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "D:\DBFILES\TSETC.01");
- SET TABLESPACE CONTAINERS FOR 6 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "C:\DB2\NODE0000\SQL00003\CDA35_SYSTEMPARA" 512);
- SET TABLESPACE CONTAINERS FOR 7 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00003");
- SET TABLESPACE CONTAINERS FOR 8 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00003");
- SET TABLESPACE CONTAINERS FOR 9 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "C:\DB2\NODE0000\SQL00003\TSASNCA_LZJ"
768000,FILE "C:\DB2\NODE0000\SQL00003\TSASNCA01_LZJ" 512000,FILE "C:\DB2\NODE0000\SQL00003\TSASNCA02_LZJ" 512000);
- RESTORE DATABASE T_CENTER CONTINUE;
经过快通公司管伟的帮忙,将程序调整为:
- RESTORE DATABASE T_CENTER FROM "E:\T_CENTER" TAKEN AT 20091231124541 TO "C:"
- INTO T_CENTER WITH 2 BUFFERS BUFFER 1024 REDIRECT PARALLELISM 1 WITHOUT PROMPTING;
- SET TABLESPACE CONTAINERS FOR 0 USING (PATH "D:\T_CENTER\tablespace\0");
- SET TABLESPACE CONTAINERS FOR 1 USING (PATH "D:\T_CENTER\tablespace\1");
- SET TABLESPACE CONTAINERS FOR 2 USING (PATH "D:\T_CENTER\tablespace\2");
- SET TABLESPACE CONTAINERS FOR 3 USING (FILE "D:\T_CENTER\TSASNCA03" 16500000);
- SET TABLESPACE CONTAINERS FOR 4 USING (FILE "D:\T_CENTER\TSASNUOW" 5888);
- SET TABLESPACE CONTAINERS FOR 5 USING (PATH "D:\T_CENTER\tablespace\5");
- SET TABLESPACE CONTAINERS FOR 6 USING (FILE "D:\T_CENTER\CDA35_SYSTEMPARA" 512);
- SET TABLESPACE CONTAINERS FOR 7 USING (PATH "D:\T_CENTER\tablespace\7");
- SET TABLESPACE CONTAINERS FOR 8 USING (PATH "D:\T_CENTER\tablespace\8");
- SET TABLESPACE CONTAINERS FOR 9 USING (FILE "D:\T_CENTER\TSASNCA_LZJ" 1788000);
- RESTORE DATABASE T_CENTER CONTINUE;
其中主要调整的地方一是容器路径,另外一个是页面的大小。
以上的相关内容就是对DB2数据库复原的介绍,望你能有所收获。
【编辑推荐】
- DB2 -964问题的歼灭很简单!
- 失败DB2® access 服务器配置的正确恢复流程
- DB2数据库备份参数修改后报错如何拯救?
- 手动安装DB2数据库的实现在UNIX操作环境下
- 揭秘DB2 9数据库需要的内存与磁盘条件!