Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Posts
    39

    Unanswered: redirected restore problem

    I am trying to create a test DB (AIX 5.1 ,db2 V7.2) from the image copy of Production (AIX 4.3 ,db2 V7.2)

    I created the DB first with the same code page as production
    then executed the script as

    db2 -v "restore db db1 from '/backup' taken at 20040403220734 to /db2
    /db200001/dbnc3db into db1 redirect without rolling forward without prompting" >> $OUTFILE

    ia m getting the following error
    SQL2523W Warning! Restoring to an existing database that is different from the database on the backup image, but have matchi
    ng names. The[db200001@nc3dbaix#]ls -ltr target database will be overwritten by the backup version. The Roll-forward recovery logs associated with the t
    arget database will be deleted.
    Do you want to continue ? (y/n) y
    SQL0970N The system attempted to write to a read-only file. SQLSTATE=55009

    I checked the filesystem if the instance is not having permission ,everything seesm fine

    eg
    [db200001@nc3dbaix#]pwd
    /db2/db200001

    [db200001@nc3dbaix#]ls -ltr
    drwxrwxrwx 4 db200001 db2iadm1 512 May 28 06:48 dbnc3db
    also /db2 have same permission

    I noticed that the image copy is creating new instance directory under /db2
    eg
    /db2/ncadb01

    which is the structure of production DB

    Kindly help me in this regard,wld be appreciated

  2. #2
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by ashaq
    I am trying to create a test DB (AIX 5.1 ,db2 V7.2) from the image copy of Production (AIX 4.3 ,db2 V7.2)

    I created the DB first with the same code page as production
    then executed the script as

    db2 -v "restore db db1 from '/backup' taken at 20040403220734 to /db2
    /db200001/dbnc3db into db1 redirect without rolling forward without prompting" >> $OUTFILE

    ia m getting the following error
    SQL2523W Warning! Restoring to an existing database that is different from the database on the backup image, but have matchi
    ng names. The[db200001@nc3dbaix#]ls -ltr target database will be overwritten by the backup version. The Roll-forward recovery logs associated with the t
    arget database will be deleted.
    Do you want to continue ? (y/n) y
    SQL0970N The system attempted to write to a read-only file. SQLSTATE=55009

    I checked the filesystem if the instance is not having permission ,everything seesm fine

    eg
    [db200001@nc3dbaix#]pwd
    /db2/db200001

    [db200001@nc3dbaix#]ls -ltr
    drwxrwxrwx 4 db200001 db2iadm1 512 May 28 06:48 dbnc3db
    also /db2 have same permission

    I noticed that the image copy is creating new instance directory under /db2
    eg
    /db2/ncadb01

    which is the structure of production DB

    Kindly help me in this regard,wld be appreciated
    Your post is a bit confusing... but at any rate, if you'd like to see what file is causing the problem, set the DIAGLEVEL to 4 and monitor the db2diag.log

    That should give you a good start.
    --
    Jonathan Petruk
    DB2 Database Consultant

  3. #3
    Join Date
    Mar 2004
    Posts
    448
    if the database already not exists then the restore command will create one implicitly but according to new db directory path that is available.
    so try to restore the database without first creating it with a different name.

    regards,

    mujeeb

  4. #4
    Join Date
    Mar 2004
    Posts
    448
    adding to that in that case you have two databases (one is production) and the other with the new name is that what you want to do.

    db2 changes some file permission when they are in use one is db2nodes.cfg
    file. I don't know much about the other files.so check that one too.

    regards,

    mujeeb

Posting Permissions

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