Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2003
    Posts
    38

    Post Unanswered: Using Oracle's database link for connecting different database/user in Db2

    Hi,

    1) In our application,we use Oracle's Database link for accessing remote objects including tables and view.[A database link is a schema object in one database that enables to access objects on another database]. This is Oracle's distributed database management system architecture allowing access data in remote databases using Oracle Net and an Oracle server.Fir this we create dblink as below:


    CREATE [SHARED] [PUBLIC] DATABASE LINK dblink
    [ CONNECT TO { CURRENT_USER | user IDENTIFIED BY password [authenticated_clause] }
    | authenticated_clause
    ]
    [USING 'connect_string'];

    After this, in SQL statements, we can refer to a table or view on the other database, by appending @dblink to the table or view name.
    Eg: UPDATE employees@remote
    SET salary=salary*1.1
    WHERE last_name = 'Baer';
    /*@remote is the dblink*/ Now, can you please guide us as what is the substitute for the same in DB2.

    2)DB2 does not support the concept of Packages. How should I pursue this.

    3)We use PRAGMA autonomous_transaction in one of our procedure. This is basically to rollback the entire transaction should there any exception occur.I learnt about BEGIN ATOMIC in Db2 supporting this feature but not very sure.
    Raj Shekhar

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

    Re: Using Oracle's database link for connecting different database/user in Db2

    1)

    You will have to create a wrapper, server, nickname.
    In the V8 information Centre, under concepts you have into to federated systems

    2) There is a term 'package' in db2 ... But not sure, whether it is the same as Oracle term package (I think they are different)

    3) I think you are right ...

    Cheers

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jun 2003
    Posts
    38

    Re: Using Oracle's database link for connecting different database/user in Db2

    Originally posted by sathyaram_s
    1)

    You will have to create a wrapper, server, nickname.
    In the V8 information Centre, under concepts you have into to federated systems

    2) There is a term 'package' in db2 ... But not sure, whether it is the same as Oracle term package (I think they are different)

    3) I think you are right ...

    Cheers

    Sathyaram
    Hi ,

    Can you please elaborate more on point (1) ie how to creat db link.
    Raj Shekhar

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

    Re: Using Oracle's database link for connecting different database/user in Db2

    Please refer to the DB2 Manuals ...

    It is explained very clearly ...

    Cheers

    Sathyaram


    Originally posted by Raj Shekhar
    Hi ,

    Can you please elaborate more on point (1) ie how to creat db link.
    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
  •