Topic
  • 4 replies
  • Latest Post - ‏2012-11-23T10:43:55Z by SystemAdmin
SystemAdmin
SystemAdmin
5837 Posts

Pinned topic database fails to connect after catalog

‏2012-11-21T10:39:01Z |
I created an instance called KALI and then copied the sample database "sample" folder from the
dafault DB2 instance directory "C:\DB2\NODE0000" to my new instance "C:\KALI\NODE0000" directory
and the run "catalog database sample as mysample", the command executes succesfully
but when I try to connect, I get the database alias name cannot be found, but it is listed in the
databasse directory
I am using windows 7 db2 express-c 9.7
Updated on 2012-11-23T10:43:55Z at 2012-11-23T10:43:55Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: database fails to connect after catalog

    ‏2012-11-21T12:05:10Z  
    Hello,

    The command "catalog database" creates instructs the DB2 client about an existing database on the server side, by updating the "system catalog directory".

    But on the server side, the "local database directory" lists the database known and managed by the server.

    When you copy the database directory, the server is not aware about the database being duplicated.

    Hope it is clear...
    Yves-Antoine Emmanuelli
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: database fails to connect after catalog

    ‏2012-11-22T11:35:04Z  
    Hello,

    The command "catalog database" creates instructs the DB2 client about an existing database on the server side, by updating the "system catalog directory".

    But on the server side, the "local database directory" lists the database known and managed by the server.

    When you copy the database directory, the server is not aware about the database being duplicated.

    Hope it is clear...
    Yves-Antoine Emmanuelli
    Hello agian

    thanks 4 the quick reply, what I want to do is copy a database from
    one machine(server) to anther and from an instance to another in the same
    machine
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: database fails to connect after catalog

    ‏2012-11-22T12:12:47Z  
    Hello agian

    thanks 4 the quick reply, what I want to do is copy a database from
    one machine(server) to anther and from an instance to another in the same
    machine
    Hello,

    One way to duplicate a database is to backup the database on the original instance, and restore it on the other instance.

    For the new instance owner to be able to manage the new copy, you might want to :
    db2set DB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ON

    http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.regvars.doc/doc/r0005658.html

    Regards
    Yves-Antoine Emmanuelli
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: database fails to connect after catalog

    ‏2012-11-23T10:43:55Z  
    Thanks