Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2004
    Posts
    84

    Unanswered: ORA-12545: Connect failed because target host or object does not exist

    Hi,

    I am getting error while trying to run exp from database A to database B using exp user/pwd@tns using a script.

    However , when I run the export at prompt as below it runs well
    $exp user/pwd@tns

    but I wish to do the export using script exp_tab.ksh and exp_tab.par.
    When trying to do the same thing from script it fails with the error given below. I am unable to get the cause.

    The ksh and par files follow.

    Export: Release 8.1.7.0.0 - Production on Tue Jan 13 11:57:41 2004

    (c) Copyright 2000 Oracle Corporation. All rights reserved.


    EXP-00056: ORACLE error 12545 encountered
    ORA-12545: Connect failed because target host or object does not exist
    EXP-00000: Export terminated unsuccessfully

    exp_tab.ksh
    ---------------
    mknod exp_tab.dmp p
    compress < exp_tab.dmp > exp_tab.dmp.Z &
    exp parfile=exp_tab.par

    exp_tab.par
    --------------
    userid=user/pwd@tns
    file=exp_tab.dmp
    rows=y
    buffer=10240000
    Compress=n
    INDEXES=y
    GRANTS=n
    tables=(owner.TABLE_NAME)
    CONSISTENT=N
    log=exp_tab.log

  2. #2
    Join Date
    Nov 2003
    Location
    Bangalore, INDIA
    Posts
    333

    Thumbs up

    HI,

    Ensure the ADDRESS parameters have been entered correctly; the most likely incorrect parameter is the node name.

    Ensure that the executable for the server exists .
    SATHISH .

  3. #3
    Join Date
    Jan 2004
    Posts
    84
    No the problem got resolved when I removed the userid parameter from the parameter file and ran the script as below

    $exp_tab.ksh
    and supplied user/pwd@tns when it asked...

    The parameter file was not taking the tns entry for the remote database.. not sure why...

  4. #4
    Join Date
    Jan 2004
    Location
    Venezuela
    Posts
    151
    Originally posted by preetikate
    No the problem got resolved when I removed the userid parameter from the parameter file and ran the script as below

    $exp_tab.ksh
    and supplied user/pwd@tns when it asked...

    The parameter file was not taking the tns entry for the remote database.. not sure why...
    Perhaps the connection was failing inside the script because you have to refer the service name with its domain too and you have to ensure that your sqlnet.ora file has the line refering for the domain of the instance. This is the same case when you are creating a database link.
    Joel Pérez

  5. #5
    Join Date
    Jan 2004
    Location
    Venezuela
    Posts
    151

    Re: ORA-12545: Connect failed because target host or object does not exist

    Another option that you can use is to set the enviroment varible ORACLE_SID inside the script and do not use the service name when you invoke it.
    Joel Pérez

  6. #6
    Join Date
    Jan 2004
    Posts
    84
    Thank You for the clarification!

  7. #7
    Join Date
    May 2012
    Posts
    2
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12545
    TNS-12545: Connect failed because target host or object does not exist
    ns secondary err code: 12560
    nt main err code: 515
    TNS-00515: Connect failed because target host or object does not exist
    nt secondary err code: 1004
    nt OS err code: 0

  8. #8
    Join Date
    May 2012
    Posts
    2

    ORA-12545: Connect failed because target host or object does not exist

    hi.


    im geting this error plz help me.....
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12545
    TNS-12545: Connect failed because target host or object does not exist
    ns secondary err code: 12560
    nt main err code: 515
    TNS-00515: Connect failed because target host or object does not exist
    nt secondary err code: 1004
    nt OS err code: 0

  9. #9
    Join Date
    May 2012
    Posts
    2
    Experienced the same thing.Tried your suggestions and they worked. Thank you!

Posting Permissions

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