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 > db2 SQL0294N

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-14-07, 02:57
oracle10gsingh oracle10gsingh is offline
Registered User
 
Join Date: Nov 2007
Posts: 72
db2 SQL0294N

Hi All,
i had taken up the backup of sap database which runs on db2 now when i am restoring it to a new database i am facing few issues.kindly help me with them

1.since source database and target database will be on the same machine will it use it log files of source database or of the target database,or the path defined in path to log files db parameter.

2.when i am restoring it gives me a error SQL0294N to untag the containers ..now the containers in reference here are of the source database or the target database ? since i am creating a database while restoring only .its shouldnt give me such a error so does it mean its accessing the source database or within a backup image containers need to be untag ?
i am restoring via backup image db2 command --restore db bad taken at TIMESTAMP into BADTEST without prompting .

wherre BAD is the name of the database being backed up and BADTEST is the name of new database to be created during restoration time .

Please Reply ASAP
Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 11-14-07, 08:16
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Quote:
Originally Posted by oracle10gsingh
Hi All,
i had taken up the backup of sap database which runs on db2 now when i am restoring it to a new database i am facing few issues.kindly help me with them

1.since source database and target database will be on the same machine will it use it log files of source database or of the target database,or the path defined in path to log files db parameter.
No, it won't. But you have to do a redirected restore.

Quote:
2.when i am restoring it gives me a error SQL0294N to untag the containers ..now the containers in reference here are of the source database or the target database ? since i am creating a database while restoring only .its shouldnt give me such a error so does it mean its accessing the source database or within a backup image containers need to be untag ?
Tagging or untagging is not the issue. The problem is that a container is already in use - as SQL0294 says. When you back up a database, the backup image contains the absolute path to the various containers of the tablespaces. During RESTORE, DB2 tries to place the containers into the exact same location. But since the original database still exist (and you probably didn't restore into the existing database), DB2 cannot create files with the same name for the new (restored) database. So you get the error.

What you have to do is to specify different locations for the containers of the restored database. For that, you have to apply a restored with the REDIRECT option. You start the restore with this option, the restore stops in the middle, you specify new locations for the containers, then you continue the restore and the containers will be created in the new locations. Thus, you won't get any collisions with containers from other databases.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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