Create TNS entry in TNSNAMES.ORA file with NETCA Utility

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)
    )
  )
  1. 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
Unknown's avatar

Author: SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

One thought on “Create TNS entry in TNSNAMES.ORA file with NETCA Utility”

Leave a Reply

Discover more from SmartTechWays - Innovative Solutions for Smart Businesses

Subscribe now to keep reading and get access to the full archive.

Continue reading