{"id":53185,"date":"2022-11-30T13:58:57","date_gmt":"2022-11-30T13:58:57","guid":{"rendered":"https:\/\/dbtut.com\/?p=53185"},"modified":"2022-12-07T19:09:59","modified_gmt":"2022-12-07T19:09:59","slug":"client-connect","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/","title":{"rendered":"Client Connect"},"content":{"rendered":"<p>In today&#8217;s article, I will explain how the Clients are Automatically Connected to the New Primary in Role Changes(SINGLE NODE).<\/p>\n<p>In case of Switchover or Failover, it is very important that the clients try to connect to the correct database.<\/p>\n<p>Clients connected to the Primary database should no longer try to connect to the Primary after Role Reversal operations, and try to connect to the old Physical Standby new Primary database.<\/p>\n<p>This is provided by database services managed by the DBMS_SERVICE package in Single Node and by SRVCTL in RAC structure.<\/p>\n<p>Database services act as abstraction layer between Clients and Database instance. They register to the Listener.<\/p>\n<p>Since the database services are registered to the Listener, the clients continue to perform their duties over the other instance defined in Failover or Switchover states, by enabling the clients to connect to the database services instead of the database instances.<\/p>\n<p>AFTER STARTUP ON DATABASE Trigger is used so that clients can automatically connect to the new Primary database as a result of the role change process.<\/p>\n<p>Trigger is created in the Primary database and automatically replicated to the entire Standby database.<\/p>\n<p>There are database services defined in Default. They do not need to be recreated. They only need to be started after a role change.<\/p>\n<p>DG_PROD: Primary Database<br \/>\nDG_RTQ: Active Data Guard<br \/>\nDG_SNAP: Snapshot Standby Database<br \/>\nDG_LSBY: Logical Standby Database<\/p>\n<p>The created services must be saved in the TNSNAMES.ORA file.<\/p>\n<h3>Let&#8217;s Test<\/h3>\n<p>1. After the role change, the service name to be created is added to the TNSNAMES.ORA file so that the clients can connect to the physical standby database. The creation will be done from NETMGR as recommended by Oracle.<\/p>\n<p>a. By connecting to the server from terminal, switch to Oracle user and run netmgr.<\/p>\n<p id=\"rEEbrum\"><img loading=\"lazy\" decoding=\"async\" width=\"834\" height=\"174\" class=\"size-full wp-image-53186 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_638752e64db43.png\" alt=\"\" \/><\/p>\n<p>b. In the window that opens, while the Service Naming tab is active, click the Create button with + sign.<\/p>\n<p id=\"pSgEuMu\"><img loading=\"lazy\" decoding=\"async\" width=\"962\" height=\"810\" class=\"size-full wp-image-53187 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_6387530d9f12b.png\" alt=\"\" \/><\/p>\n<p>c. We write &#8220;prmy&#8221; in the Net Service Naming field.<\/p>\n<p id=\"atYcaHT\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"450\" class=\"size-full wp-image-53188 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_638753349c73c.png\" alt=\"\" \/><\/p>\n<p>d. We choose &#8220;TCP\/IP&#8221; as the network protocol.<\/p>\n<p id=\"pbCISJM\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"448\" class=\"size-full wp-image-53189 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_63875351ad0e0.png\" alt=\"\" \/><\/p>\n<p>e. We write &#8220;primary.tivibulab.local&#8221;, which is the Hostname of the primary database, as the Hostname, and &#8220;1521&#8221; as the Port.<\/p>\n<p id=\"KOpDwjA\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"450\" class=\"size-full wp-image-53190 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_6387537327652.png\" alt=\"\" \/><\/p>\n<p>f. We choose &#8220;prmy&#8221; as Service Name and &#8220;Dedicated Server&#8221; as Connection Type.<\/p>\n<p id=\"zWwNvYv\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"450\" class=\"size-full wp-image-53191 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_6387539a10206.png\" alt=\"\" \/><\/p>\n<p>g With Finish, the service creation process is completed.<\/p>\n<p id=\"SRsdwMw\"><img loading=\"lazy\" decoding=\"async\" width=\"748\" height=\"450\" class=\"size-full wp-image-53192 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_638753b8798f8.png\" alt=\"\" \/><\/p>\n<p>h. The service is configured. Click the Advanced button.<\/p>\n<p id=\"XPEaeGl\"><img loading=\"lazy\" decoding=\"async\" width=\"958\" height=\"810\" class=\"size-full wp-image-53193 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_638753e034cae.png\" alt=\"\" \/><\/p>\n<p>\u0131. Enter &#8220;32767&#8221; in the Session Data Unit field. This value increases the network throughput. Normally, this value is 64KB for 12cR1, but 32767 is entered because NETMGR does not support this value. It will then be edited manually.<\/p>\n<p id=\"kSmybsp\"><img loading=\"lazy\" decoding=\"async\" width=\"386\" height=\"396\" class=\"size-full wp-image-53194 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_638754223ee07.png\" alt=\"\" \/><\/p>\n<p>j. The database that will be primary in the role change is added to the Address Configuration field. This is done with the + sign.<\/p>\n<p id=\"mxBBOJn\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"810\" class=\"size-full wp-image-53195 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_6387545616f76.png\" alt=\"\" \/><\/p>\n<p>k. Switchover and Failover&#8217;s Target Standby database information is written as hostname. We write &#8220;physical.tivibulab.local&#8221; as the Hostname and &#8220;1521&#8221; as the Port.<\/p>\n<p id=\"lyahaCh\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"808\" class=\"size-full wp-image-53196 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_6387548d8b1c4.png\" alt=\"\" \/><\/p>\n<p>m. We set Send and Receive Buffer Sizes for network throughput. This adjustment is made accordingly.<\/p>\n<pre class=\"lang:default decode:true \">\t\tTCP Socket Buffer size=BDP*3=network bandwidth*latency*3\r\n<\/pre>\n<p>This value is compared to 10MB. Whichever is greater is entered.<\/p>\n<p>Let&#8217;s calculate.<\/p>\n<pre class=\"lang:default decode:true \">\t\tNetwork Bandwidth= 1 Gbit\/s\r\nLatency=0,288 ms<\/pre>\n[This value can be seen by pinging the Primary Far SYNC instance where it sends the Redos from the Primary]\n<pre class=\"lang:default decode:true \">\t\t[root@primary ~]# ping 172.20.42.62\r\n\t\tPING 172.20.42.62 (172.20.42.62) 56(84) bytes of data.\r\n\t\t64 bytes from 172.20.42.62: icmp_seq=1 ttl=64 time=0.339 ms\r\n\t\t64 bytes from 172.20.42.62: icmp_seq=2 ttl=64 time=0.285 ms\r\n\t\t64 bytes from 172.20.42.62: icmp_seq=3 ttl=64 time=0.301 ms\r\n\t\t64 bytes from 172.20.42.62: icmp_seq=4 ttl=64 time=0.297 ms\r\n\t\t64 bytes from 172.20.42.62: icmp_seq=5 ttl=64 time=0.294 ms\r\n\t\t64 bytes from 172.20.42.62: icmp_seq=6 ttl=64 time=0.217 ms\r\n\t\t\r\n\t\t--- 172.20.42.62 ping statistics ---\r\n\t\t6 packets transmitted, 6 received, 0% packet loss, time 5001ms\r\n\t\trtt min\/avg\/max\/mdev = 0.217\/0.288\/0.339\/0.042 ms\r\n<\/pre>\n<pre class=\"lang:default decode:true \">\t\tTCP Socket Buffer size= 1.000.000* (1\/8) * 0,288*(1\/1000)s * 3 = 108 bytes\r\n<\/pre>\n<p>Therefore, the value of 10MB=10*1024*1024=10485760 bytes is written to the &#8220;Show Advanced&#8221; section of each 2 Adress Configuration section.<\/p>\n<p id=\"QegDEDr\"><img loading=\"lazy\" decoding=\"async\" width=\"962\" height=\"810\" class=\"size-full wp-image-53197 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_638758b00db1e.png\" alt=\"\" \/><\/p>\n<p>n. Settings are saved by clicking &#8220;Save&#8221; in the &#8220;File&#8221; section.<\/p>\n<p>o. The TNSNAMES.ORA file is checked to see if the changes have been made.<\/p>\n<pre class=\"lang:default decode:true \">\t\t[root@primary ~]# su - oracle\r\n\t\t[oracle@primary ~]$ cd \/u01\/app\/oracle\/product\/12.1.0\/db_1\/network\/admin\/\r\n\t\t[oracle@primary admin]$ cat tnsnames.ora \r\n\t\t# tnsnames.ora Network Configuration File: \/u01\/app\/oracle\/product\/12.1.0\/db_1\/network\/admin\/tnsnames.ora\r\n\t\t# Generated by Oracle configuration tools.\r\n\t\t\r\n\t\tPRMYFS =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = prmyFS.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = prmyFS)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tLOGICAL =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = logical.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = logical)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tPRIMARY =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = primary)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = primary)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tBROKER =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = broker.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = broker)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tPHYSICAL =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = physical.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = physical)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tPRMY =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = primary.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = physical.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 32767)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = prmy)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tCLOUD =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = cloud.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = cloud)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tPHYSCLFS =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = physclFS.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = physclFS)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n<\/pre>\n<p>p. The SDU value is changed to &#8220;65535&#8221;. For this, the TNSNAMES.ORA file is opened with the vi text editor and the following command is run.<\/p>\n<pre class=\"lang:default decode:true \">\t\t:%s\/SDU = 32767\/SDU = 65535\/g\r\n<\/pre>\n<p>q. File wq! Save with and check if the change has occurred.<\/p>\n<pre class=\"lang:default decode:true \">\t\t[oracle@primary ~]$ cat \/u01\/app\/oracle\/product\/12.1.0\/db_1\/network\/admin\/tnsnames.ora \r\n\t\t# tnsnames.ora Network Configuration File: \/u01\/app\/oracle\/product\/12.1.0\/db_1\/network\/admin\/tnsnames.ora\r\n\t\t# Generated by Oracle configuration tools.\r\n\t\t\r\n\t\tPRMYFS =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = prmyFS.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = prmyFS)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tLOGICAL =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = logical.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = logical)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tPRIMARY =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = primary)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = primary)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tBROKER =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = broker.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = broker)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tPHYSICAL =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = physical.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = physical)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tPRMY =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = primary.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = physical.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = prmy)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tCLOUD =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = cloud.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = cloud)\r\n\t\t    )\r\n\t\t  )\r\n\t\t\r\n\t\tPHYSCLFS =\r\n\t\t  (DESCRIPTION =\r\n\t\t    (ADDRESS_LIST =\r\n\t\t      (ADDRESS = (PROTOCOL = TCP)(HOST = physclFS.tivibulab.local)(PORT = 1521)(SEND_BUF_SIZE = 10485760)(RECV_BUF_SIZE = 10485760))\r\n\t\t    )\r\n\t\t    (SDU = 65535)\r\n\t\t    (CONNECT_DATA =\r\n\t\t      (SERVER = DEDICATED)\r\n\t\t      (SERVICE_NAME = physclFS)\r\n\t\t    )\r\n\t\t  )\r\n<\/pre>\n<p>e. The session opened from NETMGR and Terminal is exited.<\/p>\n<p id=\"ryIARwG\"><img loading=\"lazy\" decoding=\"async\" width=\"830\" height=\"578\" class=\"size-full wp-image-53198 aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/img_638759aac7b44.png\" alt=\"\" \/><\/p>\n<p>2. The service is created in the primary database.<\/p>\n<pre class=\"lang:default decode:true \">[Primary] SQL&gt; exec DBMS_SERVICE.CREATE_SERVICE('PRMY','PRMY');\r\n\r\nPL\/SQL procedure successfully completed.<\/pre>\n<p>3. The service is started.<\/p>\n<pre class=\"lang:default decode:true \">[Primary] SQL&gt; exec DBMS_SERVICE.START_SERVICE('PRMY');\r\n\r\nPL\/SQL procedure successfully completed.\r\n<\/pre>\n<p>4. In Listener, we check whether the service has started.<\/p>\n<pre class=\"lang:default decode:true \">[Primary] SQL&gt; !lsnrctl status\r\n\r\nLSNRCTL for Linux: Version 12.1.0.2.0 - Production on 15-FEB-2017 14:47:43\r\n\r\nCopyright (c) 1991, 2014, Oracle.  All rights reserved.\r\n\r\nConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=primary)(PORT=1521)(SEND_BUF_SIZE=10485760)(RECV_BUF_SIZE=10485760)))\r\nSTATUS of the LISTENER\r\n------------------------\r\nAlias                     LISTENER\r\nVersion                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production\r\nStart Date                08-FEB-2017 09:32:45\r\nUptime                    7 days 5 hr. 14 min. 57 sec\r\nTrace Level               off\r\nSecurity                  ON: Local OS Authentication\r\nSNMP                      OFF\r\nListener Parameter File   \/u01\/app\/oracle\/product\/12.1.0\/db_1\/network\/admin\/listener.ora\r\nListener Log File         \/u01\/app\/oracle\/diag\/tnslsnr\/primary\/listener\/alert\/log.xml\r\nListening Endpoints Summary...\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=primary.tivibulab.local)(PORT=1521)))\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=primary.tivibulab.local)(PORT=5500))(Security=(my_wallet_directory=\/u01\/app\/oracle\/admin\/primary\/xdb_wallet))(Presentation=HTTP)(Session=RAW))\r\nServices Summary...\r\nService \"PRMY\" has 1 instance(s).\r\n  Instance \"primary\", status READY, has 1 handler(s) for this service...\r\nService \"primary\" has 2 instance(s).\r\n  Instance \"primary\", status UNKNOWN, has 1 handler(s) for this service...\r\n  Instance \"primary\", status READY, has 1 handler(s) for this service...\r\nService \"primaryXDB\" has 1 instance(s).\r\n  Instance \"primary\", status READY, has 1 handler(s) for this service...\r\nService \"primary_DGB\" has 1 instance(s).\r\n  Instance \"primary\", status READY, has 1 handler(s) for this service...\r\nService \"primary_DGMGRL\" has 1 instance(s).\r\n  Instance \"primary\", status UNKNOWN, has 1 handler(s) for this service...\r\nThe command completed successfully\r\n<\/pre>\n<p>While in SQLPLUS ! The flag enables operating system commands to be run.<\/p>\n<p>5. The functionality of the service is tested by trying to connect with the created service.<\/p>\n<pre class=\"lang:default decode:true \">[oracle@prmyFS ~]$ sqlplus system\/Passw0rd4@prmy\r\n\r\nSQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 15 14:49:58 2017\r\n\r\nCopyright (c) 1982, 2014, Oracle.  All rights reserved.\r\n\r\n\r\nConnected to:\r\nOracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production\r\nWith the Partitioning, OLAP, Advanced Analytics and Real Application Testing options<\/pre>\n<pre class=\"lang:default decode:true \">[PrimaryFS] SQL&gt; show parameter name\r\n\r\nNAME                                 TYPE        VALUE\r\n------------------------------------ ----------- ------------------------------\r\ncell_offloadgroup_name               string\r\ndb_file_name_convert                 string\r\ndb_name                              string      primary\r\ndb_unique_name                       string      primary\r\nglobal_names                         boolean     FALSE\r\ninstance_name                        string      primary\r\nlock_name_space                      string\r\nlog_file_name_convert                string\r\npdb_file_name_convert                string\r\nprocessor_group_name                 string\r\nservice_names                        string      primary\r\n<\/pre>\n<pre class=\"lang:default decode:true \">[PrimaryFS] SQL&gt; select instance_name from v$instance;\r\n\r\nINSTANCE_NAME\r\n----------------\r\nprimary\r\n<\/pre>\n<p>6. AFTER STARTUP ON DATABASE Trigger is created to start the service automatically as a result of the role change operations.<\/p>\n<pre class=\"lang:default decode:true \">[Primary] SQL&gt; CREATE OR REPLACE TRIGGER primary_services after startup on database\r\n  2   \r\n  3  DECLARE\r\n  4    role VARCHAR(30);\r\n  5  BEGIN\r\n  6    SELECT DATABASE_ROLE INTO role FROM V$DATABASE;\r\n  7    IF role = 'PRIMARY' THEN\r\n  8         DBMS_SERVICE.START_SERVICE('prmy');\r\n  9    ELSE\r\n 10         DBMS_SERVICE.STOP_SERVICE('prmy');\r\n 11    END IF;\r\n 12  END;\r\n 13  \/\r\n\r\nTrigger created.\r\n<\/pre>\n<p>7. We are checking whether the trigger occurs automatically in the Physical Standby database.<\/p>\n<pre class=\"lang:default decode:true \">[Physical] SQL&gt; select TRIGGER_NAME from dba_triggers where lower(trigger_name) like '%services%';\r\n\r\nTRIGGER_NAME\r\n--------------------------------------------------------------------------------\r\nWWV_FLOW_WEB_SERVICES_T1\r\nPRIMARY_SERVICES\r\n<\/pre>\n<p>8. After the role change, the switchover process is performed to see if the service starts automatically and the clients can go to the new Primary.<\/p>\n<p>For this, first of all, the compatibility of the databases with Switchover is checked.<\/p>\n<pre class=\"lang:default decode:true \">[oracle@primary admin]$ dgmgrl\r\nDGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production\r\n\r\nCopyright (c) 2000, 2013, Oracle. All rights reserved.\r\n\r\nWelcome to DGMGRL, type \"help\" for information.\r\nDGMGRL&gt; connect sysdg\r\nPassword:\r\nConnected as SYSDG.\r\n<\/pre>\n<pre class=\"lang:default decode:true \">DGMGRL&gt; show configuration\r\n\r\nConfiguration - DG_Solution\r\n\r\n  Protection Mode: MaxAvailability\r\n  Members:\r\n  primary  - Primary database\r\n    prmyFS   - Far sync instance \r\n      physical - Physical standby database \r\n\r\n  Members Not Receiving Redo:\r\n  physclFS - Far sync instance \r\n\r\nFast-Start Failover: DISABLED\r\n\r\nConfiguration Status:\r\nSUCCESS   (status updated 7 seconds ago)<\/pre>\n<pre class=\"lang:default decode:true \">DGMGRL&gt; validate database primary\r\n\r\n  Database Role:    Primary database\r\n\r\n  Ready for Switchover:  Yes\r\n<\/pre>\n<pre class=\"lang:default decode:true \">DGMGRL&gt; validate database physical\r\n\r\n  Database Role:     Physical standby database\r\n  Primary Database:  primary\r\n\r\n  Ready for Switchover:  Yes\r\n  Ready for Failover:    Yes (Primary Running)\r\n\r\n  Current Log File Groups Configuration:\r\n    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status       \r\n              (primary)               (physical)                           \r\n    1         3                       2                       Insufficient SRLs\r\n\r\n  Future Log File Groups Configuration:\r\n    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status       \r\n              (physical)              (primary)                            \r\n    1         3                       2                       Insufficient SRLs\r\n\r\n  Transport-Related Property Settings:\r\n    Property                        primary Value            physical Value\r\n    RedoRoutes                      (primary:prmyFS SYNC)    (physical:physclFS SYNC)<\/pre>\n<p>9. Switchover operation is performed.<\/p>\n<pre class=\"lang:default decode:true \">DGMGRL&gt; switchover to physical\r\nPerforming switchover NOW, please wait...\r\nOperation requires a connection to instance \"physical\" on database \"physical\"\r\nConnecting to instance \"physical\"...\r\nConnected as SYSDG.\r\nNew primary database \"physical\" is opening...\r\nOperation requires start up of instance \"primary\" on database \"primary\"\r\nStarting instance \"primary\"...\r\nORACLE instance started.\r\nDatabase mounted.\r\nDatabase opened.\r\nSwitchover succeeded, new primary is \"physical\"\r\n<\/pre>\n<p>10. It is checked whether the switchover process is successful or not.<\/p>\n<pre class=\"lang:default decode:true \">DGMGRL&gt; show configuration\r\n\r\nConfiguration - DG_Solution\r\n\r\n  Protection Mode: MaxAvailability\r\n  Members:\r\n  physical - Primary database\r\n    physclFS - Far sync instance \r\n      primary  - Physical standby database \r\n\r\n  Members Not Receiving Redo:\r\n  prmyFS   - Far sync instance \r\n\r\nFast-Start Failover: DISABLED\r\n\r\nConfiguration Status:\r\nSUCCESS   (status updated 25 seconds ago)\r\n<\/pre>\n<p>11. By trying to connect with the service, we check whether it connects to the old Physical Standby (New Primary) database.<\/p>\n<pre class=\"lang:default decode:true \">[oracle@prmyFS ~]$ sqlplus system\/Passw0rd4@prmy\r\n\r\nSQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 15 15:29:45 2017\r\n\r\nCopyright (c) 1982, 2014, Oracle.  All rights reserved.\r\n\r\nLast Successful login time: Wed Feb 15 2017 14:49:58 +02:00\r\n\r\nConnected to:\r\nOracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production\r\nWith the Partitioning, OLAP, Advanced Analytics and Real Application Testing options\r\n<\/pre>\n<pre class=\"lang:default decode:true \">[PrimaryFS] SQL&gt; show parameter name\r\n\r\nNAME                                 TYPE        VALUE\r\n------------------------------------ ----------- ------------------------------\r\ncell_offloadgroup_name               string\r\ndb_file_name_convert                 string      primary, physical\r\ndb_name                              string      primary\r\ndb_unique_name                       string      physical\r\nglobal_names                         boolean     FALSE\r\ninstance_name                        string      physical\r\nlock_name_space                      string\r\nlog_file_name_convert                string      primary, physical\r\npdb_file_name_convert                string\r\nprocessor_group_name                 string\r\nservice_names                        string      physical\r\n<\/pre>\n<pre class=\"lang:default decode:true \">[PrimaryFS] SQL&gt; select instance_name from v$instance;\r\n\r\nINSTANCE_NAME\r\n----------------\r\nphysical\r\n<\/pre>\n<p>12. We check that the service is running by querying the Listener in the Physical Standby database.<\/p>\n<pre class=\"lang:default decode:true \">[oracle@physical admin]$ lsnrctl status\r\n\r\nLSNRCTL for Linux: Version 12.1.0.2.0 - Production on 15-FEB-2017 16:01:34\r\n\r\nCopyright (c) 1991, 2014, Oracle.  All rights reserved.\r\n\r\nConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=physical.tivibulab.local)(PORT=1521)(SEND_BUF_SIZE=10485760)(RECV_BUF_SIZE=10485760)))\r\nSTATUS of the LISTENER\r\n------------------------\r\nAlias                     LISTENER\r\nVersion                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production\r\nStart Date                08-FEB-2017 12:43:12\r\nUptime                    7 days 3 hr. 18 min. 22 sec\r\nTrace Level               off\r\nSecurity                  ON: Local OS Authentication\r\nSNMP                      OFF\r\nListener Parameter File   \/u01\/app\/oracle\/product\/12.1.0\/db_1\/network\/admin\/listener.ora\r\nListener Log File         \/u01\/app\/oracle\/diag\/tnslsnr\/physical\/listener\/alert\/log.xml\r\nListening Endpoints Summary...\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=physical.tivibulab.local)(PORT=1521)))\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=physical.tivibulab.local)(PORT=5500))(Security=(my_wallet_directory=\/u01\/app\/oracle\/admin\/physical\/xdb_wallet))(Presentation=HTTP)(Session=RAW))\r\nServices Summary...\r\nService \"PRMY\" has 1 instance(s).\r\n  Instance \"physical\", status READY, has 1 handler(s) for this service...\r\nService \"physical\" has 2 instance(s).\r\n  Instance \"physical\", status UNKNOWN, has 1 handler(s) for this service...\r\n  Instance \"physical\", status READY, has 1 handler(s) for this service...\r\nService \"physicalXDB\" has 1 instance(s).\r\n  Instance \"physical\", status READY, has 0 handler(s) for this service...\r\nService \"physical_DGB\" has 1 instance(s).\r\n  Instance \"physical\", status READY, has 1 handler(s) for this service...\r\nService \"physical_DGMGRL\" has 1 instance(s).\r\n  Instance \"physical\", status UNKNOWN, has 1 handler(s) for this service...\r\nThe command completed successfully\r\n<\/pre>\n<p>13. It is checked that the service is no longer running in the primary database.<\/p>\n<pre class=\"lang:default decode:true \">[oracle@primary ~]$ lsnrctl status\r\n\r\nLSNRCTL for Linux: Version 12.1.0.2.0 - Production on 15-FEB-2017 16:04:09\r\n\r\nCopyright (c) 1991, 2014, Oracle.  All rights reserved.\r\n\r\nConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=primary)(PORT=1521)(SEND_BUF_SIZE=10485760)(RECV_BUF_SIZE=10485760)))\r\nSTATUS of the LISTENER\r\n------------------------\r\nAlias                     LISTENER\r\nVersion                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production\r\nStart Date                08-FEB-2017 09:32:45\r\nUptime                    7 days 6 hr. 31 min. 23 sec\r\nTrace Level               off\r\nSecurity                  ON: Local OS Authentication\r\nSNMP                      OFF\r\nListener Parameter File   \/u01\/app\/oracle\/product\/12.1.0\/db_1\/network\/admin\/listener.ora\r\nListener Log File         \/u01\/app\/oracle\/diag\/tnslsnr\/primary\/listener\/alert\/log.xml\r\nListening Endpoints Summary...\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=primary.tivibulab.local)(PORT=1521)))\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=primary.tivibulab.local)(PORT=5500))(Security=(my_wallet_directory=\/u01\/app\/oracle\/admin\/primary\/xdb_wallet))(Presentation=HTTP)(Session=RAW))\r\nServices Summary...\r\nService \"primary\" has 2 instance(s).\r\n  Instance \"primary\", status UNKNOWN, has 1 handler(s) for this service...\r\n  Instance \"primary\", status READY, has 1 handler(s) for this service...\r\nService \"primaryXDB\" has 1 instance(s).\r\n  Instance \"primary\", status READY, has 1 handler(s) for this service...\r\nService \"primary_DGB\" has 1 instance(s).\r\n  Instance \"primary\", status READY, has 1 handler(s) for this service...\r\nService \"primary_DGMGRL\" has 1 instance(s).\r\n  Instance \"primary\", status UNKNOWN, has 1 handler(s) for this service...\r\nThe command completed successfully\r\n<\/pre>\n<p>Notice that the &#8220;prmy&#8221; service is not running in the primary database.<\/p>\n<p>14. When there is no trigger, the service will not start in both databases after switchover. Trigger is DROP to see it.<\/p>\n<pre class=\"lang:default decode:true \">[Physical] SQL&gt; drop trigger primary_services;\r\n\r\nTrigger dropped.\r\n<\/pre>\n<p>15. We check the compatibility of databases for Switchover.<\/p>\n<pre class=\"lang:default decode:true \">DGMGRL&gt; validate database primary\r\n\r\n  Database Role:     Physical standby database\r\n  Primary Database:  physical\r\n\r\n  Ready for Switchover:  Yes\r\n  Ready for Failover:    Yes (Primary Running)\r\n\r\n  Current Log File Groups Configuration:\r\n    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status       \r\n              (physical)              (primary)                            \r\n    1         3                       2                       Insufficient SRLs\r\n\r\n  Future Log File Groups Configuration:\r\n    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status       \r\n              (primary)               (physical)                           \r\n    1         3                       3                       Insufficient SRLs\r\n\r\n  Transport-Related Property Settings:\r\n    Property                        physical Value           primary Value\r\n    RedoRoutes                      (physical:physclFS SYNC) (primary:prmyFS SYNC)<\/pre>\n<pre class=\"lang:default decode:true \">DGMGRL&gt; validate database physical\r\n\r\n  Database Role:    Primary database\r\n\r\n  Ready for Switchover:  Yes\r\n<\/pre>\n<p>16. Switchover operation is performed.<\/p>\n<pre class=\"lang:default decode:true \">DGMGRL&gt; switchover to primary\r\nPerforming switchover NOW, please wait...\r\nOperation requires a connection to instance \"primary\" on database \"primary\"\r\nConnecting to instance \"primary\"...\r\nConnected as SYSDG.\r\nNew primary database \"primary\" is opening...\r\nOperation requires start up of instance \"physical\" on database \"physical\"\r\nStarting instance \"physical\"...\r\nORACLE instance started.\r\nDatabase mounted.\r\nDatabase opened.\r\nSwitchover succeeded, new primary is \"primary\"\r\n<\/pre>\n<p>17. We check if the switchover was successful.<\/p>\n<pre class=\"lang:default decode:true \">DGMGRL&gt; show configuration\r\n\r\nConfiguration - DG_Solution\r\n\r\n  Protection Mode: MaxAvailability\r\n  Members:\r\n  primary  - Primary database\r\n    prmyFS   - Far sync instance \r\n      physical - Physical standby database \r\n\r\n  Members Not Receiving Redo:\r\n  physclFS - Far sync instance \r\n\r\nFast-Start Failover: DISABLED\r\n\r\nConfiguration Status:\r\nSUCCESS   (status updated 57 seconds ago)\r\n<\/pre>\n<p>18. It is checked whether the services are started in Listener.<\/p>\n<pre class=\"lang:default decode:true \">[oracle@physical admin]$ lsnrctl status\r\n\r\nLSNRCTL for Linux: Version 12.1.0.2.0 - Production on 15-FEB-2017 16:09:29\r\n\r\nCopyright (c) 1991, 2014, Oracle.  All rights reserved.\r\n\r\nConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=physical.tivibulab.local)(PORT=1521)(SEND_BUF_SIZE=10485760)(RECV_BUF_SIZE=10485760)))\r\nSTATUS of the LISTENER\r\n------------------------\r\nAlias                     LISTENER\r\nVersion                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production\r\nStart Date                08-FEB-2017 12:43:12\r\nUptime                    7 days 3 hr. 26 min. 17 sec\r\nTrace Level               off\r\nSecurity                  ON: Local OS Authentication\r\nSNMP                      OFF\r\nListener Parameter File   \/u01\/app\/oracle\/product\/12.1.0\/db_1\/network\/admin\/listener.ora\r\nListener Log File         \/u01\/app\/oracle\/diag\/tnslsnr\/physical\/listener\/alert\/log.xml\r\nListening Endpoints Summary...\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=physical.tivibulab.local)(PORT=1521)))\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=physical.tivibulab.local)(PORT=5500))(Security=(my_wallet_directory=\/u01\/app\/oracle\/admin\/physical\/xdb_wallet))(Presentation=HTTP)(Session=RAW))\r\nServices Summary...\r\nService \"physical\" has 2 instance(s).\r\n  Instance \"physical\", status UNKNOWN, has 1 handler(s) for this service...\r\n  Instance \"physical\", status READY, has 1 handler(s) for this service...\r\nService \"physicalXDB\" has 1 instance(s).\r\n  Instance \"physical\", status READY, has 1 handler(s) for this service...\r\nService \"physical_DGB\" has 1 instance(s).\r\n  Instance \"physical\", status READY, has 1 handler(s) for this service...\r\nService \"physical_DGMGRL\" has 1 instance(s).\r\n  Instance \"physical\", status UNKNOWN, has 1 handler(s) for this service...\r\nThe command completed successfully\r\n<\/pre>\n<pre class=\"lang:default decode:true \">[oracle@primary ~]$ lsnrctl status\r\n\r\nLSNRCTL for Linux: Version 12.1.0.2.0 - Production on 15-FEB-2017 16:10:27\r\n\r\nCopyright (c) 1991, 2014, Oracle.  All rights reserved.\r\n\r\nConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=primary)(PORT=1521)(SEND_BUF_SIZE=10485760)(RECV_BUF_SIZE=10485760)))\r\nSTATUS of the LISTENER\r\n------------------------\r\nAlias                     LISTENER\r\nVersion                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production\r\nStart Date                08-FEB-2017 09:32:45\r\nUptime                    7 days 6 hr. 37 min. 41 sec\r\nTrace Level               off\r\nSecurity                  ON: Local OS Authentication\r\nSNMP                      OFF\r\nListener Parameter File   \/u01\/app\/oracle\/product\/12.1.0\/db_1\/network\/admin\/listener.ora\r\nListener Log File         \/u01\/app\/oracle\/diag\/tnslsnr\/primary\/listener\/alert\/log.xml\r\nListening Endpoints Summary...\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=primary.tivibulab.local)(PORT=1521)))\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))\r\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=primary.tivibulab.local)(PORT=5500))(Security=(my_wallet_directory=\/u01\/app\/oracle\/admin\/primary\/xdb_wallet))(Presentation=HTTP)(Session=RAW))\r\nServices Summary...\r\nService \"primary\" has 2 instance(s).\r\n  Instance \"primary\", status UNKNOWN, has 1 handler(s) for this service...\r\n  Instance \"primary\", status READY, has 1 handler(s) for this service...\r\nService \"primaryXDB\" has 1 instance(s).\r\n  Instance \"primary\", status READY, has 1 handler(s) for this service...\r\nService \"primary_DGB\" has 1 instance(s).\r\n  Instance \"primary\", status READY, has 1 handler(s) for this service...\r\nService \"primary_DGMGRL\" has 1 instance(s).\r\n  Instance \"primary\", status UNKNOWN, has 1 handler(s) for this service...\r\nThe command completed successfully\r\n<\/pre>\n<p>Notice that the &#8220;prmy&#8221; service is not running in both instances.<\/p>\n<p>&nbsp;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_53185\" class=\"pvc_stats all  \" data-element-id=\"53185\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In today&#8217;s article, I will explain how the Clients are Automatically Connected to the New Primary in Role Changes(SINGLE NODE). In case of Switchover or Failover, it is very important that the clients try to connect to the correct database. Clients connected to the Primary database should no longer try to connect to the Primary &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_53185\" class=\"pvc_stats all  \" data-element-id=\"53185\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":484,"featured_media":53199,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-53185","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-oracle"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Client Connect - Database Tutorials<\/title>\n<meta name=\"description\" content=\"In today&#039;s article, I will explain how the Clients are Automatically Connected to the New Primary in Role Changes(SINGLE NODE).\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Client Connect - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"In today&#039;s article, I will explain how the Clients are Automatically Connected to the New Primary in Role Changes(SINGLE NODE).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-30T13:58:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-07T19:09:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/Ekran-goruntusu-2022-11-30-165651.png\" \/>\n\t<meta property=\"og:image:width\" content=\"637\" \/>\n\t<meta property=\"og:image:height\" content=\"305\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Onur ARDAHANLI\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Onur ARDAHANLI\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/\"},\"author\":{\"name\":\"Onur ARDAHANLI\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/7fcd466cd0d347ec64aaa48f18f780c6\"},\"headline\":\"Client Connect\",\"datePublished\":\"2022-11-30T13:58:57+00:00\",\"dateModified\":\"2022-12-07T19:09:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/\"},\"wordCount\":877,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/Ekran-goruntusu-2022-11-30-165651.png\",\"articleSection\":[\"ORACLE\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/\",\"name\":\"Client Connect - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/Ekran-goruntusu-2022-11-30-165651.png\",\"datePublished\":\"2022-11-30T13:58:57+00:00\",\"dateModified\":\"2022-12-07T19:09:59+00:00\",\"description\":\"In today's article, I will explain how the Clients are Automatically Connected to the New Primary in Role Changes(SINGLE NODE).\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/Ekran-goruntusu-2022-11-30-165651.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/Ekran-goruntusu-2022-11-30-165651.png\",\"width\":637,\"height\":305},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Client Connect\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/7fcd466cd0d347ec64aaa48f18f780c6\",\"name\":\"Onur ARDAHANLI\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ecd20c3e1374ced4e1aefc82101cce4cd437be8fd957d1be3d106668b8a1b990?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ecd20c3e1374ced4e1aefc82101cce4cd437be8fd957d1be3d106668b8a1b990?s=96&d=mm&r=g\",\"caption\":\"Onur ARDAHANLI\"},\"url\":\"https:\/\/dbtut.com\/index.php\/author\/onurardahanli\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Client Connect - Database Tutorials","description":"In today's article, I will explain how the Clients are Automatically Connected to the New Primary in Role Changes(SINGLE NODE).","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/","og_locale":"en_US","og_type":"article","og_title":"Client Connect - Database Tutorials","og_description":"In today's article, I will explain how the Clients are Automatically Connected to the New Primary in Role Changes(SINGLE NODE).","og_url":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/","og_site_name":"Database Tutorials","article_published_time":"2022-11-30T13:58:57+00:00","article_modified_time":"2022-12-07T19:09:59+00:00","og_image":[{"width":637,"height":305,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/Ekran-goruntusu-2022-11-30-165651.png","type":"image\/png"}],"author":"Onur ARDAHANLI","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Onur ARDAHANLI","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/"},"author":{"name":"Onur ARDAHANLI","@id":"https:\/\/dbtut.com\/#\/schema\/person\/7fcd466cd0d347ec64aaa48f18f780c6"},"headline":"Client Connect","datePublished":"2022-11-30T13:58:57+00:00","dateModified":"2022-12-07T19:09:59+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/"},"wordCount":877,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/Ekran-goruntusu-2022-11-30-165651.png","articleSection":["ORACLE"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/","url":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/","name":"Client Connect - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/Ekran-goruntusu-2022-11-30-165651.png","datePublished":"2022-11-30T13:58:57+00:00","dateModified":"2022-12-07T19:09:59+00:00","description":"In today's article, I will explain how the Clients are Automatically Connected to the New Primary in Role Changes(SINGLE NODE).","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/Ekran-goruntusu-2022-11-30-165651.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/11\/Ekran-goruntusu-2022-11-30-165651.png","width":637,"height":305},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2022\/11\/30\/client-connect\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"Client Connect"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/7fcd466cd0d347ec64aaa48f18f780c6","name":"Onur ARDAHANLI","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ecd20c3e1374ced4e1aefc82101cce4cd437be8fd957d1be3d106668b8a1b990?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ecd20c3e1374ced4e1aefc82101cce4cd437be8fd957d1be3d106668b8a1b990?s=96&d=mm&r=g","caption":"Onur ARDAHANLI"},"url":"https:\/\/dbtut.com\/index.php\/author\/onurardahanli\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/53185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/484"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=53185"}],"version-history":[{"count":3,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/53185\/revisions"}],"predecessor-version":[{"id":53279,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/53185\/revisions\/53279"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/53199"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=53185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=53185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=53185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}