Is it possible for Oracle sqlldr to accept a TNS entry as an instance qualifier in Oracle 10 and 11?

前端 未结 7 1995

Is it possible to use a fully qualified TNS entry using sqlldr bundled with Oracle 10/11?

For example, in SQLPlus:

    sqlplus user/password@(description         


        
相关标签:
7条回答
  • 2021-02-08 13:43

    The only thing that worked for me was using two kinds of quotes:

    sqlldr user/password@'"(description=(address=(host=localhost)(protocol=tcp)(port=1521))(connect_data=(sid=orcl)))"' bad='bad_file.txt' control='control.ctl' data='data.txt' log='log.txt' direct='true'

    0 讨论(0)
  • 2021-02-08 13:45

    Kelvin is 100 % Correct. It worked for me

    You can execute sql loader with below command without making a tns entry

    sqlldr userid/password@//host:port/SERVICE_NAME bad='/PATH/FILENAME.bad' control='/PATH/FILENAME.ctl' data='/PATH/FILENAME.csv' log='/PATH/FILENAME.log' direct='true'

    0 讨论(0)
  • 2021-02-08 13:50

    Have you tried the ezconnect format to connect to a remote db using sqlldr ?

    e.g:

    sqlldr user/password@//localhost:1521/orcl bad='bad_file.txt' control='control.ctl' data='data.txt' log='log.txt' direct='true'   
    

    see: http://www.orafaq.com/wiki/EZCONNECT

    0 讨论(0)
  • 2021-02-08 13:54

    Looks like you need to escape characters like '(', ')' and '=' with the escape character '\' (i.e. backslash) as explained in here.

    0 讨论(0)
  • 2021-02-08 13:57

    You can also try:

    sqlldr user/password@TNS:(description=(address=(host=localhost)(protocol=tcp)(port=1521))(connect_data=(sid=orcl))) bad='bad_file.txt' control='control.ctl' data='data.txt' log='log.txt' direct='true'
    
    0 讨论(0)
  • 2021-02-08 14:03

    Single quoting the whole not-so-ezconnect worked for me in a DOS batch script and on the command line:

    sqlldr 'user/password@(description=(address=(host=localhost)(protocol=tcp)(port=1521))(connect_data=(sid=orcl)))' control='control.ctl' data='data.txt'
    
    0 讨论(0)
提交回复
热议问题