|Lesson 7||Configuring a Oracle Net client |
|Objective||Connecting a client to a remote instance|
Configuring Oracle Net Client
Configure a client PC so that it can connect to an Oracle instance over the network.
Now that you have the Oracle Net listener on the server configured to accept connection requests for an
instance such as your
COIN database, it's time to configure a client PC to connect to that instance.
If you are doing this course with just one PC, and most people probably are, this lesson is still relevant. You should have client software on your PC,
and it can be configured just the same as if it were on some other PC on the network.
Oracle is very flexible, and it is entirely possible to have both client and server software running on the same machine.
To configure a client PC, you add an entry for the database instance to a file named tnsnames.ora that resides on the client PC.
The tnsnames.ora file resides in the network/admin directory underneath the Oracle home directory.
The full path and filename will typically be one of the following:
Oracle Net Configuration Assistant
You can edit the tnsnames.ora file by hand (and experienced DBAs often do just that) but for now you will find it easier to run an Oracle supplied program known as
Oracle Net Easy Config, which comes with the default client install.
Oracle Net Easy Config is a wizard-based program that makes the changes to tnsnames.ora for you.
Configuring Oracle Net
The following code shows Oracle Net Easy Config being used to add an entry for the
(ADDRESS = (PROTOCOL = TCP)(Host = 10.11.49.239)(Port = 1521))
(SID = COIN)
(SERVER = DEDICATED)
When you follow the steps that you just practiced in the above simulation, Easy Config will add an entry to your tnsnames.ora file. Click the View Code button to see what this would look like.
In our example, when you connect to a database using Oracle client software, you would ask to connect to a service named COIN.
Net8 will take that service name, read the tnsnames.ora file, and find out that the service named
COIN actually points to a SID named
COIN on the host with the
TCP/IP address of 10.11.49.239. That's all there is to it.
Configuring Net8 Client - Exercise