我们在Windows Server 2008 R2上使用IBM DB2 10.1。
我尝试测试DB2的恢复计划。
CREATE DATABASE EAPOTEST AUTOMATIC STORAGE YES ALIAS EAPOBLOB
CREATE BUFFERPOOL "BufferPool32" IMMEDIATE ALL DBPARTITIONNUMS SIZE AUTOMATIC NUMBLOCKPAGES 0 PAGESIZE 32 K
CREATE REGULAR TABLESPACE "tablespace1"
IN DATABASE PARTITION GROUP "IBMDEFAULTGROUP"
PAGESIZE 32 K
MANAGED BY AUTOMATIC STORAGE
AUTORESIZE YES
EXTENTSIZE 16
PREFETCHSIZE 16
BUFFERPOOL "BufferPool32"
OVERHEAD 10.5
TRANSFERRATE 0.14
DATA TAG NONE
USING STOGROUP "IBMSTOGROUP"
FILE SYSTEM CACHING
CREATE TABLE "DB2ADMIN"."ARTIFACT_FILE1" (
"FILE_ID" DECIMAL(10 , 0) NOT NULL GENERATED BY DEFAULT AS IDENTITY (
START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 9999999999 NO CYCLE CACHE 20 NO ORDER ),"FILE_TYPE" VARCHAR(1) NOT NULL)
DATA CAPTURE NONE
IN "tablespace1"
COMPRESS NO
CREATE TABLE "DB2ADMIN"."EA_PACKAGE1" (
"DOSSIER_NUMBER" VARCHAR(50) NOT NULL
)
DATA CAPTURE NONE
IN "tablespace1"
COMPRESS NO
UPDATE DATABASE CONFIGURATION FOR EAPOTEST USING TRACKMOD YES
BACKUP DATABASE EAPOTEST TO %DB_PATH_BACKUP% COMPRESS EXCLUDE LOGS WITHOUT PROMPTING
BACKUP DATABASE EAPOTEST INCREMENTAL TO %DB_PATH_BACKUP% COMPRESS EXCLUDE LOGS WITHOUT PROMPTING
DROP DATABASE EAPOTEST
RESTORE DB EAPOTEST FROM "..." TAKEN AT ... REPLACE HISTORY FILE WITHOUT PROMPTING
RESTORE DATABASE EAPOTEST INCREMENTAL FROM "..." TAKEN AT ... WITHOUT PROMPTING
消息是:SQL2540WВосстановлениеуспешно,однакоприработеутилиты数据库“2539”。
Dtabese无法访问! 当我尝试连接时: SQL1119N SQLSTATE = 57019
这是一种可行的备份方法吗?我们采取的备份和恢复步骤是否足够?
答案 0 :(得分:0)
您的程序不正确。您的第一次恢复应该引用目标增量映像。
RESTORE DATABASE ... INCREMENTAL FROM "..." TAKEN AT <incremental backup timestamp>
RESTORE DATABASE ... INCREMENTAL FROM "..." TAKEN AT <full backup timestamp>
RESTORE DATABASE ... INCREMENTAL FROM "..." TAKEN AT <incremental backup timestamp>
详细解释了in the manual。