Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2003
    Location
    Singapore
    Posts
    59

    Unanswered: DB2 Instances - problem connecting client to server

    Hi,
    Scenario: Dual instances on same DB2 server
    System A: Db2 database - Server (SunOS)
    Instances: 1) db2inst1
    Database: XXX (alias:XXX)
    2) db2inst2
    Database: XXX (alias:XXX)

    System B: DB2 Client - (SunOS)
    Instances: 1) db2inst1
    Cataloged Node : A
    Cataloged Database: XXX (alias:XXX)
    Instances: 2) db2inst2
    Cataloged Node : A
    CatalogedDatabase: XXX (alias:XXX)

    The problem I am facing is that when i log in on the client as db2inst1, I can access all tables on the cataloged database XXX, but when I log in as the other instance i am able to connect to the 2nd cataloged database XXX but I cant seem to access any tables of the second instances's database.
    Am i missing something here??
    Any help is appreciated.
    rgds
    brat.

    Both databases are the same, something like a

  2. #2
    Join Date
    Apr 2003
    Location
    Singapore
    Posts
    59

    contd. .....

    both databases are the same something like a test database and a production database on differnt instances on the same server

  3. #3
    Join Date
    Sep 2002
    Posts
    456

    Re: contd. .....

    You need to catalog the database seprately for each instance. You have already catalogued one database, do the other as well.

    dollar

    Originally posted by brat4
    both databases are the same something like a test database and a production database on differnt instances on the same server

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

    Re: contd. .....

    Looks like you have created the tables unqualified, logged on as instance owner ... ie, your fully qualified table name on db2inst1 is db2inst1.table1 .

    When you logon as db2inst1 and say select * from table1, db2 qualifies the unqualified table name with your logon db2inst1.table1

    But when you are logged on as db2inst2, the same statement will be interpreted by db2 as db2inst2.table1 ...

    So you need to explicitly say ,
    select * from db2inst1.table1 ...

    Verify that db2inst2 has privileges on db2inst1 database tables ...

    HTH

    Sathyaram

    Originally posted by brat4
    both databases are the same something like a test database and a production database on differnt instances on the same server

  5. #5
    Join Date
    Apr 2003
    Location
    Singapore
    Posts
    59

    Re: contd. .....

    thanks for your reply dollar and sathyaram,
    Dollar: I have already cataloged my node and cataloged the database of the second instance on the client, still no avail.

    sathyaram: actually i dont need to access db2inst1.table1 , in fact i want to select from db2inst2.table1, but db2 just says db2inst2.table1 is undefined.

    Requirement: select * from db2inst2.table1 should return values.


    both my client and server have 2 instances
    instance1 : db2inst1
    database : tbname

    instance2 : db2inst2
    database tbname ( same database as the one in the first instance)


    What I did :
    1) logged in as db2inst2 on the client,
    2) db2 get instance
    output : current database manger instance : db2inst2
    3) db2 connect to dbname user user using passwd
    output: Connected succesfully with SQL authorization : db2inst2
    4) select * from tablename
    output db2inst2.tablename is undefined

    On my db server there is a dbname database in the db2inst2 instance which is the same(replicated) as the database on the first instance.
    I need to be able to select from that database which is on the second instance.

    After an exhaustive search on the web, I found some forum stating that "on a multiple instances on same server senario, each instance has to be accessed on a different port number.
    Is this true, as I couldnt connect at all.


    rgds
    brat.


    Originally posted by sathyaram_s
    Looks like you have created the tables unqualified, logged on as instance owner ... ie, your fully qualified table name on db2inst1 is db2inst1.table1 .

    When you logon as db2inst1 and say select * from table1, db2 qualifies the unqualified table name with your logon db2inst1.table1

    But when you are logged on as db2inst2, the same statement will be interpreted by db2 as db2inst2.table1 ...

    So you need to explicitly say ,
    select * from db2inst1.table1 ...

    Verify that db2inst2 has privileges on db2inst1 database tables ...

    HTH

    Sathyaram

  6. #6
    Join Date
    Apr 2003
    Location
    Singapore
    Posts
    59

    Thumbs up Re: Cracked it. :)

    Finally!!!!!!!!!!!!!! cracked it... hehehehehe

    its to do with the port number on which the instance is accesed and the database manager configuration and /etc/services file..
    If you guys need the details, lemme kno/

    thanks for everything. appreciate it.

    rgds
    brat.



    Originally posted by brat4
    thanks for your reply dollar and sathyaram,
    Dollar: I have already cataloged my node and cataloged the database of the second instance on the client, still no avail.

    sathyaram: actually i dont need to access db2inst1.table1 , in fact i want to select from db2inst2.table1, but db2 just says db2inst2.table1 is undefined.

    Requirement: select * from db2inst2.table1 should return values.


    both my client and server have 2 instances
    instance1 : db2inst1
    database : tbname

    instance2 : db2inst2
    database tbname ( same database as the one in the first instance)


    What I did :
    1) logged in as db2inst2 on the client,
    2) db2 get instance
    output : current database manger instance : db2inst2
    3) db2 connect to dbname user user using passwd
    output: Connected succesfully with SQL authorization : db2inst2
    4) select * from tablename
    output db2inst2.tablename is undefined

    On my db server there is a dbname database in the db2inst2 instance which is the same(replicated) as the database on the first instance.
    I need to be able to select from that database which is on the second instance.

    After an exhaustive search on the web, I found some forum stating that "on a multiple instances on same server senario, each instance has to be accessed on a different port number.
    Is this true, as I couldnt connect at all.


    rgds
    brat.

Posting Permissions

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