Results 1 to 2 of 2

Thread: db2 SQL0294N

  1. #1
    Join Date
    Nov 2007
    Posts
    72

    Unanswered: 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.

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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.

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •