SlideShare a Scribd company logo
3
Most read
4
Most read
6
Most read
How to Create Static Listener for Duplicating Database
VS
Using UR=A to Connect to Oracle Databases in Nomount/Restricted Mode:
Alireza Kamrani
12/08/2024
Problem:
Refreshing a database from production to test/uat using rman duplicate method.
On Test server listener blocked with service name
SQL> startup nomount;
the service on the listener would have a blocked status.
Service "orcldb" has 1 instance(s).
Instance "orcldb", status BLOCKED, has 1 handler(s) for this service...
Any attempt to connect to the instance using service name will fail.
$ sqlplus sys@orcldb as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sat Dec13 23:27:09 2024
Version 19.12.0.0.0
ERROR:
ORA-12528:
TNS:listener: all appropriate instances are blocking new connections
The TNS entry used is shown below.
ORCLDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = MyIP)(PORT = 1525))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcldb)
)
)
One solution is to create a static listener entries as done when creating data guard
configurations.
Other options is to use UR=A in the TNS entry.
With the use of UR=A in TNS entry there's no need to create a static listener entry.
Dynamic listener would allow connection without any issue.
DEVDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = IP)(PORT = 1525))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = devcdb)
(UR = A)
)
)
After adding a (UR=A) parameter on tnsnames.ora and complete the refresh successfully.
Please note that the (UR=A) clause is intended to work with a dynamically registered handler so the
use of SERVICE_NAME versus SID is preferred.
Also this solution can works with RESTRICTED database.
UR=A stands for "User restricted = accepted". This means, that user are still able to connect to a
database in restricted mode.
Without this setting you will encounter the following error.
ORA-12526: TNS:listener: all appropriate instances are in restricted mode
Of course your user needs the RESTRICTED SESSION privilege.
How to Create Static Listener for Single instance And RAC:
1) Static Listener Registration Syntax for Stand-Alone Listener :
SID_LIST_listener_name_here=
(SID_LIST=
(SID_DESC=
(SID_NAME= <instance_name>)
==> The instance name which needs to appear on listener
(GLOBAL_DBNAME = <service_name> )
(ORACLE_HOME= <oracle home path>)
===> ORACLE_HOME path must be set correct.
)
)
SID_NAME = obtain the SID value from the INSTANCE_NAME parameter in the initialization
parameter file.
GLOBAL_DBNAME = The listener tries to match the value of this parameter with the value of the
SERVICE_NAME parameter in the client connect descriptor.
The value for this parameter is typically obtained from the combination of the DB_NAME and
DB_DOMAIN parameters (DB_NAME.DB_DOMAIN) in the initialization parameter file,
But the value can also contain any valid name used by clients to identify the service.
2) Static Listener Registration Syntax for RAC Listener :
SID_LIST_listener_name_here=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=<db_unique_name>) ===> The service name which needs to appear on
(GLOBAL_DBNAME=<db_unique_name>) ===> The service name which needs to appear on
listener
(ORACLE_HOME= <oracle_home path>)
(SID_NAME=<sid_name_1>))
===> The instance name which needs to appear on listener
(SID_DESC=
(GLOBAL_DBNAME=<db_unique_name>)
(ORACLE_HOME=<oracle_home path>)
(SID_NAME=<sid_name_2>)
)
)
For RAC One Node databases the SID_LIST entries in the listener.ora files on each possible host
must each contain two SID_DESC clauses, one for each of the SID_NAME values that correspond to
the two possible RAC One Node instances.
3) Static Listener Registration Syntax on a Primary , Standby Database for shipping
logs :
Primary :
Unique name is decided updated in pfile :
db_unique_name=orcl_p
Update Listener with static entry Listener.ora file :
SID_LIST_listener_name_here =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl_p)
===> db_unique_name on Primary db (ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1)
(SID_NAME = orcl)
===> Instance_name in Primary db
)
)
Standby:
Unique name is decided updated in pfile :
db_unique_name=orcl_s
Update Listener with static entry :
SID_LIST_listener_name_here =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl_s)
===> db_unique_name on Standby db
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1)
(SID_NAME = orcls)
===> Instance_name in Standby db
)
)
How to Add a Static Listener on Public IP for A Local RAC Instance
Example used in this document:
Cluster nodes: node1, node2
VIP listener port: 1521
Static listener name: LSNR1010 port: 1530
Oracle database 12c above.
Note: The following procedure also applies for an individually created single instance database on a
RAC node.
Solution 1: Configure a static listener from GI Home which can be started during GI startup
Steps:
1. Add the following to listener.ora in
<Grid Home>/network/admin
LSNR1010=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(protocol=tcp)(host=<node public IP>)
(port=1530))))
SID_LIST_LSNR1010 =
(SID_DESC =
(GLOBAL_DBNAME = <Name for client to connect>)
(ORACLE_HOME = <RDBMS Home>)
(SID_NAME = <DB instance name>)
)
2. As 'grid' user
$ srvctl add listener -listener lsnr1010 -netnum 1 -endpoints "1530"
3. Take note of the original start and stop dependencies
$ crsctl stat res ora.LSNR1010.lsnr -f |grep -F 'DEPENDENCIES='
4. Adjust clusterware resource dependencies
$ crsctl modify res ora.LSNR1010.lsnr -attr "START_DEPENDENCIES=hard(ora.net1.network)
pullup(ora.net1.network)" -unsupported
5. Disable the listener for remote node(s) since it is planning to run it only on one node
$ srvctl disable listener -listener lsnr1010 -node <remote node name, Ex, 'node2'>
6. TNS client configuration contains
<Tns name 1> =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <node public IP>)(PORT = 1530))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <Name for client to connect>)
)
)
)
7. Optionally, if you have a second public network that the node also has an IP on it, and you want
the static listener is running on that public IP instead of the public IP used for Grid Infrastructure
cluster node, then you can now
1) Modify listener.ora in <Grid Home>/network/admin
LSNR1010=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(protocol=tcp)(host=<the IP on the
second public network>)(port=1530))))
SID_LIST_LSNR1010 =
(SID_DESC =
(GLOBAL_DBNAME = <Name for client to connect>)
(ORACLE_HOME = <RDBMS Home>)
(SID_NAME = <DB instance name>)
)
2) Modify TNS client configuration
<Tns name 1> =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <the IP on the second public network>)(PORT =
1530))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <Name for client to connect>)
)
)
The method to start / stop the listener is:
As 'grid' user
$ srvctl start listener -listener lsnr1010
$ srvctl stop listener -listener lsnr1010
Solution 2: Configure a static listener from database Home which can only be started manually
Solution 2: Configure a static listener from database Home which can only be started manually
Enter into RDBMS home and create/modify listener.ora under <RAC RDBMS Home>/network/admin
to add the static listener with its port different from GI VIP listener.
Example:
On Server side:
File listener.ora contains:
LSNR4170 =
(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (protocol=tcp)(host = <node public IP>)(port =
1530))))
SID_LIST_LSNR4170 =
(SID_DESC =
(GLOBAL_DBNAME = <Name for client to connect>)
(ORACLE_HOME = <RDBMS Home>)
(SID_NAME = <DB instance name>)
)
As RDBMS owner, start the listener by command:
$ lsnrctl start lsnr4170
On Client side:
File tnsnames.ora contains
<Tns name 2> =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <node public IP>)(PORT = 1530))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <Name for client to connect>)
)
)
To establish connection:
$ sqlplus system/<password>@<Tns name 2>
.
.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Note: Whatever in solution 1 or solution 2, the value of SERVICE_NAME in client TNS string must
match the value of GLOBAL_DBNAME in listener.ora, else connection will fail with:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
Alireza Kamrani.

More Related Content

PPT
Basic oracle net server side configuration
DOCX
Ora static and-dynamic-listener
PDF
给11g r2 rac添加listener监听器并静态注册
PPTX
Oracle DBA Configuring network environment
PPT
Configuración de la Red de DB Oracle 11g
PPT
Less05 Network
PDF
Broker otw.pptx
PPTX
Oracle e-Business Suite & RAC 11GR2
Basic oracle net server side configuration
Ora static and-dynamic-listener
给11g r2 rac添加listener监听器并静态注册
Oracle DBA Configuring network environment
Configuración de la Red de DB Oracle 11g
Less05 Network
Broker otw.pptx
Oracle e-Business Suite & RAC 11GR2

Similar to Create Static Listener SI _ RAC Duplication.pdf (20)

PPTX
Distrubuted database connection with oracle
PDF
Oracle networking listener
PDF
Oracle services on rac
PDF
How to create a non managed standby database
DOCX
Physical_Standby_Database_R12.2.4
PDF
Understanding oracle rac internals part 1 - slides
PDF
rac_for_beginners_ppt.pdf
PDF
Rac&asm
PPTX
Oracle Database: Checklist Connection Issues
PDF
Createlistener
PDF
Presentation 12c pdb
PDF
What we unlearned_and_learned_by_moving_from_m9000_to_ssc_ukoug2014
TXT
oracle dba
PPTX
Database 12c
PPSX
RAC - The Savior of DBA
PDF
Racsig rac internals
PDF
Oracle 12c PDB insights
PDF
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
PPTX
Presentation day5 oracle12c
PPTX
How oracle 12c flexes its muscles against oracle 11g r2 final
Distrubuted database connection with oracle
Oracle networking listener
Oracle services on rac
How to create a non managed standby database
Physical_Standby_Database_R12.2.4
Understanding oracle rac internals part 1 - slides
rac_for_beginners_ppt.pdf
Rac&asm
Oracle Database: Checklist Connection Issues
Createlistener
Presentation 12c pdb
What we unlearned_and_learned_by_moving_from_m9000_to_ssc_ukoug2014
oracle dba
Database 12c
RAC - The Savior of DBA
Racsig rac internals
Oracle 12c PDB insights
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Presentation day5 oracle12c
How oracle 12c flexes its muscles against oracle 11g r2 final
Ad

More from Alireza Kamrani (20)

PDF
How To Configure Client Failover For Data Guard Connections Using Database Se...
PDF
Tuning_anTroubleshooting_Synchronous_Redo_Transport Part1
PDF
Tuning and Troubleshooting Synchronous Redo Transport (Part 2)
PDF
Oracle Database Instance Tuning (Part 3)
PDF
Oracle Database Instance Tuning (Part 2)
PDF
Oracle Instance Tuning - (Database Box).pdf
PDF
Using ORM like Hibernate on Oracle Database , challenges and recommendations
PDF
Tuning write-heavy operations in Oracle Database, Part C
PDF
Oracle Datafile Recovery vs Block Media Recovery
PDF
CPU Wait Mean in Oracle AWR Report .....
PDF
Keep Sorted Rows / Blocks Oracle Table all versions
PDF
Oracle 19c Automatic Recovery Advisor (ADR)
PDF
Recover Corrupted Datafile Without RMAN Backup
PDF
What is the N+1 Query Problem and How to Solve It
PDF
How to Tuning Disk IO in Oracle DB (Part A)
PDF
Oracle_SGA_vs_PGA_Usage_and_Large_Table_Scans_1740680944.pdf
PDF
HANDLING SORT OPERATION IN Oracle SQL Overview
PDF
Apply_multiple_Oracle_patches_Simultaneously
PDF
Best Practices for Oracle RAC DB with large SGA size
PDF
Top Ten Mistakes Found in Oracle Database Environments
How To Configure Client Failover For Data Guard Connections Using Database Se...
Tuning_anTroubleshooting_Synchronous_Redo_Transport Part1
Tuning and Troubleshooting Synchronous Redo Transport (Part 2)
Oracle Database Instance Tuning (Part 3)
Oracle Database Instance Tuning (Part 2)
Oracle Instance Tuning - (Database Box).pdf
Using ORM like Hibernate on Oracle Database , challenges and recommendations
Tuning write-heavy operations in Oracle Database, Part C
Oracle Datafile Recovery vs Block Media Recovery
CPU Wait Mean in Oracle AWR Report .....
Keep Sorted Rows / Blocks Oracle Table all versions
Oracle 19c Automatic Recovery Advisor (ADR)
Recover Corrupted Datafile Without RMAN Backup
What is the N+1 Query Problem and How to Solve It
How to Tuning Disk IO in Oracle DB (Part A)
Oracle_SGA_vs_PGA_Usage_and_Large_Table_Scans_1740680944.pdf
HANDLING SORT OPERATION IN Oracle SQL Overview
Apply_multiple_Oracle_patches_Simultaneously
Best Practices for Oracle RAC DB with large SGA size
Top Ten Mistakes Found in Oracle Database Environments
Ad

Recently uploaded (20)

PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Encapsulation theory and applications.pdf
PPT
Teaching material agriculture food technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Empathic Computing: Creating Shared Understanding
PDF
KodekX | Application Modernization Development
PDF
cuic standard and advanced reporting.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Review of recent advances in non-invasive hemoglobin estimation
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
“AI and Expert System Decision Support & Business Intelligence Systems”
Encapsulation_ Review paper, used for researhc scholars
Encapsulation theory and applications.pdf
Teaching material agriculture food technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Machine learning based COVID-19 study performance prediction
Empathic Computing: Creating Shared Understanding
KodekX | Application Modernization Development
cuic standard and advanced reporting.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Network Security Unit 5.pdf for BCA BBA.
Dropbox Q2 2025 Financial Results & Investor Presentation
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Programs and apps: productivity, graphics, security and other tools
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Review of recent advances in non-invasive hemoglobin estimation

Create Static Listener SI _ RAC Duplication.pdf

  • 1. How to Create Static Listener for Duplicating Database VS Using UR=A to Connect to Oracle Databases in Nomount/Restricted Mode: Alireza Kamrani 12/08/2024 Problem: Refreshing a database from production to test/uat using rman duplicate method. On Test server listener blocked with service name SQL> startup nomount; the service on the listener would have a blocked status. Service "orcldb" has 1 instance(s). Instance "orcldb", status BLOCKED, has 1 handler(s) for this service... Any attempt to connect to the instance using service name will fail. $ sqlplus sys@orcldb as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Sat Dec13 23:27:09 2024 Version 19.12.0.0.0 ERROR: ORA-12528: TNS:listener: all appropriate instances are blocking new connections The TNS entry used is shown below.
  • 2. ORCLDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = MyIP)(PORT = 1525)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcldb) ) ) One solution is to create a static listener entries as done when creating data guard configurations. Other options is to use UR=A in the TNS entry. With the use of UR=A in TNS entry there's no need to create a static listener entry. Dynamic listener would allow connection without any issue. DEVDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = IP)(PORT = 1525)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = devcdb) (UR = A) ) ) After adding a (UR=A) parameter on tnsnames.ora and complete the refresh successfully. Please note that the (UR=A) clause is intended to work with a dynamically registered handler so the use of SERVICE_NAME versus SID is preferred. Also this solution can works with RESTRICTED database. UR=A stands for "User restricted = accepted". This means, that user are still able to connect to a database in restricted mode.
  • 3. Without this setting you will encounter the following error. ORA-12526: TNS:listener: all appropriate instances are in restricted mode Of course your user needs the RESTRICTED SESSION privilege. How to Create Static Listener for Single instance And RAC: 1) Static Listener Registration Syntax for Stand-Alone Listener : SID_LIST_listener_name_here= (SID_LIST= (SID_DESC= (SID_NAME= <instance_name>) ==> The instance name which needs to appear on listener (GLOBAL_DBNAME = <service_name> ) (ORACLE_HOME= <oracle home path>) ===> ORACLE_HOME path must be set correct. ) ) SID_NAME = obtain the SID value from the INSTANCE_NAME parameter in the initialization parameter file. GLOBAL_DBNAME = The listener tries to match the value of this parameter with the value of the SERVICE_NAME parameter in the client connect descriptor. The value for this parameter is typically obtained from the combination of the DB_NAME and DB_DOMAIN parameters (DB_NAME.DB_DOMAIN) in the initialization parameter file, But the value can also contain any valid name used by clients to identify the service. 2) Static Listener Registration Syntax for RAC Listener : SID_LIST_listener_name_here= (SID_LIST= (SID_DESC= (GLOBAL_DBNAME=<db_unique_name>) ===> The service name which needs to appear on
  • 4. (GLOBAL_DBNAME=<db_unique_name>) ===> The service name which needs to appear on listener (ORACLE_HOME= <oracle_home path>) (SID_NAME=<sid_name_1>)) ===> The instance name which needs to appear on listener (SID_DESC= (GLOBAL_DBNAME=<db_unique_name>) (ORACLE_HOME=<oracle_home path>) (SID_NAME=<sid_name_2>) ) ) For RAC One Node databases the SID_LIST entries in the listener.ora files on each possible host must each contain two SID_DESC clauses, one for each of the SID_NAME values that correspond to the two possible RAC One Node instances. 3) Static Listener Registration Syntax on a Primary , Standby Database for shipping logs : Primary : Unique name is decided updated in pfile : db_unique_name=orcl_p Update Listener with static entry Listener.ora file : SID_LIST_listener_name_here = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = orcl_p) ===> db_unique_name on Primary db (ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1) (SID_NAME = orcl) ===> Instance_name in Primary db ) )
  • 5. Standby: Unique name is decided updated in pfile : db_unique_name=orcl_s Update Listener with static entry : SID_LIST_listener_name_here = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = orcl_s) ===> db_unique_name on Standby db (ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1) (SID_NAME = orcls) ===> Instance_name in Standby db ) ) How to Add a Static Listener on Public IP for A Local RAC Instance Example used in this document: Cluster nodes: node1, node2 VIP listener port: 1521 Static listener name: LSNR1010 port: 1530 Oracle database 12c above. Note: The following procedure also applies for an individually created single instance database on a RAC node. Solution 1: Configure a static listener from GI Home which can be started during GI startup Steps: 1. Add the following to listener.ora in <Grid Home>/network/admin
  • 6. LSNR1010=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(protocol=tcp)(host=<node public IP>) (port=1530)))) SID_LIST_LSNR1010 = (SID_DESC = (GLOBAL_DBNAME = <Name for client to connect>) (ORACLE_HOME = <RDBMS Home>) (SID_NAME = <DB instance name>) ) 2. As 'grid' user $ srvctl add listener -listener lsnr1010 -netnum 1 -endpoints "1530" 3. Take note of the original start and stop dependencies $ crsctl stat res ora.LSNR1010.lsnr -f |grep -F 'DEPENDENCIES=' 4. Adjust clusterware resource dependencies $ crsctl modify res ora.LSNR1010.lsnr -attr "START_DEPENDENCIES=hard(ora.net1.network) pullup(ora.net1.network)" -unsupported 5. Disable the listener for remote node(s) since it is planning to run it only on one node $ srvctl disable listener -listener lsnr1010 -node <remote node name, Ex, 'node2'> 6. TNS client configuration contains <Tns name 1> = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = <node public IP>)(PORT = 1530)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = <Name for client to connect>) ) )
  • 7. ) 7. Optionally, if you have a second public network that the node also has an IP on it, and you want the static listener is running on that public IP instead of the public IP used for Grid Infrastructure cluster node, then you can now 1) Modify listener.ora in <Grid Home>/network/admin LSNR1010=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(protocol=tcp)(host=<the IP on the second public network>)(port=1530)))) SID_LIST_LSNR1010 = (SID_DESC = (GLOBAL_DBNAME = <Name for client to connect>) (ORACLE_HOME = <RDBMS Home>) (SID_NAME = <DB instance name>) ) 2) Modify TNS client configuration <Tns name 1> = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = <the IP on the second public network>)(PORT = 1530)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = <Name for client to connect>) ) ) The method to start / stop the listener is: As 'grid' user $ srvctl start listener -listener lsnr1010 $ srvctl stop listener -listener lsnr1010 Solution 2: Configure a static listener from database Home which can only be started manually
  • 8. Solution 2: Configure a static listener from database Home which can only be started manually Enter into RDBMS home and create/modify listener.ora under <RAC RDBMS Home>/network/admin to add the static listener with its port different from GI VIP listener. Example: On Server side: File listener.ora contains: LSNR4170 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (protocol=tcp)(host = <node public IP>)(port = 1530)))) SID_LIST_LSNR4170 = (SID_DESC = (GLOBAL_DBNAME = <Name for client to connect>) (ORACLE_HOME = <RDBMS Home>) (SID_NAME = <DB instance name>) ) As RDBMS owner, start the listener by command: $ lsnrctl start lsnr4170 On Client side: File tnsnames.ora contains <Tns name 2> = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = <node public IP>)(PORT = 1530)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = <Name for client to connect>) ) )
  • 9. To establish connection: $ sqlplus system/<password>@<Tns name 2> . . Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production Note: Whatever in solution 1 or solution 2, the value of SERVICE_NAME in client TNS string must match the value of GLOBAL_DBNAME in listener.ora, else connection will fail with: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor Alireza Kamrani.