ORA-12514: TNS, the listener currently cannot identify the Service requested in the connection Descriptor

Source: Internet
Author: User

Recently, When configuring the stream replication environment for Oracle 11g, I encountered a problem. After shutting down the database (shutdown immediate), I connected the database through SQL Plus: conn sys/his @ orc0 as sysdba, the following error occurs:
ORA-12514: TNS: The Listener currently cannot identify the Service requested in the connection Descriptor
By restarting the service, you can start the database and log on to the database again. That is to say, you cannot connect to the server when the database is disabled.
I thought it was a problem with the system environment variable Oracle_SID configuration. Because the machine has multiple instances, it still cannot be connected after a while. Later, I found out that:
After Oracle9i, the background process PMON automatically registers the service name defined in the system parameter SERVICE_NAMES In the listener. The default value of SERVICE_NAMES is DB_NAME + DOMAIN_NAME. You do not need to specify the service name of the listener in the listener Configuration File listener. ora. However, when the PMON process is not started when the database is closed, the Instance name of the listener will not be automatically registered, so the use of sqlplus sys/his @ orc0 as sysdba will have a ORA-12514 error.
If you specify the name of the listener instance in the listener. ora file, the database can still be connected even if it is disabled.
Listener. ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS = ONLY: D: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1 \ bin \ lrlr11.dll ")
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL.38.92.91)
(ORACLE_HOME = D: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 202.38.92.91) (PORT = 1521 ))
)
)
ADR_BASE_LISTENER = D: \ app \ Administrator
 
The bold parts above are added. After modification, restart the listening service.
Appendix: Enter set display verbose in lsnrctl, and then run the Command service to check whether the service status is READY, which indicates the service name automatically registered by PMON, UNKNOWN indicates that the service is manually stored in LISTENER. database Service configured in ORA.


Author: "Zuo Luo CTO"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.