Oracle 10gr2 is installed in fedora. After installation, netca is used to create a listener. The default listener and 1521 ports are not used when the listener is created. Instead, listener_dell and 1522 ports are used, the terminal is displayed in $ ORACLE_HOME/Network/admin/tnsnames. add a TNS alias under ora.
Dell = (description = (address_list = (address = (Protocol = TCP) (host = 127.0.0.1) (Port = 1522) (CONNECT_DATA = (Server = dedicated) (SID = Dell ))) |
After adding, log on as follows:
Sqlplus/nolog Connect Scott/[email protected] |
After logging on, the error is reported, ORA-12505, the listener said the error is still a good solution, the results check the listener is also normal to start, but it is unable to follow @ Dell to log on, tnsnames. in ora, SID = Dell is changed to SERVER_NAME = Dell or the error ORA-12505 is always reported, TNS: Listener does not currently know of SID given in connect descriptor. Then we found that the sqlnet. ora file is not in the $ ORACLE_HOME/Network/admin/directory, run netca, set the naming method, and the sqlnet. ora file is available after running. The content is as follows:
More sqlnet. oranames. directory_path = (tnsnames) |
Log on again and find the same error. So I suddenly thought that Oracle would always use the listener which was not started to provide the listener information for Oracle, and I didn't use the default listener name, so this error was caused, so I gave the listener to the listener file. add Sid information to ora. Listener_dell = (description_list = (description = (address = (Protocol = TCP) (host = Avon) (Port = 1522) (address = (Protocol = IPC) (Key = extproc0) sid_list_listener_dell = (sid_list = (sid_desc = (sid_name = plsextproc) (ORACLE_HOME =/u01/APP/Oracle/product/10.2.0/db_1) (program = EXTPROC) add Sid information (see the blue bold font) sid_list_listener_dell = (sid_list = (sid_desc = (sid_name = plsextproc) (ORACLE_HOME =/u01/APP/Oracle/product/10.2.0/db_1) (program = EXTPROC ))
(Sid_desc =
(Global_dbname = Dell)
(ORACLE_HOME =/u01/APP/Oracle/product/10.2.0/db_1)
(Sid_name = Dell)
)) Save and exit after adding: If WQ is used for testing or an error is reported, I found that SERVER_NAME is set in tnsnames. ora, so I changed it to SID = Dell for testing again.
Sqlplus/nolog SQL> conn Scott/[email protected] Connected. |
OK. Everything is normal. Note: The same attempt was made in windows. It is found that if listener is not used as the default listening name port and port is not 1521, this error will also occur, and the solution is the same as above. However, the listener port is not set to 1521. C: \ windows \ system32> lsnrctllsnrctl for 32-bit windows: Version 10.2.0.3.0-production on 13-9-2010
6: 34 copyright (c) 1991,200 6, Oracle. All Rights Reserved. Welcome to LSNRCTL. Type "help" for information.
LSNRCTL> Status
Connecting to (address = (Protocol = TCP) (host =) (Port = 1521 ))
TNS-12541: TNS: no listeners
TNS-12560: TNS: protocol adapter error.
TNS-00511: no listeners
32-bit Windows Error: 61: Unknown error
LSNRCTL> set current_listener listener_demo
The current listener is listener_demo.
LSNRCTL> Status
Connecting to (description = (address = (Protocol = TCP) (host = Scott-PC) (Port = 1522 )))
Listener status
------------------------
Alias: listener_demo
Version tnslsnr for 32-bit windows: Version 10.2.0.3.0-produ
Ction
Start Date: 13-9-2010 23:17:13
Normal operation time 0 days 0 hours 9 minutes 41 seconds
Tracking level off
Security on: Local OS Authentication
SNMP off
Listener parameter file D: \ oracle \ product \ 10.2.0 \ db_1 \ Network \ admin \ listener. o
RA
Listener log file D: \ oracle \ product \ 10.2.0 \ db_1 \ Network \ log \ listener_dem
O. Log
Listener endpoint overview...
(Description = (address = (Protocol = TCP) (host = Scott-PC) (Port = 1522 )))
(Description = (address = (Protocol = IPC) (pipename = \. \ PIPE \ extproc0ipc )))
Service summary ..
The Service "plsextproc" contains one routine.
Routine "plsextproc", status unknown, contains one handler of this service...
Command executed successfully
The status of the listener when a ORA-12505 error occurs,
The following figure shows the status after the listener is restarted.LSNRCTL> set current_listener listener_demo
The current listener is listener_demo.
LSNRCTL> stop
Connecting to (description = (address = (Protocol = TCP) (host = Scott-PC) (Port = 1522 )))
Command executed successfully
LSNRCTL> Start
Start tnslsnr: Please wait... tnslsnr for 32-bit windows: Version 10.2.0.3.0-Production
The system parameter file is D: \ oracle \ product \ 10.2.0 \ db_1 \ Network \ admin \ listener. ora.
Write the log information of D: \ oracle \ product \ 10.2.0 \ db_1 \ Network \ log \ listener_demo.log
Listener: (description = (address = (Protocol = TCP) (host = Scott-PC) (Port = 1522 )))
Listener: (description = (address = (Protocol = IPC) (pipename = \\. \ PIPE \ extproc0ipc) connecting to (description = (address = (Protocol = TCP) (host = Scott-PC) (Port = 1522 )))
Listener status
------------------------
Alias: listener_demo
Version tnslsnr for 32-bit windows: Version 10.2.0.3.0-produ
Ction
Start Date: 13-9-2010 23:35:14
Normal operation time 0 days 0 hours 0 minutes 6 seconds
Tracking level off
Security on: Local OS Authentication
SNMP off
Listener parameter file D: \ oracle \ product \ 10.2.0 \ db_1 \ Network \ admin \ listener. o
RA
Listener log file D: \ oracle \ product \ 10.2.0 \ db_1 \ Network \ log \ listener_dem
O. Log
Listener endpoint overview...
(Description = (address = (Protocol = TCP) (host = Scott-PC) (Port = 1522 )))
(Description = (address = (Protocol = IPC) (pipename = \. \ PIPE \ extproc0ipc )))
Service summary ..
The Service "plsextproc" contains one routine.
Routine "plsextproc", status unknown, contains one handler of this service...
The Service "Demo" contains one routine.
Routine "Demo", status unknown, contains 1 handler of this service...
Command executed successfully
ORA-12505 troubleshooting