While I am able to connect through SQL PLUS using 'system' user. A bit while connecting in SQL Developer it is throwing 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...
Value you're inserting into SQL Developer's SID field enter into its Service Name field.
Related
I am developing an app and have a working connection to a Oracle Database using a Connection String like this:
"Data Source=(DESCRIPTION=(ADDRESS=(COMMUNITY=tcpcomm)(PROTOCOL=TCP)(HOST=mydatabasehost.myserver.com)(PORT=1529))(CONNECT_DATA=(SERVICE_NAME=code123.myserver.com))); User Id=user;Password=123456;";
I checked and I can also connect to this database using Oracle SQL Developer on my laptop.
Now I am trying to connect to an Oracle Database using Azure Logic Apps Oracle Connector.
But it requires:
serverhost:port/sid
I tried only serverhost:port but it also does not connect, gives this an error like this:
Test connection failed. Details: Oracle: ORA-12154: TNS:could not
resolve the connect identifier specified inner exception: Oracle:
ORA-12154: TNS:could not resolve the connect identifier specified
clientRequestId:
I tried these 3 queries:
select distinct sid from v$mystat;
select * from global_name;
select value from v$parameter where name='service_names';
But none of the returned values worked locally when I select SID.
I get
Invalid Username/password; logon denied
On Logic Apps this error appear:
Failed to create connection for connection id
'/providers/Microsoft.PowerApps/apis/shared_oracle/connections/shared-oracle-....'.
Encountered internal server error from Data Transfer Service. The
tracking Id is '...'.
Locally, if I use the SERVICE_NAME then it works. But in order to use the Logic Apps connector I need the SID.
I checked the On-premises data gateway Network ports test and it says:
How can I find out the SID by typing a SQL Query into my existing Oracle Connection on Oracle SQL Developer? Or how can I connect from Azure Logic Apps using the SERVICE_NAME?
Is it possible that the server is not accepting connections using the SID, and only accepts connections using the Service Name?
My first answer was lame. You are getting this error:
ORA-12154: TNS:could not resolve the connect identifier
So, it is trying to look up your server in a tnsnames.ora file rather than use host, port, sid or service name. It could be that there is another option that lets you type all that in. Or you may need to install an oracle client and setup a tnsnames.ora entry for your target server.
tnsnames.ora entry would look something like this:
MYSERVER=
(DESCRIPTION=(ADDRESS=(COMMUNITY=tcpcomm)(PROTOCOL=TCP)
(HOST=mydatabasehost.myserver.com)(PORT=1529))(CONNECT_DATA=
(SERVICE_NAME=code123.myserver.com)))
Bobby
You can find the SID by querying the v$thread view in the existing Oracle SQL Developer connection:
If ORACLE_SID = DB_SID
SQL> select instance from v$thread;
INSTANCE
----------------
DB_SID
More info on DB_NAME and ORACLE_SID here
You can query the Oracle SID with the query
SELECT sys_context('userenv','db_name') FROM DUAL;
It is accessible by every user, you don't need special privileges to use it.
Good afternoon,
When in the datasource I create a query sql query over sqljdbc, it works correctly and shows results. Now I want to create a schema in the workbench but when I create the connection I get the following error:
Error connecting to database [test]:
org.pentaho.di.core.exception.KettleDatabaseException:
Error occurred
while trying to connect to the database
Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)
Listener refused the connection with the following error:
ORA-12505, TNS: listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
oracle_xxx.xxxx.xxxx.xxx:1521:xxx.xxx
Please update the JDBC driver according to your Oracle DB version , there was an issue with the Driver.
I'm facing this problem while working with SQL Developer:
Status: Failure-Test failed refused the connection with the following error:ORA-12505:
Your database is not configured to listen on a given hostname/port or uses different sid. Use Oracle Net Configuration Assistant to verify that your db is configured correctly
I installed Oracle11g XE for windows32.
First time when I try to connect via SQL developer it gets connected effortlessly. But once I close the SQL Developer and restart it, then again I am unable to connect to the DB.
Then I tried to connect with SQL plus and guess what it gets connected!
But through SQL devloper I receive an error message as follows:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor.
I have checked all the credentials thoroughly. Still am unable to find the error. Please Help.
When you are using sql plus you use the tnsnames.ora file to find your connection. You can do the same in sql developer.
Just click the listbox connection type and choose TNS instead of basic
then for network alias you should be able to choose a connection from your tnsnames.ora
Im trying to make a JDBC connection to my Oracle DB.
It works fine through TOAD but when im trying to establish the connection through JDBC it gives me the below error
"IO Error: The Network Adapter could not establish the connection"
The syntax of the url and details provided in the url is correctly picked up from TNS file.
when I ping the hostname it connects but with telnet it gives me error
"Could not open connection to the host,on port 1521:Connect failed"
Possible issues will be.
(a) Check if the database is up. Most of the times, database will not be up causing this issue.
(b) Check if you are able to connect using sqlplus