terça-feira, 10 de outubro de 2023

[ORACLE] ORA-16597: Oracle Data Guard Broker detects two or more primary databases. #JoelKallmanDay

Hello everyone

I hope you're doing weel.

Last week, I was doing a test using Data Guard Broker and at the end of the switchover I got the error bellow:
    
       switchover was not sucessful - Timeout

These problems in my alert.log were the main cause of the error, propably:   

LAD:2 network reconnect abandoned
<error barrier> at 0x7ffcb2af9bf0 placed krsl.c@6774
ORA-03135: connection lost contact
*** 2023-10-04 09:57:23.145275 [krsh.c:6348]

When I checked my databases - Primary and DG, the switchover was completed with success.

        select 
            inst_id, database_role, open_mode, log_mode, flashback_on, force_logging        
       from 
            gv$database;



Everything was Ok, but when I checked my DG Broker, the error bellow occurred.

        show configuration


Okay, I admit that I thought: 
I'm a smart guy, a smart DBA, an Oracle ACE, so I'm just remove the configuration and that's it! 😄

Well done!!! Emotional damage!!! I failed, miserably!!! 😅😅😅 

         remove configuration;


The solution to this was, but always remember:
  • This step-by-step worked for me, but it may not work for you.
  • It's a basic and limited environment. The real life will be different, for sure.
  • This post is for study and testing as well, and has no concern for performance and security best practices.

1)  Check the location of the DG Broker config files

show parameter dg_broker_config_file 


2) Change the dg_broker_start parameter in both environments
     
       alter system set dg_broker_start=false scope=both sid='*';

3) Remove DG Broker config files 

rm -f /u01/app/oracle/product/19.3.0.0/db_1/dbs/dr1IMANDG.dat
rm -f /u01/app/oracle/product/19.3.0.0/db_1/dbs/dr2IMANDG.dat

4) Check if the configuration was removed
       
        show configuration



5) At the end, I'll recreate the DG Broker configs
        create configuration 'DR_IM' as primary database is imandg connect identifier is ironmandg;
 
        add database ironman as connect identifier is ironman maintained as physical;

        enable configuration;



        show configuration verbose;

            Configuration - DR_IM
            Protection Mode: MaxPerformance
              Members:
              imandg  - Primary database
              ironman - Physical standby database 
              Properties:
                FastStartFailoverThreshold      = '30'
                OperationTimeout                = '30'
                TraceLevel                      = 'USER'
                FastStartFailoverLagLimit       = '30'
                CommunicationTimeout            = '180'
                ObserverReconnect               = '0'
                FastStartFailoverAutoReinstate  = 'TRUE'
                FastStartFailoverPmyShutdown    = 'TRUE'
                BystandersFollowRoleChange      = 'ALL'
                ObserverOverride                = 'FALSE'
                ExternalDestination1            = ''
                ExternalDestination2            = ''
                PrimaryLostWriteAction          = 'CONTINUE'
                ConfigurationWideServiceName    = 'ironman_CFG'
      
      Fast-Start Failover:  Disabled
      
      Configuration Status:
          SUCCESS

Yes, it's simple and work's very well!

I'm hope this post helps you.

Regards
Mario

terça-feira, 3 de outubro de 2023

[ORACLE] How do I upgrade the AHF.

Hello everyone!!!

I hope you're doing well!

In my last post here, I've showed how to install the Oracle Autonomous Health Framework (AHF).  

Today, I'll show how you can upgrade the AHF and how to use the auto upgrade as well.  

But always remember:

  1. This step-by-step worked for me, but it may not work for you.
  2. It's a basic and limited environment. The real life will be different, for sure.
  3. This post is for study and testing as well, and has no concern for performance and security best practices.
So, let's get started!!! 

1) Download the AHF zip file

I'll download the last version, "AHF 23.8.0 for Linux". 






Important: I'll execute all opertations with user ROOT.

2) Check the zip file

There is no need to unzip the file.



3) Check the AHF services 

tfactl print status



4) Set to stage for upgrade (if you don't run auto upgrade process)

ahfctl setupgrade -swstage /u01/AHF


Important: If you don't run the setup upgrade, you'll receive the error below:


5) Finally, I'll run the upgrade

ahfctl upgrade



6) And now, I'll check the services

tfactl print status


The upgrade process also removes the zip file from the staging area.


You can make the process easier if you configure the auto upgrade process.

If you run this setup before upgrade, you don't need to run the stage setup (step 4):

ahfctl setupgrade -all

Enter autoupgrade flag <on/off> : on
Enter software stage location : /u01/AHF
Enter auto upgrade frequency : 30
AHF autoupgrade parameters successfully updated
Successfully synced AHF configuration
refreshConfig() completed successfully.




More information about auto upgrade here.

And that's it my friends. AHF has been updated and is ready to use!!!

So, I hope this has helped.

Regards
Mario

Postagem em destaque

[ORACLE] How to move a datafile to a new location in ASM.

Hello everyone! I hope you're doing well! Today, I needed to move a datafile to another ASM Disk Group. The process was simple, but reme...