Oracle prompt ORA-12154: TNS: Unable to parse the specified connection identifier ocienvcreate failed, return code is-1, but error message text is not available

Source: Internet
Author: User
Tags oracle developer

Install the Oracle client on ASP.. net. DLL, which I have encountered before. Just reinstall the client and I am using a 2000 Professional System ). Later, I went to the Oracle official website to find a solution and downloaded Oracle Developer Tools for Visual Studio. net 10.1.0.4.0 (ODT for. net), after installing it, you can. net browsing the Oracle database, it is estimated that you can browse the Oracle database, you should be able to operate the Oracle database, advocating that the ODT for. net installation, it is true that ASP on his machine. netProgramOracle can be connected normally. This is the problem. The system was installed for a whole day yesterday.

This morning his problem has just been resolved, this afternoon I am out of the problem, the connection to Oracle reported an error, the information is as follows "ORA-12154: TNS: unable to resolve the specified connection identifier ", go to Google and search for some English websites. The answer is to modify tnsname. ora can fix the connection. I checked the file and did not find any problem.

It is estimated that ODT for vs is installed.. net, oraclehome and oraclesid are repeated or invalid. When we look at the registry, there is indeed a problem. We found that the ORACLE_HOME path under hkey_localmachine \ Software \ oracle was changed to E: \ Program Files, my oracle is installed in the E: \ oracle directory, so I changed this and tried again. The system also restarted and it still didn't work. Later I wanted to delete the ODT, therefore, Oracle Developer Tools cannot be found in the control panel, and ODP for is found.. net. The previously installed Oracle Developer Tools directory (E: \ oracle \ product \ 10.1.0 \ client_1) is still not deleted, so you can manually delete this directory, OCI prompt. the DLL is in use and cannot be deleted. If you try to rename the directory, the name is successfully named. Restart the system, run the ASP. NET client, and connect to the Oracle database.

To sum up, after installing Oracle Developer Tools, the error "ORA-12154: TNS: unable to resolve the specified connection identifier" is reported as follows:

1. Check the registry, ORACLE_HOME under hkey_localmachine \ Software \ oracle. If not, change it to correct;

2. uninstall ODP. net (or uninstall ODT. net, ODT contains ODP, ODT is. net is an integrated plug-in for connecting to and browsing Oracle databases, and provides drag and drop operations on Oracle databases, similar to. net for the resource manager of SQL Server );

3. If the ODT for. Net directory still exists, delete or rename the directory;

Restart the system and re-connect the ASP. NET program. If the same error persists, let's take a look. I suggest you reinstall oracle.
Cause analysis: the system was originally installed with Oracle 10g 10.1.0, and 10.2.0 was installed before it was restarted. As a result, the listener could not be started, but it still pointed to the location of 10.1.0, the listener cannot be started.

Processing Process:
1. Search for the Registry, point the listener to a new location, restart the service, and OK;
2. PL/SQL developer cannot be connected. Other methods are normal. Uninstall ODP for. Net, which was originally installed on another logical disk, and reinstall it to the same location as Oracle 10.2.0. When the system is restarted, the developer still reports an error. However, the error message is blank.
3. After the developer settings are changed, go to tools> preferences... settings. In the connection under ORACLE, set Oracle Home and OCI libiary to NULL for automatic detection. The connection is normal and the problem is solved.

2. Application errors:

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.

 

 

In addition, ifOcienvcreate failed, returnCode-1, but the error message text is unavailable

1. Configure tnsnames. ora. Many configuration methods are available online.

2. Complete environment variable configuration. There are also a lot of environment variable configurations online, which are not listed here

3. The most important thing is to add the following key values to the Registry.

[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ environment]

"LD_LIBRARY_PATH" = "F: \ * \ bin"

"Nls_lang" = "american_america.zhs16gbk"

"Tns_admin" = "F: \ * \ bin"

The specific path is modified according to the actual situation. After the following key values are added to the registry, the program is re-debugged and successfully passed.

From:Http://www.cnblogs.com/dashan9zj/archive/2009/07/26/1531499.html

After completing the above steps, I found that my Oracle still cannot be connected.

Through an articleArticleI suddenly realized that my IIS was not fully installed? Then reinstall IIS, according

Http://www.cnblogs.com/darwinux/archive/2009/11/15/1603489.html

. With excitement, I re-opened vs2005 and ran the program. Still not ......

Finally, almost desperately use the Administrator to restart vs2005, and then click debug.

Actually passed

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.