DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Problem with DB link

  1. #1
    Join Date
    Oct 2000
    Posts
    467
    Hi,

    I have to refresh a test environment from production.

    Here is the scenario:

    The Production is 7.3.4 Database with a 7.3.4 listener.
    OS is Solaris 2.6 on all boxes.

    The Test system has a multitude of databases a mixture of 7.3.4 and 8.1.6 databases. They have been configured to use just the 8i listener.

    So the problem is a database link has been setup from the test system to access the production system. But I get an
    ORA-12154: TNS:could not resolve service name.

    However I can tnsping the prod instance from the test box and also do a sqlplus username/password@. The problem occurs when I try and access through the DB link.

    My question, is there a compatibility problem with the listener on the prod system. e.g will I have to install the 8i listener on the prod system, alternatively I could simply do an export fromuser touser, but this will take sometime, and not the route I really want to take.
    The TNS_ADMIN variable has been set correctly.

    Many Thanks!!!
    Vinit

  2. #2
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    12154 error is mostly due to errors in tnsnames.ora file. in the case of a DB*Link, I guess that the connect string you used to create it was not correct
    check that you have done

    create database link ...
    connect to ...
    identified by ...
    using 'SID'

    and that SID is in your tnsnames.ora file

  3. #3
    Join Date
    Oct 2000
    Posts
    467
    Hi,
    The connect string is correct and tnsnames.ora is ok since I'm able to connect using sqlplus. The problem is only with the db link.
    any other suggestions ?

    Vinit

  4. #4
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    How did you create the DB link, post the command.
    Post select * from global_name;
    And do you have global_names = false or true?

  5. #5
    Join Date
    Oct 2000
    Posts
    467
    create database link PWMapping
    connect to user
    identified by pw
    USING '(DESCRIPTION =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = hostname)
    (PORT = port_number)
    )
    (CONNECT_DATA =
    (SID = your_sidname)
    )
    )';


    global_names is set to true
    Vinit

  6. #6
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    if global_names is set to true, you have to use the name of your instance as the DB*Link name ...

  7. #7
    Join Date
    Oct 2000
    Posts
    467
    Seems you're right. will confirm once i check it out.
    Thanks
    Vinit

  8. #8
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938

    If you want it that way alter GLOBAL_NAMES to FALSE

  9. #9
    Join Date
    Oct 2000
    Posts
    467
    I have recreated the db link and now when I do a seldct from the db link I get
    and ora-2085 database link preprod connects to preprod.world

    db_domain is having null at the moment.
    any ideas ?

  10. #10
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Originally posted by vinit
    I have recreated the db link and now when I do a seldct from the db link I get
    and ora-2085 database link preprod connects to preprod.world

    db_domain is having null at the moment.
    any ideas ?
    I assume you DB link is called preprod.world.

    update GLOBAL_NAME set GLOBAL_NAME = 'PREPROD.WORLD';
    commit work;




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