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

前端 未结 7 1997

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 14:04

    fwiw, this guy posted a solution to this problem

    http://www.simplemancomplexmachine.com/2011/10/sqlldr-one-liner-to-remote-database.html

    Yes there is a one-line solution and you can use a TNS connect string to do this from the command line. The key is formatting the connection string a little different as it must be quoted. Additionally the quotes and parentheses must be escaped (backslashes):

    sqlldr userid=dbuser@\"\(description=\(address=\(host=remote.db.com\)\(protocol=tcp\)\(port=1521\)\)\(connect_data=\(sid=dbsid\)\)\)\"/dbpass control=controlfilename.ctl data=data.csv
    

    Note that in the original blog post he had a space in front of '/dbpass'. This causes sqlldr to give the error:

    LRM-00112: multiple values not allowed for parameter 'userid'

    0 讨论(0)
提交回复
热议问题