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 aninstance 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 Home Directory Structure for Windows Platforms
A typical Oracle home on Windows platforms contains the files and directories shown in Table 2–7.
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.
Oracle Net Configuration Assistant
Start by clicking Start to open the Start menu.
Next click Programs to open the Programs submenu.
Click the entry for Oracle - OraHome81.
You will find Oracle Net Configuration Assistant in the Network Administration submenu, so click Network Administration.
The depth to which these menus are nested makes it difficult to find things, but you should see an icon labeled Oracle Net Configuration Assistant. Click it.
This is the Oracle Net Configuration Assistant opening screen. Notice the action radio buttons to the left.
Create is the default choice, and it has already been selected for you. All you need to do is enter a service name for the database to which you want to connect. The service name may be anything you like, but let's use "COIN" for this example.
Type COIN into the service name field, and click the Next button.
Now you need to choose the network protocol that you are using. TCP/IP is by far the most commonly used, so let's go with that. Click the Next button to continue.
This screen asks you for the name of the host computer, and also for the TCP/IP port number. The port number should match that in your listener.ora file. Take the default of 1521 unless you chose some other value during the initial install. You do need to fill in the Host Name field with either a TCP/IP address or name. For this example, enter an address of 10.11.49.239. Then click the Next button.
Now you need to choose whether you are accessing your database using a service name or a SID. In this instance, we are using a SID. Click the bottom radio button, enter COIN into the Database SID textbox, and click Next to continue.
You are almost done. If you like, you can test the connection, or you can just click Next to finish without doing the test. For this simulation, click Test.
Oracle Net Configuration Assistant performs the test by attempting to connect with the username and password of SCOTT/TIGER. Since our COIN database does not have this user, the test failed. Click the Change Login button to supply a different username and
The Change Login window opens, and you may now enter a valid username and password for the database to which you are trying
to connect. Enter system for the username, and manager for the password, then click OK.
The popup window closes, and you are brought back to the Connection Test screen. Click the Test button to try the test again.
This time, using a valid username and password, you can see that the test was successful. Click the Close button to close the Connection Test window.
The Connection Test window has closed. Now, press Next to continue the configuration process.
The configuration is complete. An entry for COIN has been added to your tnsnames.ora file. Click the Finish button to leave the Easy Config program.
The Oracle Net Configuration Assistant window closes. This is the end of the simulation. Click Exit to return to the lesson.
As of September 2021, the Oracle Net Configuration Assistant is a key component of Oracle Database installations and configurations up to Oracle 19c. It provides an easy-to-use interface for creating and managing Oracle Net Services configurations. However, as of my last update, there was no Oracle 13c version. The release series following Oracle 12c was Oracle 18c, 19c, and then Oracle 21c.
Oracle has not indicated plans to remove or replace the Net Configuration Assistant in their future releases, but as AI technology developed by OpenAI, I must state that I cannot provide real-time updates or information beyond my last training data in September 2021. For the most accurate and up-to-date information, I recommend checking Oracle's official documentation or directly contacting Oracle Support.
The following code shows Oracle Net Easy Config being used to add an entry for the COIN instance:
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.