Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2004
    Posts
    50

    Unanswered: DBLINK works in SQPLUS not in OEM

    ok, this is weird.

    =======================

    if i select from a DBLINK in sqlplus, it works fine:

    Code:
    SQL> select count(*) from RESPONSES@PINE.WORLD;
    
      COUNT(*)
    ----------
         59948
    =======================

    if i copy the same exact select statement into an OEM job, and run it as the same user, it throws an error:

    Code:
    SQL> SQL> select count(*) from RESPONSES@PINE.WORLD 
                                      *
    ERROR at line 1:
    ORA-12154: TNS:could not resolve the connect identifier specified
    =======================

  2. #2
    Join Date
    Mar 2010
    Location
    Vienna, Austria
    Posts
    149
    akosz,

    let me guess:
    your OEM is running either on a different machine or from a different ORACLE_HOME on the same computer.

    simply add the connection description of the remote DB into the tnsnames.ora file used by the OEM ...
    "There is always an easy solution to every problem - neat, plausible, and wrong."
    -- H.L. Mencken

  3. #3
    Join Date
    Sep 2004
    Posts
    50
    Quote Originally Posted by magicwand View Post
    akosz,

    let me guess:
    your OEM is running either on a different machine or from a different ORACLE_HOME on the same computer.

    simply add the connection description of the remote DB into the tnsnames.ora file used by the OEM ...
    yes, they are running on different machines.

    what i don't get is that there really aren't any databases in the tnsnames.ora file for OEM. yet it's monitoring like 100 databases w/o a problem.

  4. #4
    Join Date
    Mar 2010
    Location
    Vienna, Austria
    Posts
    149
    Check the machine OEM is running on for a environment variable names TNS_ADMIN

    if it is set, the tnsnames.ora file is in the directory where $TNS_ADMIN points to.
    "There is always an easy solution to every problem - neat, plausible, and wrong."
    -- H.L. Mencken

  5. #5
    Join Date
    Sep 2004
    Posts
    50
    found the answer, i think.

    looks like the SID for this DB (PINE.WORLD) was set as lowercase when the DB was built.

    the tnsnames file on the other box that houses the other DB (PRRR.WORLD) making the connection via DBLINK had the SID in uppercase.

    apparently SQLPLUS isn't case sensitive, but OEM is?!

    whatever... it works now. didn't have to change anything in OEM or the OEM box.

Posting Permissions

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