Getting Error when connection scott schema from SQL Developer - oracle

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

Related

java.sql.SQLException: connect error when connecting to TDengine database

I'm trying Druid to connect TDengine.
url jdbc:TAOS-RS://127.0.0.1:6041/test?user=xxx&password=xxxx
Then I got the following error:
java.sql.SQLException: connect error
If I use JDBC directly, it's ok. What may be the problem?
Please make sure you have launched taosAdapter.
You can try
systemctl start taosadapter

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

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?

istener does not currently know of service requested in connect descriptor

I tried to connect soapUi the open source version to oracle 11g but this error is raised :
Can't get the Connection for specified properties; java.sql.SQLRecoverableException: Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
this is the connection string :
jdbc:oracle:thin:SYS/imane#127.0.0.1:1521/132
ps: I put the driver jar in ext and lib
thank you

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?

How to catch Sqlcmd errors without showing the error message

I am trying to find out with SQLEXPRESS is installed on a server by running the following
sqlcmd -S LT1183 -U uname -P pass123 -Q "SELECT ##servername"
If it is installed it gives out the server name but if its not, it throws the below error.
Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : TCP Provider: Error code 0x2AF9.
Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
I am looking for a way to suppress this error and instead show a custom error message. Is that possible?
Thanks in advance.
This may not be possible with sqlcmd, since the error stems from connecting the the server, which upon error immediately terminates the sqlcmd.
if you can use powershell, you may find some luck using invoke-sqlcmd.
Powershell Try Catch invoke-sqlcmd

Resources