Solutions to Common Errors of Oracle Database TNS

Source: Internet
Author: User

1. ORA-12541: TNS: No listener

Cause: the listener is not started or damaged. If it is the former, run the net start OracleOraHome10gTNSListener command (the name may be different). If it is the latter, you can add a listener to the "Listener Configuration" in the "Net Configuration Assistant" tool wizard. (You do not need to write any information. You may need to delete all listeners before adding them !)

2. ORA-12500: TNS: The Listener cannot start a dedicated server process or ORA-12560: TNS: protocol adapter Error

Cause: ORACLE Database Service is not started. Run the net start ORACLESERVICEORADB command (ORADB is the database name. If the problem persists, proceed to the following section.


3. If the database service fails to be started, the registry key value may be corrupted. The best practice is to perform the following two steps:


1) ORADIM-DELETE-SID oradb deletes database service items


2) ORADIM-NEW-SID oradb adds database service items


Note: if an error occurs during this process, restart the computer!


4, ORA-12154: TNS: can resolve the service name


Cause: the network service name of ORACLE is not correctly configured. Use "Local Network Service name Configuration" in the "Net8 Configuration Assistant" tool Wizard to configure TNS. If the problem persists, proceed to the following section.


5. ORA-1034: TNS: ORACLE unavailable


Cause: the ORACLE Database Service is correctly started, but the database is not opened!


Run the following command:


1) svrmgrl start the Service Manager


2) connect internal logs in as internal


3) startup open the database


6. ORA-12560: TNS: protocol adapter error (stubborn)


Cause: unknown.


Solution: Be sure to activate the Windows Task Manager, kill oracle.exeand oradim.exe processes, write your own ora_startup.bat, and execute it!


PS:


1. ora_startup.bat:


Net start OracleOraHome81TNSListener


Net start ORACLESERVICEORADB


Svrmgrl is generally not used, but sometimes it is indispensable. For detailed steps, see step 1.


2. ora_shutdown.bat:


Net stop OracleOraHome81TNSListener


Net stop ORACLESERVICEORADB


3. for ORACLE service names, see service names starting with ORACLE in "services" in "Administrative Tools"



1. TNS-12154 Error or ORA-12154


Feature: SQL * NET does not find a connection string or Alias


Cause 1: (1) the TNSNAMES. ORA file is not found. The default path of this file is:


Windows 95/98 client


SQL * Net 2.x-ORAWIN95NETWORKADMIN


Net8-ORAWIN95NET80admin


Net8i-ORACLEORA81NETWORKADMIN


Windows NT client


SQL * Net 2.x-ORANTNETWORKADMIN


Net8-ORANTNET80ADMIN


Net8i-ORACLEORA81NETWORKADMIN


UNIX Client


$ ORACLE_HOME/NETWORK/ADMIN


Or/etc


Or/var/opt/oracle


. Set TNS_ADMIN on the client


Set TNS_ADMIN. TNS_ADMIN to point to the location of the TNSNAMES. ORA file in the Registry HKEY_LOCAL_MACHINESoftwareOracle.


Measure: Check the file location according to the preceding instructions.


Cause 2: (2) the content format in the TNSNAMES. ORA file is incorrect.


Measure: Check the file format. The standard format is as follows:


DEV1.WORLD =


(DESCRIPTION = (ADDRESS_LIST =


(ADDRESS = (PROTOCOL = TCP) (Host = 145.45.78.56) (Port = 1521 )))


(CONNECT_DATA = (SID = ORCL )))


Cause 3: (3) TNSNAMES. ORA is inconsistent with SQLNET. ORA


Measure: The SQLNET. ORA format is as follows:


TRACE_LEVEL_CLIENT = OFF


SQLNET. AUTHENTICATION_SERVICES = (NONE)


NAMES. DIRECTORY_PATH = (TNSNAMES)


AUTOMATIC_IPC = OFF


Because there is no NAMES. DEFAULT_DOMAIN = world, the DEV1.WORLD connection string cannot be connected. You can add


DEV1 =


(DESCRIPTION = (ADDRESS_LIST =


(ADDRESS = (PROTOCOL = TCP) (Host = 145.45.78.56) (Port = 1521 )))


(CONNECT_DATA = (SID = ORCL )))


In this case, you can connect.


2. NL-00462 Error or ORA-00462


Feature: The Listener cannot be started.


Cause: the content of the LISTENER. ORA file is incorrect, such as mismatched brackets, incorrect parameter names, and redundant spaces.

  • 2 pages in total:
  • Previous Page
  • 1
  • 2
  • Next Page

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.