Sunday, 24 August 2025

Oracle 19c Active Data Guard Switchover Procedure

 

Oracle 19c Active Data Guard Switchover Procedure

Oracle Active Data Guard provides high availability and disaster recovery by allowing seamless role transitions between the primary and standby databases. A switchover is a planned role reversal where the primary database becomes the standby, and the standby takes over as the new primary without data loss.

This guide covers the step-by-step procedure for switchover in Oracle 19c Active Data Guard.


1. Pre-Checks

Before initiating a switchover, ensure both databases are synchronized and healthy.

On both primary and standby:

SELECT DATABASE_ROLE, OPEN_MODE FROM V$DATABASE;
  • Primary should show: PRIMARY, READ WRITE

  • Standby should show: PHYSICAL STANDBY, READ ONLY WITH APPLY or MOUNTED

Also, confirm there are no active sessions or long-running transactions on the primary.


2. Verify Log Transport and Apply

Ensure redo logs are being shipped and applied correctly.

On Primary:

SELECT DEST_ID, STATUS, ERROR FROM V$ARCHIVE_DEST;

On Standby:

SELECT PROCESS, STATUS, THREAD#, SEQUENCE# FROM V$MANAGED_STANDBY;
  • ARCH and LGWR processes should be running on primary.

  • MRP (Managed Recovery Process) should be running on standby.


3. Prepare Standby (Optional)

If standby is running in read-only with apply, cancel recovery before switchover:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

4. Switchover Command (Primary)

On the Primary Database:

ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN; SHUTDOWN IMMEDIATE; STARTUP MOUNT;

The database is now in standby mode.


5. Activate New Primary (Standby)

On the Standby Database:

ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY; ALTER DATABASE OPEN;

The standby is now promoted to the new primary database.


6. Convert Former Primary to Standby

On the Former Primary (now mounted as standby):

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;

This re-establishes redo apply.


7. Verify New Roles

On both databases:

SELECT DATABASE_ROLE, OPEN_MODE FROM V$DATABASE;

Expected Results:

  • New Primary → PRIMARY, READ WRITE

  • New Standby → PHYSICAL STANDBY, MOUNTED or READ ONLY WITH APPLY


8. Post-Checks

Validate the overall Data Guard configuration.

Using Data Guard Broker (DGMGRL):

DGMGRL> SHOW CONFIGURATION;

If Data Guard Broker is configured, switchover is much simpler:

DGMGRL> CONNECT sys/password@primary; DGMGRL> SWITCHOVER TO 'standby_db_unique_name'; DGMGRL> SHOW CONFIGURATION;

Conclusion

A switchover in Oracle 19c Active Data Guard ensures a zero data loss, planned role reversal between primary and standby databases. This is typically done during planned maintenance, patching, or to test disaster recovery readiness.

Oracle 19c Active Data Guard Configuration on Linux – Step by Step

 

Oracle 19c Active Data Guard Configuration on Linux – Step by Step

Oracle Active Data Guard provides high availability, data protection, and disaster recovery by maintaining a synchronized copy of the primary database on a standby system. In this guide, we will configure Oracle 19c Active Data Guard between two Linux servers.


1. Environment Setup

Primary Database: primary.localdomain (192.168.0.187)
Standby Database: standby.localdomain (192.168.0.188)

Update /etc/hosts on both servers:

192.168.0.187 primary.localdomain primary 192.168.0.188 standby.localdomain standby

Disable firewall & SELinux (if required):

systemctl stop firewalld setenforce 0

2. Enable FORCE LOGGING & ARCHIVELOG Mode on Primary

On the Primary Database:

ALTER DATABASE FORCE LOGGING; ARCHIVE LOG LIST;

If not in ARCHIVELOG mode:

SHUTDOWN IMMEDIATE; STARTUP MOUNT; ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN;

3. Configure Primary Initialization Parameters

Update the parameters using ALTER SYSTEM:

ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(primary,standby)'; ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=/u01/archive VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=primary'; ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=standby ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=standby'; ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE; ALTER SYSTEM SET FAL_SERVER=standby; ALTER SYSTEM SET FAL_CLIENT=primary; ALTER SYSTEM SET DB_FILE_NAME_CONVERT='/u02/oradata/standby/','/u02/oradata/primary/'; ALTER SYSTEM SET LOG_FILE_NAME_CONVERT='/u02/oradata/standby/','/u02/oradata/primary/'; ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;

4. Configure tnsnames.ora on Both Servers

Edit $ORACLE_HOME/network/admin/tnsnames.ora:

primary = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = primary.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = primary)) ) standby = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = standby.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = standby)) )

5. Create Standby Redo Logs on Primary

Add standby redo logs (same size as primary redo logs, +1 group):

ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 ('/u02/oradata/primary/standby_redo04.log') SIZE 500M; ALTER DATABASE ADD STANDBY LOGFILE GROUP 5 ('/u02/oradata/primary/standby_redo05.log') SIZE 500M; ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 ('/u02/oradata/primary/standby_redo06.log') SIZE 500M;

6. Create Password File & Transfer to Standby

On Primary:

orapwd file=$ORACLE_HOME/dbs/orapwprimary password=oracle entries=10 force=y scp $ORACLE_HOME/dbs/orapwprimary oracle@standby:$ORACLE_HOME/dbs/orapwstandby

7. Take RMAN Backup & Transfer to Standby

On Primary:

rman target / RUN { BACKUP DATABASE PLUS ARCHIVELOG; BACKUP CURRENT CONTROLFILE FOR STANDBY FORMAT '/oradumps/standby_ctrl.bkp'; } scp /oradumps/* oracle@standby:/oradumps/

8. Restore Database on Standby

On Standby:

rman target / STARTUP NOMOUNT; RESTORE CONTROLFILE FROM '/oradumps/standby_ctrl.bkp'; ALTER DATABASE MOUNT; CATALOG START WITH '/oradumps/'; RESTORE DATABASE; RECOVER DATABASE;

9. Configure Standby Initialization Parameters

Set parameters (reverse role values compared to primary):

ALTER SYSTEM SET DB_UNIQUE_NAME=standby; ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(primary,standby)'; ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=/u01/archive VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=standby'; ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=primary ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=primary'; ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE; ALTER SYSTEM SET FAL_SERVER=primary; ALTER SYSTEM SET FAL_CLIENT=standby; ALTER SYSTEM SET DB_FILE_NAME_CONVERT='/u02/oradata/primary/','/u02/oradata/standby/'; ALTER SYSTEM SET LOG_FILE_NAME_CONVERT='/u02/oradata/primary/','/u02/oradata/standby/'; ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;

10. Start Managed Recovery

On Standby Database:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

For Active Data Guard (read-only + apply mode):

ALTER DATABASE OPEN; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

11. Verify Configuration

Run these checks on both Primary and Standby:

SELECT DATABASE_ROLE, OPEN_MODE FROM V$DATABASE; SELECT DEST_ID, STATUS, ERROR FROM V$ARCHIVE_DEST;

Expected output:

  • Primary DBPRIMARY, READ WRITE

  • Standby DBPHYSICAL STANDBY, READ ONLY WITH APPLY


Conclusion

With this configuration, your Oracle 19c Active Data Guard environment is now up and running. Always validate in a test environment before production deployment. Active Data Guard ensures business continuity by providing real-time failover, load balancing for queries, and disaster recovery capabilities.



Tuesday, 12 August 2025

Introduction to Oracle Fusion General Ledger (GL)

 

Introduction to Oracle Fusion General Ledger (GL)

Oracle Fusion General Ledger is the core financial component of the Oracle Fusion Cloud Financials suite. It delivers a modern, highly configurable, and scalable accounting system designed to meet global business needs. Whether you’re part of a multinational enterprise or a growing organization, Oracle Fusion GL provides the foundation for accurate, real-time financial reporting and decision-making.


Key Features of Oracle Fusion General Ledger

1. Multi-Dimensional Accounting

Oracle Fusion GL introduces a multi-dimensional chart of accounts using segments. Each transaction is recorded with rich context, such as:

  • Company

  • Cost Center

  • Account

  • Product

  • Location

This allows flexible and powerful financial analysis.

2. Ledgers and Ledger Sets

Fusion GL supports:

  • Primary Ledgers for actual accounting

  • Secondary Ledgers for statutory or management reporting

  • Ledger Sets for consolidating reporting across multiple ledgers in real-time

3. Accounting Periods and Calendars

You can define:

  • Custom accounting calendars

  • Multiple period types (monthly, quarterly, yearly)

  • Automatic open/close period controls to maintain financial discipline.

4. Journal Processing

  • Manual and automated journal entries

  • Journal approval workflows

  • Reversals, recurring journals, and allocations

  • Spreadsheet integration for bulk data upload (via ADFdi or FBDI)

5. Real-Time Reporting and Analytics

Fusion GL uses Oracle OTBI and Smart View for Excel for real-time, self-service financial reporting, eliminating delays associated with batch processing.


Benefits of Using Oracle Fusion GL

  • Global compliance: Handles multiple currencies, languages, and statutory requirements.

  • Modern UX: Web-based UI with role-based dashboards and guided navigation.

  • Unified data model: Ensures consistency across finance modules (Payables, Receivables, Assets, etc.).

  • Audit-ready: Embedded controls and audit trail for every transaction.

  • Scalable: Supports both centralized and decentralized operations.


Common Use Cases

  • Closing accounting periods and running trial balances

  • Generating P&L and balance sheet reports

  • Performing allocations and consolidations across business units

  • Setting up intercompany accounting and revaluations

  • Integrating with EPM tools for planning and forecasting


Who Uses Fusion GL?

  • Finance Managers: For monitoring KPIs and approving journal entries

  • Accountants: For daily ledger maintenance and closing books

  • Auditors: For verifying transactional integrity and controls

  • IT Teams: For integrating third-party systems and managing roles


Author: Bidhan Mandal
Oracle Fusion Cloud | Financials Expert | EBS & Cloud Migration Specialist
Visit: https://bidhandba.blogspot.com