Add TNS entry in TNSNAMES.ORA file with NETCA ( Oracle Net Service Configuration ) in Oracle Client
Make a TNS entry in TNSNAMES.ORA file with NETCA Utility
TNSNAMES.ORA is a configuration file that the Oracle database Server/Client uses for the connection between users and applications with the Oracle Database. Location of file
tnsnames.ora file: Create following entry with NETCA utility
PDB1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = PDB1)
)
)
- Open the command prompt and type the NETCA command to open the NETCA utility:

2. NETCA window open as shown below. Choose the 3rd option for TNS Entry ” Local Net Service Name Configuration”.

3. To add a new TNS Entry, click ADD and press next.

4. Select the Service Name you want to choose according to your database.

5. Choose Hostname on which your Oracle database Server is installed. In my case, the same system I am using has an Oracle database. I choose the localhost and port number if you have a different port than the default one.

6. Click on the Next button if you want to perform the test then you can choose the Yes option.

7. Choose the Net Service Name

8. Do not want another service to configure select NO and press NEXT

9. Press Next.

10. Press Finish closing the window.

11. Go to the cmd and test the tns entry by using tnsping command:
tnsping <tns-entry created>
Example:
tnsping PDB1
One thought on “Create TNS entry in TNSNAMES.ORA file with NETCA Utility”