title: Is it possible for Oracle sqlldr to accept a TNS entry as an instance qualifier in Oracle 10 and 11?
body: <p>Is it possible to use a fully qualified TNS entry using sqlldr bundled with Oracle 10/11?</p>
  
  <p>For example, in SQLPlus:</p>
  
  <pre><code>    sqlplus user/password@(description=(address=(host=localhost)(protocol=tcp)(port=1521))(connect_data=(sid=orcl))) @script.sql
  </code></pre>
  
  <p>But using sqlldr (SQL Loader) there appear to be issues with using the TNS entry directly. Specifically:</p>
  
  <pre><code>    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'
  </code></pre>
  
  <p>Here is the error message produced:</p>
  
  <pre><code>    LRM-00116: syntax error at 'address' following '('
  
      SQL*Loader: Release 11.2.0.1.0 - Production on Tue Sep 13 15:41:54 2011
  
      Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
  
      SQL*Loader-100: Syntax error on command-line
  </code></pre>
  
  <p>Attempting to encapsulate the TNS entry in quotes produces the same error.</p>
  
  <p>Had a look at the sqlldr documentation, and attempted to use the 'userid' command-line argument to no avail. Specifically:</p>
  
  <pre><code>sqlldr userid='user/password@(description=(address=(host=localhost)(protocol=tcp)(port=1521))(connect_data=(sid=orcl)))' bad='bad.txt' control='control.ctl' data='data.txt' log='log.txt' direct='true'
  LRM-00116: syntax error at 'password@(' following '='
  
  SQL*Loader: Release 11.2.0.1.0 - Production on Tue Sep 13 15:44:17 2011
  
  Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
  
  SQL*Loader-100: Syntax error on command-line
  </code></pre>
  
  <p>It makes sense that Oracle would hope to coerce the user to a local instance to mitigate I/O in pushing data to a remote host. But the deviation in supported syntax is not so intuitive. Anyone else experience similar issues?</p>