DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: DB- LINK

  1. #1
    Join Date
    Aug 2001
    Location
    uae
    Posts
    21
    1. Can anybody explain me about db-link


    2. i want to connect one database with a remote database, what is the best solution

    thanks



  2. #2
    Join Date
    Feb 2001
    Location
    Bombay,India
    Posts
    530
    Hi,
    Database Link is basically used in DIstributed Database System where one database want to access the another database.
    In order to create a database link make the following parameter to GLOBAL_NAMES=FALSE in init.ora file.This paramter will allow u to create the database link with any name.
    Then create an entry in tnsnames.ora file for connect string of the other database.
    After creating an entry in tnsnames.ora file enter the following command to check the connection at the DOS prompt
    c:\>tnsping

    Once the connection is established then create the database link under user SYS through the following command:

    sql>create public database link BIGLINK
    connect to user1 identified by password
    using 'connect_string'

    user1 == username on the other database
    password= password of the user on the other database
    connect_string = connect string of the other
    database

    So u login as a user and give the follwoing command to access the tables of that user

    sql>select * from user1.table_name@biglink;

    I hope that I have answered ur question.In case of any help please be free to ask me at rohitsn@altavista.com

    Regards,
    Rohit nirkhe,Oracle DBA,OCP 8i
    rohitsn@altavista.com




  3. #3
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Creating DB links is an issue treated with mistakes even in METALINK (about DB links between DBs running in the same Oracle Parallel Server enviroment). The way you create DB links depends on which version of Oracle you use. The difference is very small but it it exists :-)

    rohitsn has explained very well the basic syntax.

    Ask here if you have problems after creating the DB links.


  4. #4
    Join Date
    Aug 2001
    Location
    uae
    Posts
    21

    DB link

    hi, rohitsn


    sql>create public database link BIGLINK
    connect to user1 identified by password
    using 'connect_string'


    I created the link using the above statement of yours.
    but the connect to user1..... is not working. there is some syntax error

  5. #5
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    Can you post the error message?

    Sanjay

  6. #6
    Join Date
    Dec 1999
    Location
    Purgatory
    Posts
    346
    Hi Sanji,

    I assume that when you say you are having problems connecting as user1, you haven't actually typed in 'user1' ?

    Obviously, rohitsn meant user1 as an example of the connect string, you should substitute the schema name you are trying to connect to.

  7. #7
    Join Date
    Aug 2001
    Location
    uae
    Posts
    21
    connect to user1 identified by password
    using 'connect_string'


    i given user1 as my main user
    password is of main user password
    and the connect string with quotes and with out also


    tell me is there any statement like ' connect to .... ' ?

  8. #8
    Join Date
    May 2002
    Posts
    46
    Hi Saji,

    Can you post the error that you are receiving so that we can help you ?

    S.Prabhakar

  9. #9
    Join Date
    Aug 2001
    Location
    uae
    Posts
    21
    sorry.
    it is working fine. i made a mistake of connecting that
    thanks to all

Posting Permissions

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


Click Here to Expand Forum to Full Width