Oracle cannot connect the database with SQL

Asked By 0 points N/A Posted on -
qa-featured

Hello Experts, Being an oracle developer it’s very hard to handle such problems. I know this is very common thing but I have problem in that now. The problem is I am not able to connect the database with SQL, I tried again the same error is appearing. The database is locally located so I don’t need any permission to access. What will be the problem? Please explain it. Thanks.

Error Image:

Words in the Error Image:

Error encountered

An error was encountered performing the requested operation:

Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

Vendor code 12505

SHARE
Answered By 10 points N/A #179417

Oracle cannot connect the database with SQL

qa-featured

The problem probably occurred owing to incorrect configuration of the oracle database server. LISTENER on the Oracle database seems to have not properly configured.

You may try to make following changes to your “ listener.ora” file.

Assuming your existing entry contains the following (assuming database name “oracle”): –

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = SERVERNAME)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = ABC1521))
)
)
ADR_BASE_LISTENER =

Replace it with

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = ))
(PROGRAM = extproc)
)
(SID_DESC=
(GLOBAL_DBNAME=oracle)
(ORACLE_HOME=)
(SID_NAME=oracle)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = ABC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = SERVERNAME)(PORT = 1521))
)
)
ADR_BASE_LISTENER =

Restart the listener service and try.

Related Questions