Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Unable to restore online backup to another server

$
0
0
Hi everyone,

I'm a seasoned DBA working with MS SQL for almost 15 years, but in the last month I've become the maintainer of a DB2 LUW 9.5 system which is my first exposure to DB2.

Anyway I'm trying to restore an online backup created on one server to another, both DB2 LUW 9.5.3a, and I'm not able to do it.

The backup script on Server1 where the database resides is this:
Quote:

backup database TestDB1
online to g:\db2backup\TestDB1
compress
INCLUDE LOGS WITHOUT PROMPTING ;
And within this folder after the backup ran last night the backup image is this:
TestDB1.0.DB2TEST.NODE0000.CATN0000.20130409060036 .001

I then copied this image file from Server1 to C:\DB2_BU\ on Server2 then copied the logs for TestDB1 from Server1 to C:\DB2_Logs\ on Server2 and ran the following command:

Quote:

restore db TestDB1
from "C:\DB2_BU\"
taken at 20130409060036
TO "E:\TestDB1_Data"
into TestDB1
logtarget "E:\TestDB1_BULogs"
NEWLOGPATH "E:\TestDB1_Log"
REDIRECT;
And here are the results:

Quote:

restore db TestDB1 from "C:\DB2_BU\" taken at 20130409060036 TO "E:\TestDB1_Data" into TestDB1logtarget "E:\TestDB1_BULogs" NEWLOGPATH "E:\TestDB1_Log" REDIRECT
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.

A JDBC connection to the target has failed. Features such as Query Results, Access Plan and SQL Assist will be unavailable.
At this point I can't connect to the database. I assumed the logs saved within the image would be in E:\TestDB1_BULogs but this directory is empty. I also tried running these, but I get the error below:
rollforward db TestDB1to end of logs
rollforward db TestDB1to complete

Quote:

SQL1119N A connection to or activation of database "TestDB1" cannot be made
because a previous restore is incomplete or still in progress. SQLSTATE=57019

SQL1119N A connection to or activation of database "TestDB1 " cannot be made because a previous restore is incomplete or still in progress.

Explanation:

The database is in an inconsistent state because a system error occurred
during a restore function or a restore is still in progress.

No connection was made.
And db2diag has this showing-up every few minutes:

Quote:

2013-04-09-14.35.33.234000-300 I1249507H452 LEVEL: Warning
PID : 2804 TID : 4028 PROC : db2syscs.exe
INSTANCE: DB2 NODE : 000 DB : TestDB1
APPHDL : 0-3399 APPID: *LOCAL.DB2.130409193533
AUTHID : DB2ADMIN
EDUID : 4028 EDUNAME: db2agent (TestDB1) 0
FUNCTION: DB2 UDB, base sys utilities, sqleCheckForRestore, probe:10
RETCODE : ZRC=0xFFFFFBA1=-1119

2013-04-09-14.35.33.234000-300 I1249961H460 LEVEL: Warning
PID : 2804 TID : 4028 PROC : db2syscs.exe
INSTANCE: DB2 NODE : 000 DB : TestDB1
APPHDL : 0-3399 APPID: *LOCAL.DB2.130409193533
AUTHID : DB2ADMIN
EDUID : 4028 EDUNAME: db2agent (TestDB1) 0
FUNCTION: DB2 UDB, base sys utilities, sqlePrepareForSerialization, probe:20
RETCODE : ZRC=0xFFFFFBA1=-1119

2013-04-09-14.35.33.234000-300 I1250423H465 LEVEL: Severe
PID : 2804 TID : 4028 PROC : db2syscs.exe
INSTANCE: DB2 NODE : 000 DB : TestDB1
APPHDL : 0-3399 APPID: *LOCAL.DB2.130409193533
AUTHID : DB2ADMIN
EDUID : 4028 EDUNAME: db2agent (TestDB1) 0
FUNCTION: DB2 UDB, base sys utilities, sqeDBMgr::StartUsingLocalDatabase, probe:
10
RETCODE : ZRC=0xFFFFFBA1=-1119
Is the restore still running in the background? The database is large, but I'm not sure if it's still working or if I need to do something to import the other logs... or if it failed. Also the database is showing-up in Control Center, but I'm getting the error above there when I attempt to connect there as well. IBM's site just says this means either the DB is restoring or an error occured, but DB2Diag isn't showing much.

I also read that this can be ran to show the status of the restore if it's still going:

Quote:

db2 list utilities show detail
But it's just returning this:

Quote:

SQL1611W No data was returned by Database System Monitor. SQLSTATE=00000
Thanks for any advice.

Viewing all articles
Browse latest Browse all 13329

Trending Articles