Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2003
    Posts
    3

    Unanswered: move db2 database to another machine fail??

    Two AIX server,Machine A OS is aix 5L ML3, Machine B OS is AIX 4.3.3.
    DB2 7.2 FP7. each machine have one db2 instance:db2adm

    I backup the database on machine A offline to a directory /backupdata
    user db2adm.execute these cmd:
    db2 force application all
    db2stop
    db2start
    db2 backup db xxxx to /backupdata with 4 buffers buffer 1024

    on machine B,create a /backupdata directory ftp get the image file
    db2 restore db xxxx from /backupdata taken at xxxxxxx

    error
    SQL0970N The system attempted to write to a read-only file. SQLSTATE=55009

    But I create a empty database on machine B, backup and restore on local machine,It's ok.

    what should I do ? please help!!!

  2. #2
    Join Date
    Sep 2002
    Posts
    456
    Well, on machine B either you create a new database and restore the image on that or you have the option with the restore command to create the database if it does not exist. Bottom line you can not just restore an image if database is not already at the target server.

    dollar

  3. #3
    Join Date
    Jul 2003
    Posts
    3

    still the same

    I have tried create a new empty database on B, but it fails also.

    error:


    db2 restore db LCA510 from /backupdata taken at 20030722095140
    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.
    Do you want to continue ? (y/n) y
    SQL0970N The system attempted to write to a read-only file. SQLSTATE=55009

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: still the same

    Check your sqllib/db2dump/db2diag.log file ... This file may have more information .....

    Where are the tablespace containers on the soruce database ... I assume on the target machine B, the same filesystems exist, in which case you should ensure that the instance owner has write permissions to the filesystems/directories

    HTH

    Sathyaram

    Originally posted by lipi
    I have tried create a new empty database on B, but it fails also.

    error:


    db2 restore db LCA510 from /backupdata taken at 20030722095140
    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.
    Do you want to continue ? (y/n) y
    SQL0970N The system attempted to write to a read-only file. SQLSTATE=55009
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Jul 2003
    Posts
    3

    Thanks. It's ok.

    I have resolve the problem. You are right. In machine B
    I create the new empty database on another filesystem.although the user db2adm has write permission.
    so I create the same filesystem and directory tree on machine B as machine A, The restore is Ok.

Posting Permissions

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