TNS:listener does not currently know of SID given in connect descripton - sid

When i am tring to access my oracle instance using basic connection type. It gives me an error telling "TNS:listener does not currently know of SID given in connect descripton",
But i can connect to the same user using Sqlplus
tnsping orcl =
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhos
t)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.007gu
ard.com)))
OK (0 msec)
i even tried to use the service name instead of the sid to connect and it doesn't work !
yesterday everything was fine .. i have restarted my laptop and i got this problem .. ( all my oracle services work fine )

Related

Unable to connect to my local Oracle database through Oracle SQL Developer

Unable to connect to my local Oracle 21c database using Oracle SQL Developer. Until now everything was fine. I set up tnsnames.ora as suggested:
my_test_database =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orclpdb)
)
)
I also could connect to my database using sqlplus \ as sysdba command. But every attempt to connect to my database (SYS user) through SQL Developer Error appears 12514 TNS: listener does not currently know of service. I am very grateful for any assistance.

SQL developer : Listener refused the connection

Dear stackoverflow community,
I know this question was already asked, but I tried to find a solution and unfortunately I'm blocked since 3 days now.
I installed Oracle 12c in Linux centos 7 server. When I try to access to the Oracle DB with SQL developer I have the following error:
Listener refused the connection with following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
What I do not understand is that if I restart the database I can connect. But Once I disconnect a try a reconnect I got the same error. Here is my listener.ora file
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ns3008269.ip-151-80-45.eu)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
And my tnsnames.ora is :
rspdata =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ns3008269.ip-151-80-45.eu)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rspdata)
)
)
oraclepdb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ns3008269.ip-151-80-45.eu)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oraclepdb)
)
)
And finally you can fin in attachment a screenshot of my Installation configuration.
I tried lot of and lot of thing... but still blocked.
Hello Stackoverflow community,
I was able to solve this issue. I re-installed Oracle 12c in Linux server and I used the tools netmgr and catmgr in order to configure the listener for the global DBname and also configure the services for PDB. This will automatically will modified the listener.ora and tnsnames.ora.
So my conclusion is that when installing Oracle12c do not modify by hand the listener.ora and tnsnames.ora.
Thank you all for your help and for the tips.

Getting Error: Listener currently does not know given SID when using SQL Developer

Please see screenshot:
I was successfully connected using SQL*Plus.
But when I trying to connect same database using same user using SQL Developer, then I'm getting error. Anyone have any idea ? I see all services running fine.
tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
Write
orcl in SID, not service name.
I think it will be good idea :)

JDBC Connection failing with ORA-12505 on Win8, Oracle 11g XE

I'm having an error that goes beyond what I see in TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
I'm using Windows 8, Oracle 11.2 XE, java 1.7.15, and Eclipse Juno SR2.
The error I receive is:
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
I have the driver registered properly, and I've edited the listener.ora to make the service explicit, in both ways I've seen given as exampled - under SID_LIST_LISTENER, I added:
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
)
and under LISTENER = (DESCRIPTION_LIST I added
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
tnsnames.ora contains, as its first entry:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
The source code making the calls is:
Class.forName(JDBC_DRIVER);
String connectionString = "jdbc:oracle:thin:localhost:1521/XE";
myConnection = DriverManager.getConnection(connectionString, "myuser", "myuserpw");
I've also been through the following permutations on the connectionString. with results noted here:
jdbc:oracle:thin:#localhost:1521:XE // java.sql.SQLException: ORA-01017: invalid username/password; logon denied
jdbc:oracle:thin:localhost:1521:XE // error ORA 12505
jdbc:oracle:thin:#//localhost:1521:XE // error java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
jdbc:oracle:thin:#localhost:1521/XE // error ORA-01017
jdbc:oracle:thin:#//localhost:1521/XE // error ORA-01017
Anyone have ideas?
I have an Answer! (Bloody-minded stubbornness is its own reward, I guess)
I changed which Connection call I made and restructured the connection string thataway, as in:
String connectionString = "jdbc:oracle:thin:myuser/mypw#localhost:1521:XE";
myConnection = DriverManager.getConnection(connectionString);
THAT works! Now the next guy can Google it. The version of the call with three parameters blows up every time I try it, but the same fundamental string with the username/pw embedded works in the single-parameter call.
I believe this is a bug in the driver provided with the XE database - oh Oracle, will you let us know?
OPEN cmd
execute the lsnrctl command.
Type start in the LSNRCTL> prompt.

ODBC connection to oracle time-out

I'm new here so I introduce myself, my name is Ettore Giallaurito and my job is in the IT services in Italy.
My question:
I'm trying to connect to an Oracle DB instance through an odbc (System DNS) connections under XP but I get an error ORA1254 TNS:could not resolvethe connect identifier specified.
I'm using oracle instant client 11.2 and I've my tnsnames properly configured, since I can get connected with DBVisualizer using the TNS method.
To be honest I do get connected in this case, but I need to insert the full connect string:
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = repsit01.sit.sor)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = REPSIT01))
)
since it doesn't get me in if I use just the SID, in my case REPSIT01 as showed below.
My tns entry is as follow:
REPSIT01 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = REPSIT01))
)
Any help would be much apprecciated.
Thanks in advance Ettore.
Try setting the environment variable TNS_ADMIN to the directory where your tnsnames.ora file resides.

Resources