Skip to content
Home » Oracle » How NETCA Add Net Service Name

How NETCA Add Net Service Name

Usually, we copy, paste and modify the block of a TNS entry in tnsnames.ora to create a new net service name for local naming.

For normal users who don't know how to manipulate tnsnames.ora, they can also add a new net service name by Net Configuration Assistant (NETCA).

In this post, we will introduce the way to create a new net service name by NETCA.

Windows

For windows platform, you may launch NETCA by clicking it on the menu.

NETCA on Windows Menu
NETCA on Windows Menu

Linux

For Linux or Unix platform, you may issue netca to launch it.

[oracle@test ~]$ netca

We choose "Local Net Service Name configuration".

NETCA - Local Net Service Name - Select (Client)
NETCA - Local Net Service Name - Select (Client)

As you can see, the first item has been disabled for client edition. For server edition, you may see more items like this:

NETCA - Local Net Service Name - Select (Server)
NETCA - Local Net Service Name - Select (Server)

In this case, we take the server edition for an example to reach our goal.

We would like to add a net service name.

NETCA - Local Net Service Name - Add
NETCA - Local Net Service Name - Add

We input the specific service name of a database, which is a name registered in the listener to receive connections from clients. If you don't know the database service name, you may ask your DBA for an answer.

NETCA - Local Net Service Name - Input DB Service Name
NETCA - Local Net Service Name - Input DB Service Name

TCP only would be fine.

NETCA - Local Net Service Name - Protocol
NETCA - Local Net Service Name - Protocol

You have to input the destination of the database server.

NETCA - Local Net Service Name - Input Hostname
NETCA - Local Net Service Name - Input Hostname

If you want to perform a connection test, you may choose it now.

NETCA - Local Net Service Name - Perform a Connection Test
NETCA - Local Net Service Name - Perform a Connection Test

Here we click the button of "Change Login".

NETCA - Local Net Service Name - Connection Test Page
NETCA - Local Net Service Name - Connection Test Page

Then input the user's credentials including username and password.

NETCA - Local Net Service Name - Input User Credential for Connection Test
NETCA - Local Net Service Name - Input User Credential for Connection Test

As you can see, the connection test is successful.

NETCA - Local Net Service Name - Connection Test Result
NETCA - Local Net Service Name - Connection Test Result

We input a new TNS name to be resolved by the configuration file tnsnames.ora of local naming.

NETCA - Local Net Service Name - Input TNS Name
NETCA - Local Net Service Name - Input TNS Name

If you have another TNS name needs to be created, you may click "Yes", otherwise, click "No".

NETCA - Local Net Service Name - Not Another
NETCA - Local Net Service Name - Not Another

The page notifies us that the new TNS name has been added.

NETCA - Local Net Service Name - TNS Name Added
NETCA - Local Net Service Name - TNS Name Added

We click on "Finish" to exit NETCA.

NETCA - Local Net Service Name - Finish
NETCA - Local Net Service Name - Finish

The output of NETCA would look like this:

[oracle@test ~]$ netca

Oracle Net Services Configuration:
Default local naming configuration complete.
    Created net service name: BOSTON_DB
Oracle Net Services configuration successful. The exit code is 0

To trace back the process, you may check the log of NETCA.

To see the result, you may display the file if you know the location of tnsnames.ora.

For Linux OS, you can do this:

[oracle@test ~]$ cat $ORACLE_HOME/network/admin/tnsnames.ora
...
BOSTON_DB =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = boston.example.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ORCLPDB1)
    )
  )

Its looks good.

Leave a Reply

Your email address will not be published. Required fields are marked *