A few days ago, colleagues installed Oracle client, under the ASP.net how not even to the Oracle database (operating system is XP, error can not find OIC.DLL, before I have encountered, reload the client is good, I used the professional system )。 Then I went to the Oracle website to find a solution, download Oracle Developer Tools for Visual Studio. NET 10.1.0.4.0 (ODT for vs.net), put it on, You can browse Oracle databases in. NET, estimate that you can browse Oracle databases, you should be able to manipulate Oracle databases, and preach Tongshi odt for VS. NET installed, sure enough his machine asp.net program can connect to Oracle, is the problem, yesterday installed a whole day of the system. This morning his problem has just been solved, this afternoon I have a problem, connect Oracle times wrong, the information is as follows "Ora-12154:tns: Unable to resolve the specified connection identifier", to Google search everywhere, See some English web site's answer is to modify the Tnsname.ora can repair the connection. Checked and found no problem with this file.
The estimate is to install ODT for VS. NET, Oraclehome and Oraclesid have duplicate or invalid, to the registry to see, sure enough there is a problem, found hkey_localmachine\software\oracle the oracle_home path below was changed to E:\ Program Files, my Oracle is installed in the E:\oracle directory, so the change, and then try again, the system also started, still ineffective, and then want to simply delete the ODT, so to the control Panel to find Oracle Developer Tools, how can not find, To find the ODP for. Net, to uninstall this, the previously installed Oracle Developer Tools directory (E:\Oracle\product\10.1.0\Client_1) is still not deleted, so manually delete this directory, Hint OCI.dll is in use, unable to delete, and then try to rename this directory, incredibly named success. It then restarts the system and then runs the ASP.net client to successfully connect to the Oracle database.
To sum up, after the solution of Oracle Developer Tools, the "ORA-12154:TNS: Unable to resolve the specified connection identifier" error is resolved as follows:
1. Check the registration form, hkey_localmachine\software\oracle The following oracle_home, if not, modify to correct;
2. Uninstall the ODP for. NET (or uninstall ODT for. NET, ODT contains the ODP, ODT is a vs.net integrated plug-in for connecting and browsing the Oracle database, and provides drag and drop operations on the Oracle database, similar to vs.net for SQL Server's resource manager);
3. If odt for. NET directory still exists, delete or rename this directory;
Then reboot the system, reconnect the ASP.net program, and if you have the same error, I suggest we reinstall Oracle.
Analysis Reason: The system originally installed is the Oracle 10G 10.1.0, after unloading has not restarted has installed 10.2.0, the result first the listener does not come, unexpectedly still pointed to 10.1.0 position, the listener certainly cannot start.
Processing process:
1, find the registry, the listener point to the new location, restart the service, OK;
2, Pl/sql developer or not connected, other ways are normal. Load the ODP for. Net load that was originally installed on another logical disk to the same location as the Oracle 10.2.0. Reboot the system, developer or error, but some times the wrong message is empty.
3, because developer settings have changed, into the menu tools "PREFERENCES ..." setting, in Oracle connection, the Oracle home and OCI libiary are set to NULL, which is automatic detection. The connection is normal and the problem is solved.
Second, the application of the error:
A difficult cause to think of causing ORA-12154
When using oracleclient.oracleconnection (I am not connected to Oracle 9i, other versions are unknown), if your execution directory is too long or has parentheses, etc. (without examining some symbols), then even if your service name is right, it can cause ORA-12154 problems. "TNS: Unable to process service name", please also consider this reason when this problem occurs.