This tutorial explains the basic steps to create an Oracle database service naming.
- Step 1: run the tool netmgr
- Step 2: create a service naming (using two methods)
- Step 3: Check the service Name
Step 1: run the tool netmgr
Network Manager: Service Naming
$ netmgr
Step 2: create a service naming (Method N° 1)
a. Add a new Service Naming
b. Choose the protocol TCP/IP
c. Specify the hostname and port number.
d. Specify the database service name.
e. Check the details
Note: Save the configuration
Step 2: create a service naming (Method N° 2)
Add the service name within tnsnames.ora
$ vi /u01/app/oracle/product/19c/dbhome_1/network/admin/tnsnames.ora
tnsnames.ora Network Configuration File: /u01/app/oracle/product/19c/dbhome_1/network/admin/tnsnames.ora
Generated by Oracle configuration tools.
WADHAH_XXX1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = XXXdb1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XXXdb)
)
)
Step 3: Check the service Name
$ tnsping wadhah_XXX1
TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 14-JULY-2022 17:08:50
Copyright (c) 1997, 2022, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = XXXdb1)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XXXdb)))
OK (10 msec)
Enjoy!