1. Error description:
Each generated sqlloder file is in good condition and has the same permissions, but an error is reported when importing the oracle database. The error is:
SQL * Loader-704: Internal error: ulconnect: OCIServerAttach [0]
ORA-12154: TNS: cocould not resolve the connect identifier specified
2. Cause Analysis
The remote tns service is not activated locally, but sqlloader uses the local tns to connect to the remote database.
3. solution (two solutions are available)
(1) Reload the tns service of orcle locally and configure the tns connection of the remote server in tnsnames. ora, which is expensive but feasible.
(2) directly add the ip address of the remote database server to the sid, for example:
Sid = database name/password @ // remote database ip \: Port/remote database sid
4. Conclusion:
If sqlloader needs to connect to the remote database sid locally, it must have the ip address of the remote database.
If the database is local and the tns service is activated locally, no ip address is required.
Author: nannan408