用脚本创建和恢复 DB2数据库

时间:2025-01-13 11:07:51
CREATE DATABASE  AUTOMATIC STORAGE YES  ON 'C:\' DBPATH ON 'C:\' USING CODESET GBK TERRITORY CN COLLATE USING SYSTEM PAGESIZE 4096;

CREATE DATABASE TRANSDB AUTOMATIC STORAGE YES  ON 'D:\' DBPATH ON 'D:\' USING CODESET UTF-8 TERRITORY CN COLLATE USING SYSTEM PAGESIZE 4096;

--从备份文件恢复数据库
RESTORE DATABASE DMSCNDB FROM F:\\ TAKEN AT TO G: INTO DJS009 WITH BUFFERS BUFFER WITHOUT ROLLING FORWARD WITHOUT PROMPTING; RESTORE DATABASE TRANSDB FROM D:\\DB2Backup\\ TAKEN AT TO D: INTO TRANSDB WITH BUFFERS BUFFER WITHOUT ROLLING FORWARD WITHOUT PROMPTING; RESTORE DATABASE TRANSDB FROM "D:\DB2Backup\" TAKEN AT 20160517162430 TO D: INTO TRANSDB WITH 2 BUFFERS BUFFER 1024 WITHOUT ROLLING FORWARD WITHOUT PROMPTING;