Oracle Data Writer : how to give DB details without machine

Hi,

While using ORACLEDATAWRITER, TNS name to be given to provide db details, host name(remote) etc…is there any way I can add db details, and host name without using TNS name.

The other question, is I could not find how sqlldr uses tns name…I did not find any option in command line option for sqlldr how it uses it internally for connecting database or where clover is establishing connection.

Hi,

  1. there isn’t any other way to defining db details - tns name must be used.

  2. sqlldr read an information about target database from tns file. You must add your database in tns file on your computer.
    Example of tns file:

MY_TNS_NAME =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = MY_HOST)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
)
)

The tns file is located in:
C:\oracle\product\10.2.0\client_2\NETWORK\ADMIN\tnsnames.ora
/home/MY_ACOUNT/oracle/product/10.2.0/db_1/network/admin/tnsadmin.ora
or in similar path depends on location of oracle client

Thanks for reply…do you have any clues, internally how sqlldr take tns name as input.

I checked the command line parameters for sqlldr, I could not find if its taking tns name as input.

tns name is passed to the sqlldr through ‘userid’ parameter - but any mention about this fact isn’t in SQL*Loader Command-Line Reference.

value of ‘userid’ parameter is generated in OracleDaraWriter accordnig to this format:
userid=username/password@tnsName