Oracle Net Manager with Examples
In this article, I am going to discuss Oracle Net Manager with Examples. Please read our previous article where we discussed Oracle Net Configuration Assistant with Examples.
Oracle Net Manager
Previously we learned about netca. Now, we will learn about the net manager(netmgr). The purpose of the net manager is to manage the listener file and tnsnames file and sqlnet.ora. In order to open a terminal, we have to open a terminal and enter the command “netmgr”.
This is how we open the net manager. From the above image, we can see the Oracle Net configuration is local. The option local indicates our local server. If we expand the Local, we will find multiple options.
From the above image, we can see multiple options like Profile, Service Naming, and Listeners. Listeners contain all the listeners that are mentioned in the listener.ora. The Service Naming contains all the service entries present in the tnsnames.ora. Let’s go ahead and expand the listeners.
We can see listeners named LISTENER, LISTENER19c, and LISTENER_PDB. If you click on any of the listeners you will find more details about that listener. Let’s just check the details of the listener LISTENER_PDB.
We can see the hostname, port number, and protocol.
How to Create a new listener in oracle?
In order to create a new listener. We have to click on Listeners and then on the left side, we can see a + icon we have to select that + icon to create a new listener.
Click on the + icon. You will receive a popup to enter the listener name.
We are entering the listener name as LISTENER_NEW and clicking Ok. A new listener will be added to the listeners list.
If we select LISTENER_NEW then we can configure the listener by clicking the Add Address.
Click on add address.
We are entering the hostname as oracletest.com and the port number as 1509. We are selecting the protocol as TCP/IP. If we need to save this entry click on the file.
Click on Save Network Configuration. Then this configuration will be saved. Now, let’s go ahead and check the listener.ora to check whether the listener is created or not.
We can see that the LISTENER_NEW entry is added. We can see the hostname as oracletest.com and the port number as 1509. This tool added a new line called ADR_BASE_LISTENER_NEW. This is Automatic Diagnostic Repository. It only stores the connection log file.
How to add a new entry in tnsnames.ora?
Open the net manager and click on the Service Naming category.
We can see there are multiple entries in Service Naming like jayadb, jayapdb, jayapdb1, and test_db. Let’s go ahead and create a new entry in tnsnames.ora so click on the + icon.
We are giving the service name TEST_DB1. Click Next.
We are selecting the protocol as TCP/IP protocol. Click Next. We have to enter the hostname and the port number.
We have entered the hostname as oracletest.com and the port number as 1521. Click Next. We have to enter the service as TEST_DB1.com and for the connection type we have to select Dedicated Server because we have only one server.
Click Next and click Finish.
Once you click finish you will be on the net manager homepage. Click on the file and save the configuration.
Now, that we have saved the new tnsentry. Let us go ahead and check the entry is created in the tnsnames.ora file or not. In the tnsnames.ora file we can see the tns entry is TEST_DB1 and the hostname is oracletest.com and the port number is 1521.
Note: We have multiple options for creating the entry in listener.ora and tnsnames.ora files. It is up to us how we can create effectively.
In the next article, I am going to discuss Database Link in Oracle with Examples. Here, in this article, I try to explain Oracle Net Manager with Examples and I hope you enjoy this Oracle Net Manager with Examples article.