SQL*Net For PC's
- Oracle SQL*Net Setup on PC's
Customers frequently have problems getting SQL*Net and ODBC set up on a PC. Most often these problem is in configuring SQL*Net.
First verify that you can ping the server from the PC. Ping is available on NT and 95 systems from the command prompt in a MS-DOS window. If the ping does not work using the server's name, you can use the IP address in the SQL*Net setup where it asks for the server's name.
Oracle is rapidly changing their products and tools on PC's. Under Win 3.11 it was a GUI application 'Oracle Ping' in the Oracle folder. On 95/NT use the command line app. called tnsping.exe in the orant/bin directory.
After you've set up SQL*Net, run tnsping. Tnsping will tell you how it is attempting to connect to the database and how long it took if it is successful.
Using tnsping the PC sends its request to port 1521. The server listens on port 1526 (do a tail -25 /etc/services on the server to see the Oracle port assignments). Tnsnames.ora, the file that maps between the database name used by SQL*Net and ODBC on the PC and the network address and database name (SID) on the server, has two entries in the ADDRESS section for the IMS, one for port 1521 and one for port 1526. Remove the ADDRESS section (marked with #'s) for port 1521. Connections start working properly.
=======Here's an example of tnsnames.ora=========
#This is a SQL*Net Configuration file generated by SQL*Net Easy Configuration.
#Attention: Do not modify this file yourself.
#If you do, your SQL*Net Easy Configuration may not function properly.
####A bunch of stuff deleted from example####
# (ADDRESS =
# (COMMUNITY = tcp.world)
# (PROTOCOL = TCP)
# (Host = 18.104.22.168)
# (Port = 1521)
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = 22.214.171.124)
(Port = 1526)
(CONNECT_DATA = (SID = ims) (see note below)
========end of example==========
note: In Ontario releases (IMS 1.x), the SID is ims. In the Canandaguia releases (IMS 2.0), the SID was changed to advantdb. The SID in the tnsnames.ora on the PC needs to be changed to reflect the name advantdb.
Because the tnsnames.ora has been modified by hand, Oracle Easy Configuration will refuse to work and will offer you the option to go back to the old (non-working) configuration.
Error messages you get until you get the TCP/IP and SQL*Net configurations right will be in the TNS series, e.g. TNS 03505.
TNS stands for Transparent Network Substrate, Oracle's way of hiding the details of networked database connections from the applications. The TNS information can optionally be stored in a database on the network, allowing databases to be moved from server to server without affecting the client's addressing.Symptoms: