If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > SQL2523W and SQL2001N errors --Restoring database from a backup

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-27-05, 17:24
raj125 raj125 is offline
Registered User
 
Join Date: Nov 2005
Posts: 6
SQL2523W and SQL2001N errors --Restoring database from a backup

Hi All,
I am trying to restore a DB2 7.2.3 database from a backup. I believe backup was done on a windows 2003/2000(I didnt do the backup). I am trying to restore it on my windows XP professional machine.
I have DB2 7.1 with fixpacks 3 and 5 applied making it 7.2.3.
I tried restoring the backup by itself and i got a "The database alias parameter is not valid or not specified " error.
I googled the error and found some advice about need to create a database and then restoring the backup over it.
i didnt get the directory structure right and i got this error.
The error SQL2542N means No match for a database image file was found based
on the source database alias and timestamp provided.
I found some advice on this forum which asked me to just point to the root of the drive in my case (g:\).
I did that and used this command "restore database testdev from G:\ into testdev". I got this error.

SQL2523W Warning! Restoring to an existing database that is different from the database on the backup image, but have matching names. The target database will be overwritten by the backup version. The Roll-forward recovery logs associated with the target database will be deleted.

SQL2001N The utility was interrupted. The output data may be incomplete.

I don't know what else to do . Also i would like to add that the guy who did the backup, backed up the database on my portable hard drive and i am using the same drive connected by USB to my XP pro machine.

PLease help !!!!!!!

ps : UPDATE .....
I tried this command

restore database testdev from g:\ to e:\ into testdev without prompting

-----------------------------------------------------------------------------
SQL2540W Restore is successful, however a warning "2523" was encountered

during Database Restore while processing in No Interrupt mode.

I don't see any of the application tables either.

Last edited by raj125; 11-27-05 at 17:59. Reason: update
Reply With Quote
  #2 (permalink)  
Old 11-27-05, 17:49
wangzhonnew wangzhonnew is offline
Registered User
 
Join Date: Nov 2005
Location: Toronto
Posts: 65
can you use another backup image and try again?
__________________
IBM Certified DBA for DB2 UDB
IBM Certified Database Developer for DB2 UDB
DB2 Tech Support, IBM Toronto Software Lab
Reply With Quote
  #3 (permalink)  
Old 11-27-05, 18:09
raj125 raj125 is offline
Registered User
 
Join Date: Nov 2005
Posts: 6
trying again but i dont have another image

Hi ,
I will try as you have advised me but i don't have access to the original db server. I only have access to this one particular image that my coworker made back in september.

Do you think it could be a problem with this particular image ?

Raj
Reply With Quote
  #4 (permalink)  
Old 11-27-05, 18:10
raj125 raj125 is offline
Registered User
 
Join Date: Nov 2005
Posts: 6
there are currently database objectrs locked or in use..

I tried running the command but it came up with this error.

SQL1035N The database is currently in use. SQLSTATE=57019

raj
Reply With Quote
  #5 (permalink)  
Old 11-28-05, 03:46
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
restore

place the file in a directory like
c:\BACKUP\DB2NT.0\DB2\NODE0000\CATN0000\20051120
change values :
where DB2NT = databasename
DB2 = instance name
20051120 : date of backup
create all in command window in uppercase ( do not use explorer)
then
db2 connect reset
restore .... from c:\BACKUP at 20051120.....
take care that all container paths exist, otherwise redirect is needed
and rollforward if needed
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #6 (permalink)  
Old 11-28-05, 14:34
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
You can check the integrity of the image by using

db2ckbkp -a <file_name> the file that is at the end of the directory structure.


regards,

mujeeb
Reply With Quote
  #7 (permalink)  
Old 11-29-05, 20:59
raj125 raj125 is offline
Registered User
 
Join Date: Nov 2005
Posts: 6
Backup restore working

Hello All,
Thank you all for helping me out with your suggestions.. I truly appreciate your advice as it came at a critical time for me..
I look forward to reading through this forum and gleaning all the pearls of DB2 wisdom from you guys..
My result was that I rebooted my machine and went to my control center and looked at the tables for the particular database in the right pane and lo behold ! they were all there !!!

I did a db2ckbkp on the backup and it came out ok.

Raj
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On