Dears,
Today while I was running through a Operation Acceptance Testing (OAT) in my DB.
My DB version 11.2 (but it applies to all DB version until atleast 19c) running without SIHA or GI.
The objective of the OAT was to test the application connection during db switchover.
Mistake # 1 - we never created the HA TNS for this DB
Mistake # 2 - we didnt setup dataguard broker on this DB
Mistake#2 - I already prepared a SOP, I ran through it and it was ALL OK. Note I faced ORA-16664 & ORA-16665 errors when I enabled the configuration. Fix was to properly setup local_listener setting, since the <DBUNIQUENAME>_DGB service wasnt starting up, until the local_listener is properly setup in a listener with non default port or listener name different from "LISTENER".
So the DGMGRL is all OK.
I stumbled with my (team) mistake, which is service miss. I never have setup a service on a standalone DB with no SIHA.
I used to run
srvctl add service...
But now I dont want to just setup the below as well, since I wanted this service to be available across both primary and standby.
alter system set service_name='XXXXXX'; -- some service name
Then threw google search & OTN I learnt,
exec dbms_service.create_service( -
service_name=>''
,network_name=>''
,...
);
can be used to setup the service.
On top of it, we need to setup a DB startup trigger which kicks off the service when the database_role matches "PRIMARY".
So this saved my day.
I proceeded to change the description part (to include new service name) of the app TNS, since I cant change the alias now, which is used everywhere in app.
I started around 11:00AM to prepare for the OAT, finished all the setup by 2PM
Good news is the OAT finished fine. The switchover, switchback ALL went just fine.
Thanks
No comments:
Post a Comment