Oracle installations in a virtual machine can fail if you update your network settings, so be careful
Posted: (EET/GMT+2)
A C# application I'm developing uses an Oracle database, which I've installed into a VMware virtual machine. It is Oracle 10g (10.2.0) on top of Windows Server 2003.
My application was happily working on Friday, but after the weekend it stopped working altogether. From both the client and from the server console, I only got the error message "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor." or the System.Data.OracleClient.OracleException .NET exception. On my Windows XP with Finnish regional settings the error was "ORA-12514: TNS: kuuntelija ei tällä hetkellä tunne palvelua, jota pyydettiin yhteyskuvaajassa."
How and why did this all happen? All I can come up with is that I updated the VMware Tools inside the virtual machine after Oracle was installed, and that must have changed some of the network settings that Oracle binds to. I don't know Oracle well enough to solve the issue, so my resolution was to return to a previous snapshot with the older VMware Tools still installed. This solution worked well, and immediately the error disappeared.
Another Oracle tip: the crucial TNS (Transparent Network Substrate, I'm told) is a text file that on Oracle 10g lives on this path on the client:
C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN\tnsnames.ora
The configuration file is most easily edited with the GUI tools (Java based), but in case you need an example, here's an example of such a file:
MY-DATABASE-NAME =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost.domain.local)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
Keywords: Oracle 10g, network problem, virtual machine, ORA-12514 error.