Oracle connection failures

Source: Internet
Author: User
Tags ibm db2 dedicated server oracle developer

Solution to Oracle tnsping failure after firewall is enabled on Windows 2008

1. solution:
Simply put, the Windows 1521 firewall has blocked the Oracle port. Just create and enable it. Of course, if your listener is another port, open the other ports as follows.

In cmd, enter:

C:/users/Administrator> netsh firewall set portopening TCP 1521 "oracle"

2. ORA-12154: TNS: the specified connection identifier cannot be resolved:
TNS-03505: unable to resolve Name:
Recently, after Oracle Developer Suite has been installed, you cannot log on to the system, enter an account logon error: ORA-12154: TNS: failed to parse the specified connection identifier.

Generally, this is because the configuration file does not contain the corresponding instance name. Then I enter C:/tnsping myoracle (My ora Instance name) to view tnsnames. ora and sqlnet. ora is configured correctly, the result is an error, prompt: TNS-03505: unable to resolve the name indicates that the configuration file is incorrect.

Then I checked the % ORACLE_HOME %/db_1/Network/admin/tnsnames. ora file and found that it contains the name of the instance I want to log on. I am trying the tnsping command and found the parameter file sqlnet. ora is not the sqlnet. ora, but sqlnet under the Network folder under the Oracle Developer Suite Directory. ora file, put tnsnames under the installation directory. copy the instance configuration content in Ora. OK.

Myoracle =
(Description =
(Address = (Protocol = TCP) (host = 127.0.0.1) (Port = 1521 ))
(CONNECT_DATA =
(Server = dedicated)
(SERVICE_NAME = myoracle)
)
)

As to why the parameter file in the directory is changed to be used, we have not studied how to handle it. Write down the processing process first

A hard-to-think cause of ORA-12154
Use oracleclient. when oracleconnection (I connected Oracle 9i, other versions are unknown), if your execution directory is too long or has parentheses (no symbols are examined ), so even if your service name is correct, it will cause ORA-12154 problems "TNS: unable to handle service name", when this problem occurs, please also consider this cause.

Http://render.cnblogs.com/archive/2005/10/13/253688.aspx

If the tnsnames file is correctly written, however, tnsping cannot be pinged:
Http://www.oracleblog.cn/working-case/tnsping-block/
Http://www.oracleblog.cn/tag/11g/

3. ORA-12154: TNS: the specified connection identifier cannot be resolved

Check whether there is a space before the TNS name in your tnanames. ora. If yes, delete it. Haha, I have encountered such a Bt problem before.
Set
(CONNECT_DATA =
(SERVICE_NAME = hxdb)
)
Change
(CONNECT_DATA =
(SID = hxdb)
)
Look

Toad for Oracle Free Download
Http://www.innovatedigital.com/node/319/done? SID = 1, 375

4. Solve ORA-12560: TNS: protocol adapter error, share with you

Today, I encountered the problem of ORA-12560: TNS: protocol adapter error. After some efforts, the problem has been solved and shared with everyone.
There are three reasons for the problem that caused the ORA-12560: TNS: protocol adapter error:
1. The listening service is not started. On Windows, perform the following operations: start --- program --- management tools --- Service, open the service panel,

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, XXXX is your database Sid.
3. Registry issues. Regedit, and then enter HKEY_LOCAL_MACHINE/software/Oracle/home0 to set the environment variable oracle_si

D is set to xxxx, XXXX is your database Sid. Or the right few my computers, properties -- Advanced -- environment variables --- system variables -- New

, Variable name = oracle_sid, variable value = XXXX, XXXX is your database Sid. Or before entering sqlplus, under command line

Set oracle_sid = XXXX, XXXX is your database Sid.
After the above steps, you can solve the problem.

5. TNS: solution to protocol adapter errors
Http://hi.baidu.com/8741659422/blog/item/62333d300112699fa9018e2d.html

No one would deny that Oracle is one of the most influential database products in the world; but good things do not seem to be so useful (it seems at first ), even a bit heartless-it always gives layman a heartless error number. The following is my personal summary, which is useful and I hope to give some inspiration to beginners.

A joke about "good things do not always look so useful (it seems so early)": before attending IBM DB2 512 and 513 training, I downloaded the installer on the campus network, however, for a few of us to study it for a long time, I do not know which file is the installation file, but it was not installed successfully. Finally, I agree that this training is really necessary! I learned later that we downloaded 4 Linux!

[Take 8.1.6 as an example]:

1. ORA-12541: TNS: No listener

Cause: the listener is not started or damaged. For the former, run the Net start oracleorahome81tnslistener command (the name may be different). For the latter, you can add a listener to "Listener Configuration" in the "net8 configuration assistant" tool wizard. (no information is required. You may need to delete all listeners before adding them !)

2. ORA-12500: TNS: The Listener cannot start the 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. 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

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

Http://lelong.javaeye.com/blog/593225
I have installed Oracle10g In the XP system, but the following error occurs when I log on to the system: SQL> conn System
Enter Password :*********
Error:
ORA-12560: TNS: protocol adapter Error
How can this problem be solved?

------ Solution --------------------------------------------------------
Look at a service like oracleservicexxxx
------ Solution --------------------------------------------------------
Adapter error. Check the listener and service and check whether the configuration is correct.

Oracle has become a Web-Based Enterprise Manager since 10. You can also use third-party tools to manage your database, PL/SQL or toad

Toad for oracle9.5
:
Http://www.orbitsw.net/toad/dls/TOAD%20for%20ORACLE/Toad%20for%20Oracle%209.5.exe

Registration Code:
Key: 0-63920-07153-29060-03749-
Site: admin_88

You can only install the Oracle client and then install PL/SQL to manage and connect to your database.

After the Oracle client is installed, open sqlplus and you will be asked to enter the user name and password.

ORA-12560: TNS: protocol adapter error.

You can connect to the instance in this way: you must add an instance to connect to the instance normally.

Enter the User name: system @ soshoo

Enter the password :******

In this way, you can connect.

My notes:

Oracle obtains the default tablespace of the current user:
Select username, default_tablespace from user_users;

How to obtain the session ID of the current Oracle user:

1. Environment Variable: Select userenv ('sid ') from dual; get Sid directly. In this way, note that this environment variable is available only in Versions later than Oracle 10 Gb.

2. Sometimes v $ mystat has permissions. Select Sid from V $ mystat where rownum = 1;

The previous one is obviously simple.
Select * from V $ instance; obtain the on-demand instance

C:/Documents and Settings/zianed> tnsping orcl

If @ is included in the password to connect to Oracle, add ""

Http://blog.csdn.net/aloha191/archive/2009/05/08/4161372.aspx
Http://space.itpub.net/12778571/viewspace-624461 changes Oracle Character Set

After installing Oracle, you can see two services in the service: oracledbconsole and oracleservice, which will keep up with the database name or service name;

Oracledbconsole is a em Service
Oracleservice + (servicename) is the service of the instance.

As long as oracleservice is started, we can use PL/SQL to connect to the database.

Sometimes PL/SQL cannot connect to the database instance due to IP address problems. This was the case last time, because the oracleservice was started because the network cable was not installed, PL/SQL cannot be connected either. In this case, we need to configure in "program" --> "oracle-oradb10g_home1" --> "configuration and migration tools" --> "net manager, there is a listener and service name in it. We 'd better use the "computer name" for the host, and the default "localhost" for the system ", we need to create a service name for the database in the service name, and then register it. After registration, save it, And PLSQL should be connected.

If the oracledbconsole is not started, http: // localhost: 5500/EM cannot be opened. However, the problem that I did not plug in the network cable last time caused the oracledbconsole to fail to start, an error also occurred in the previous article.

My host has an oracle11 server, a client, and PL/SQL. As a result

Tnsping Instance name: The name cannot be resolved.. Therefore, the OEM can enter the instance, while SQL/plus cannot connect to the instance for a long time without knowing the cause. The client is uninstalled without being able to cope with the problem. However, after this operation, SQL/plus can even connect to the instance and tnsping.

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.