Recently, when configuring Oracle 10G streaming replication environment, a problem was encountered, after shutting down the database (shutdown immediate), the database was connected via SQL Plus: Conn sys/his@orc0 as SYSDBA, the following error occurred:
Ora-12514:tns: The listener is currently unable to recognize the service requested in the connection descriptor
Starting the database by restarting the service, connecting again but successfully logging on, which means that the server cannot be connected when the database is shut down.
The beginning thought is the system environment variable ORACLE_SID configuration problem, because the machine has several instances, after a toss still cannot connect. Later, the information was found:
After oracle9i, the background process Pmon automatically registers the service name defined in the system parameter Service_names in the Listener, service_names defaults to Db_name+domain_name. Listener configuration file Listener.ora You do not have to specify a service name for listening. However, when the database is turned off and the Pmon process is not started, the listener instance name is not automatically registered, so a ORA-12514 error occurs using the Sqlplus sys/his@orc0 as SYSDBA.
If you specify a listener's instance name in the Listener.ora file, you can still connect even if the database is turned off.
Listener.ora
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = Plsextproc)
(Oracle_home = g:/oracle/product/10.2.0/db_1)
(program = Extproc)
)
(Sid_desc =
(global_dbname = ORCL)
(oracle_home = g:/oracle/product/10.2.0/db_1)
(sid_name = ORCL)
)
)
LISTENER =
(Description_list =
(DESCRIPTION =
(address = (PROTOCOL = TCP) (HOST = Zyk) (PORT = 1521))
)
)
The above bold parts for the added content, modified after the restart of the listening service can be.
Attach: By entering set display verbose in Lsnrctl and then through the command service, the service status is ready representing Pmon autoenrollment service name, and unknown indicates that the service is manual in Listener.ora The database service that is configured in.
NOTE: The Oracle Listener service must be manually restarted after the monitor is modified, and the Oracle instance service name
Add: Easy Four steps to configure Oracle database monitoring
Http://tech.ccidnet.com/art/1105/20070521/1085625_1.html