Tuesday, January 10, 2012

ORA-12154 ORA-12162 calling SQL*Loader / SQL*Plus


Problem Description 

Running SQL*Loader as: 

sqlload userid=... control=... data=... log=... 

HOSTSTR logical has been set to same value as your connection string but without domain name. 

When you have specified connect string (ie. SCOTT/TIGER@DATABASE) but no domain you receive these errors: 

SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0] 
ORA-12154: TNS:could not resolve service name 

When you have not specified connect string (ie. SCOTT/TIGER) you receive these errors: 

SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0] 
ORA-12162: TNS:service name is incorrectly specified 

Your sqlnet.ora has: 

names.default_domain entry = world 

The syntax in your tnsnames.ora entry is correct. 

Your entry in tnsnames.ora does not include the .WORLD extension (default domain from sqlnet.ora). 

Solution Description 

Specify the .WORLD in your tnsnames.ora and also in your connect string. This will remove the error. 

Also, ensure you are not hitting [BUG:893290].   

Source : Oracle Metalink Note:116852.1

No comments:

Post a Comment