Execute SQLLdr without tnsnames.ora entry

In my last post, I discovered that we can run sqlplus without having an entry in tnsnames. I was under the impression that it will work the same way in sqlldr also. But it was a mistake as sqlldr told me I am giving it the wrong syntax. I spend lots of time on that to find out finally that, I need to escape the brackets and need to put a double quotes which itself should be escaped around the connection string. So it goes like this :

sqlldr username/pwd@\”\(DESCRIPTION=\(ADDRESS=\(PROTOCOL=TCP\)\(HOST=yourhost.domain\)\(PORT=1521\)\)\(CONNECT_DATA=\(SERVER=DEDICATED\)\(SID=yourservice\)\)\)\” control=control_file.ctl errors=1000 ROWS=50000

That’s it guys. Happy Coding. 🙂

Advertisements

Tags: , , ,

3 Responses to “Execute SQLLdr without tnsnames.ora entry”

  1. Michael Blahay Says:

    I confirmed that the above syntax is also valid with sqlplus, so you don’t have to save off two different strings when connecting with both sqlplus and sqlldr.

  2. Vijay Says:

    Thanks a ton mate.

  3. shirish Says:

    Thankyou very much, it worked perfectly

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: