SQL loader shows error ORA-12546 TNS:permission denied when I try to run it against a remote database - oracle

I'm trying to run sql loader with the following syntax on a remote bbdd:
sqlldr user/password#host.sid control=loader_control_file.ctl
(where host.sid is the remote bbdd tnsnames entry) and it gives the following error
SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
ORA-12546: TNS:permission denied
I have the connection configured in my local tnsnames.ora, tnsping resolves the sid and sqlplus connects (and works) correctly so apparently tnsnames setup is good.
I've also tried EZconnect syntax
sqlldr user/password#//host:1521/sid control=loader_control_file.ctl
buts gives the same error
I have no idea of what is wrong here. Any help?

Related

Oracle cannot get sqlldr to reach listener, get ORA-12514 error

Every time I try to run the following sqlldr command on a terminal only oracle 19c system:
sqlldr username/password#$HOSTNAME/$ORACLE_SID control=rules.ctl log=backup_error_logs.txt data=output.csv errors=1000000
I get the following error message:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Things I have tried:
Verified that the listener is operable and listener.ora file is properly formatted with lsnrctl.
Verified the connection and oracle environment variables are working as the following sqlplus command runs without problem:
sqlplus username/password#$HOSTNAME/$ORACLE_SID
Verified the tnsname.ora is running properly configured with the following tnsping command:
tnsping $ORACLE_SID
Cannot think of anything else to try or to check. Does anyone have any advice without resorting to the GUI tools?
Could be a problem of quotes in the variables, the behavior of both tools is different regarding quotes.

Oracle Sql developer throwing error message : Internal Error: Fetch error message failed! Vendor code 17001

I have recently moved from TCP to TCPS Connection. I can confirm that all my connection parameters are right and properly set. tnsnames.ora and sqlnet.ora is under oracle_home/network/admin folder.
I am trying to connect and getting below error message:
An error was encountered performing the requested operation:
Internal Error: Fetch error message failed!
Vendor code 17001
Looking for suggestions to fix issue.
Make sure that the Oracle Client "bin" directory (e.g. $ORACLE_HOME/bin) is in your PATH environment variable.

Oracle database throwing error - orapw[SID] is missing

I have downloaded and installed Oracle Database Express edition. In SQL Developer, I am trying to create a new database connection that connects to SYS, however I am being rejected with the error:
Status : Failure -Test failed: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
I found out that during installation I should have been prompted to create a password for sys, but no such thing happened.
I then tried to find the orapw[SID] file in /database. It was not there.
Any idea what I'm doing wrong?

Getting Error when connection scott schema from SQL Developer

I am getting below error when ever trying to connect DB from sql developer.
Status : Failure -Test failed: Listener refused the connection with
the following error: ORA-12514, TNS:listener does not currently know
of service requested in connect descriptor
But successfully connect from command prompt.
I have set the path in environment variable correctly.
Can you please help me with this issue.
Thanks

How to connect SQLPlus with tnsnames.ora

I want to connect with my Oracle database without installing Oracle Client.
I downloaded:
"Instant Client Package - Basic" and
"Instant Client Package - SQL*Plus"
Then I created folder on C:\Oracle\instantclient, where I extracted all packages.
I have been set system environment like:
Path - C:\Oracle\instantclient
NSL_LANG - with properly key
ORACLE_HOME - C:\Oracle\instantclient
ORACLE_SID - C:\Oracle\instantclient
TNS_ADMIN - C:\Oracle\instantclient
Then I created tnsnames.ora file with configuration in C:\Oracle\instantclient
and when I puted a command to cmd:
sqlplus user/password #HOST
I have a message like:
ERROR:
ORA-12560: TNS:protocol adapter error
but when I tried like:
sqlplus user/password#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=address to host)(Port=1521))(CONNECT_DATA=(SID=address to SID)))
everything works properly. Why SQL have a problem with recognize tnsnames.ora file?
Your command should be:
sqlplus user/password#HOST
with no space between the password and #HOST part.
With the space it treats the #HOST as a script to execute once you've logged in, and it tries to connect locally, which produced that TNS error. (As you don't log in the HOST isn't ever evaluated to establish if it exists, so it's effectively noise at this point).
C:\>sqlplus -l -s x/y #HOST
ERROR:
ORA-12560: TNS:protocol adapter error
SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus
With the space removed it looks for HOST as a TNS alias:
C:\>sqlplus -l -s x/y#HOST
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus
For me that still gets an error since I don't have HOST in my tnsnames.ora, but it's a different error and you can see it's at least trying to use it as a TNS alias. If you have it defined properly it will be able to connect to your database.
NEVER edit $ORACLE_HOME/network/admin/tnsname.ora manually, use "netmr" to create Local Name.
Don't know why it's same but do not work.
This commando works fine for me:
sqlplus /nolog
connect username/password#hostname:port/SERVICENAME

Resources