Results 1 to 6 of 6
  1. #1
    Join Date
    May 2003
    Posts
    57

    Unanswered: Why anybody neads command "catalog db" ?

    Hello all!

    I have a question about cataloging db.
    I know that cataloging db writes informations about db in system db directory. That is done by default when I create db.

    db2 create db FIRST on /home/mydir ---> succesfully

    db2 list db directory
    I can see that db FIRST is placed on /home/mydir


    I tried to unacatalog db sample and catalog it to different directory to see its effect (to see why I need cataloging db)

    db2 uncatalog db FIRST
    db2 list db directory ----> there is no FIRST
    db2 catalog db FIRST on /home/NewDir
    db2 lis db directory ----> FIRST is again there but noted that is "placed" in /home/NewDir

    db2 connect to FIRST ----> can't find it

    Another cataloging but to right place makes possible to connect FIRST.
    I understand that only possible thing (if I want everything is working) is to catalog db to place where it really resides.

    When I create alias on that db, I have to notice the same correct directory.

    There is no other parameters I can change to see any effect.
    I ask about non-partitioned db on AIX 4.*, DB2 v.7

    So, my question is why I anybody (that uses non-partitioned db) needs commands "(un)catalog db".
    It is done by DB2 when create db.... When should I use "uncatalog db" and "catalog db"....

    If you have time to explain, thank you in advace.

    Nicole

  2. #2
    Join Date
    Aug 2003
    Location
    London
    Posts
    25

    Re: Why anybody neads command "catalog db" ?

    With the catalog command the system database directory contains a list and pointer indication where the database can be found. Without this info an application cant connect to a database..The node directory contains info relating to remote instances/systems To put an entry into this system directory we use catalog command..

    Correct me if I am wrong in my assumptions.

    Regards,
    Suresh

    Originally posted by NNicole
    Hello all!

    I have a question about cataloging db.
    I know that cataloging db writes informations about db in system db directory. That is done by default when I create db.

    db2 create db FIRST on /home/mydir ---> succesfully

    db2 list db directory
    I can see that db FIRST is placed on /home/mydir


    I tried to unacatalog db sample and catalog it to different directory to see its effect (to see why I need cataloging db)

    db2 uncatalog db FIRST
    db2 list db directory ----> there is no FIRST
    db2 catalog db FIRST on /home/NewDir
    db2 lis db directory ----> FIRST is again there but noted that is "placed" in /home/NewDir

    db2 connect to FIRST ----> can't find it

    Another cataloging but to right place makes possible to connect FIRST.
    I understand that only possible thing (if I want everything is working) is to catalog db to place where it really resides.

    When I create alias on that db, I have to notice the same correct directory.

    There is no other parameters I can change to see any effect.
    I ask about non-partitioned db on AIX 4.*, DB2 v.7

    So, my question is why I anybody (that uses non-partitioned db) needs commands "(un)catalog db".
    It is done by DB2 when create db.... When should I use "uncatalog db" and "catalog db"....

    If you have time to explain, thank you in advace.

    Nicole

  3. #3
    Join Date
    May 2003
    Posts
    57

    ...

    I inderstand why system database directory is needed, but DB2 writes all in it during the proces of creating any db. So I don't need command catalog...

    I've forgotten .... that I need it when I want to connect to remote db...
    Sorry, I remeber now... I'm always working with Client Config Assistant that make connection to remote db... instead of cataloging remote db.

    Thanks,
    Nicole

  4. #4
    Join Date
    May 2003
    Posts
    57
    "instead of cataloging remote db"

    I mean instead of issuing command catalog db explicitly.

  5. #5
    Join Date
    Jul 2003
    Location
    Switzerland, Basle
    Posts
    10

    Re: ...

    [QUOTE][SIZE=1]Originally posted by NNicole
    I inderstand why system database directory is needed, but DB2 writes all in it during the proces of creating any db. So I don't need command catalog...

    what about a failed/damaged system (with a database), but you where able to get the data-hdisks out, put them in another system, mount the volumegroup/filesystems and are ABLE TO CATALOG the rescued database on the new system!

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

    Re: ...

    The type of system restore you are talking about is not supported officially as far as I know ...

    Anyway, I believe your catalog db will work then

    Cheers
    Sathyaram



    [QUOTE][SIZE=1]Originally posted by jammann
    Originally posted by NNicole
    I inderstand why system database directory is needed, but DB2 writes all in it during the proces of creating any db. So I don't need command catalog...

    what about a failed/damaged system (with a database), but you where able to get the data-hdisks out, put them in another system, mount the volumegroup/filesystems and are ABLE TO CATALOG the rescued database on the new system!
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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