Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2004
    Posts
    7

    Unanswered: How do i connect UNIX TO UNIX Machines???

    Hi friends,

    i have a unix machine PC1 where a database is running ( IBM DB2 V8.1 ) . Then i have another machine PC2 i installed there also ( IBM DB2 V8.1 ). On PC2 i installed unixODBC. To connect to the database over ODBC on unix i did this:

    on db2 console:
    catalog tcpip node archiv remote PC1 server DB2_db2inst1

    command successfull
    then

    catalog database archiv
    command successfull
    then

    connect to archiv
    command successfull

    then is used the tool isql

    isql -v archiv root passwort
    command successfull

    Now i am connect but i cant make this commands but there are there it exits SELECT * FROM TABLE.

    Please can anyone help me with this.

    Cu,

    DB2NOOB

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    db2 catalog odbc data source archiv
    on the client machine
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Aug 2004
    Posts
    7
    hi !

    i get this message:

    db2 => catalog odbc data source archiv
    SQL1297N This command is currently not supported on this platform.

  4. #4
    Join Date
    Aug 2004
    Posts
    7
    He db2 pros noone an idea about this situation.
    Sometimes i am thinking that i have every times problems that nobody have.
    hmmm please help me here it's very important for me.

    CU @ll,

    DBNOOB

    Thx for reading and maybe answering !!!

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Have you tried using a fully qualified table name ... say user1.table1 ...

    Try
    select * from syscat.tables ...

    What is the error message you get ...
    If this does not work, I guess, you may have to enable CLI trace to see what's happening ...
    http://www.db2click.com/tip_month.htm
    will show you how to set the tracing
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  6. #6
    Join Date
    Aug 2004
    Posts
    7
    Hi !

    When i try to use this command->

    select * from syscat.tables

    command successfull 238 rows are coming but i cant see anything.

    What is syscat ??? I have on my database no such thing!

    Cu,

    DBNOOB

  7. #7
    Join Date
    Aug 2004
    Posts
    7
    ?????????????????????????????????????????

  8. #8
    Join Date
    May 2003
    Posts
    2
    Hello,
    I think you might have the databases cataloged incorrectly. Please read this example and give it another try. If you still have problems, please post back with the exact syntax you are using as well as the service port numbers assigned to the tcpip listeners on each server.

    Let's say that you have a database called ProdA in DB2 instance db2inst1 on ServerA. On ServerB you can also have an instance called db2inst1 with a database called ProdB. [Even though the instance user id is the same (db2inst1) they can have different passwords since they are defined independently on ServerA and ServerB. They do not need to have the same UID or GID either]

    If you have an application on ServerA that needs to access the database on ServerB through ODBC on ServerA, then you can do that two ways...

    1) catalog remote tcpip node ServerB remote ServerB server {port# or /etc/services port name defined on ServerA based on the port chosen for the ServerB database instance}

    catalog database ProdB at node ServerB

    Now do whatever steps are needed to set up the newly defined ProdB database as an ODBC data source. The application will see the ProdB database as if were local and the DB2 instance will take care of the communications between ServerA and ServerB. It is the DB2 runtime client code that is installed as part of the DB2 server install on ServerA the provides this functionality...a local database like ProdA doesn't need to exist on ServerA for this to work. In this example, the ServerA instance is acting as a gateway for the remote DB2 serverB.


    2) Create only the ProdA database on ServerA but use DB2's included federation technology to create nicknames for the remote tables on ProdB that need to be accessed by the application on ServerA. The application will connect only to the ProdA database, so that's the one that needs to be set up as an ODBC data source. From the apps perspective, it will see one larger database that has tables from both databases in it, and the table names will need to be made unique between the two databases. For example, if both databases have a department table, the ServerA version will be called Department and the nickname for the remote ProdB table will need to be something like DepartmentB.

    Using federation, it is possible to join tables that exist on different servers in a single SQL statement. You can use Materialized Query Tables to "cache" some of the data from ProdB on ServerA to help with performance. The optimizer is federation-aware, and will push down as much work to ProdB as possible.

Posting Permissions

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