Collection of errors related to Oracle protocol adapter TNS and Solutions

Source: Internet
Author: User
Tags dedicated server
A new database was created in Oracle, And it was deleted today and then logged on to SQL * PLUS won't be logged on, with the ORA-12560: TNS: protocol adapter error. ORA-12560: TNS: protocol adapter error solution cause ORA-12560: TNS: protocol adapter errors cause three reasons: 1. the listening service does not start up. Windows Platforms

A new database was created in Oracle, And it was deleted today and then logged on to SQL * PLUS won't be logged on, with the ORA-12560: TNS: protocol adapter error. ORA-12560: TNS: protocol adapter error solution cause ORA-12560: TNS: protocol adapter errors cause three reasons: 1. the listening service does not start up. Windows Platforms

A new database was created in Oracle, And it was deleted today and then logged on to SQL * PLUS won't be logged on, with the ORA-12560: TNS: protocol adapter error.

Solution to ORA-12560: TNS: protocol adapter errors

There are three reasons for the problem that caused the ORA-12560: TNS: protocol adapter error:

1. The listening service is not started. On the windows platform, perform the following operations: start --- program --- management tools --- Service, open the service panel, and start the oraclehome92TNSlistener service.

2. The database instance is not started. On windows, perform the following operations: start --- program --- management tools --- Service, open the service panel, start oracleserviceXXXX, and XXXX is your database SID.

3. Registry issues. Regedit, and enter HKEY_LOCAL_MACHINE \ SOFTWARE \ ORACLE \ HOME0 to set the environment variable ORACLE_SID to XXXX. XXXX is your database SID. or on the right, my computer, property -- Advanced -- environment variable -- System variable -- New, variable name = oracle_sid, variable value = XXXX, XXXX is your database SID. or, before entering sqlplus, enter set oracle_sid = XXXX under command line, and XXXX is your database SID.

After the above steps, you can solve the problem.

========================================================

1. ORA-12541: TNS: No listener

Cause: the listener is not started or damaged. If it is the former, use the command net start OracleOraHome81TNSListener (the name may be different); if it is the latter, use "Net8 Configuration

Add a listener for "Listener Configuration" in the "Assistant" tool wizard (you do not need to write any information, all the way to OK. 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 the oracle.exeand oradim.exe processes, and write your own

Ora_startup.bat, run it!

PS:

1. My 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. My ora_shutdown.bat:

Net stop OracleOraHome81TNSListener

Net stop ORACLESERVICEORADB

ORACLE_HOME =/u01/app/oracle/product/8.1.6

Export ORACLE_HOME/directory containing Oracle software/

LD_LIBRARY_PATH =/u01/app/oracle/product/8.1.6/lib;

Export LD_LIBRARY_PATH

ORACLE_BASE =/u01/app/oracle

Export ORACLE_BASE/directory of Oracle software and Management Software/

ORACLE_SID = ORCL

Export ORACLE_SID/default database ID/

ORACLE_TERM = vt100

Export ORACLE_TERM

ORA_NLS33 =/u01/app/oracle/product/8.1.6/

Ocommon/nls/admin/data

Export ORA_NLS33/Supported languages/

PATH = $ PATH:/u01/app/oracle/product/8.1.6/bin

Export PATH

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.