What you will learn
A physical standby is a recoverable database copy maintained by redo transport and apply. This consolidates the repeated standby-build runbooks into an Oracle 19c single-instance example on separate hosts and storage. RAC adds redo-thread, service, and Clusterware requirements.
Before you begin
Use an isolated Oracle Database 19c Linux lab with a certified patch level. Names host1.sample.com and host2.sample.com identify distinct lab hosts; replace them consistently with your own addresses. Use oracle for database software and grid for Grid Infrastructure where ownership is separated. Connect through local operating-system authentication or a configured wallet; no example includes a password. Preserve a tested backup and record the database identity before changes. Use DEMO_PRI on host1.sample.com and DEMO_STBY on host2.sample.com with the same DB_NAME DEMO. Prepare matching software, ARCHIVELOG mode, password-file authentication, required keystores, capacity, and bidirectional Oracle Net connectivity. Configure static listener services for NOMOUNT and restart access. Verify both aliases from both hosts.
1. Prepare logging and storage
SELECT name,db_unique_name,log_mode,force_logging FROM v$database;
SELECT thread#,group#,bytes FROM v$log ORDER BY thread#,group#;
Enable FORCE LOGGING on the primary if required by the design, after evaluating the operation. Configure standby redo logs on both sites for future role reversal: at least one more group per thread than online redo groups, with sufficient sizes. Use unique group numbers and actual destination paths.
2. Prepare the auxiliary instance
On host2 create a reviewed PFILE with db_name=DEMO, db_unique_name=DEMO_STBY, cluster_database=false and dedicated destinations. Include valid memory, audit, diagnostic, and recovery-area settings. Start NOMOUNT and test remote authentication. The example assumes +DATA and +RECO are standby-side ASM disk groups with no shared primary files.
rman target sys@DEMO_PRI auxiliary sys@DEMO_STBY
Supply credentials at the prompts or through an approved wallet, never in shell history.
3. Duplicate to the isolated destination
DUPLICATE TARGET DATABASE FOR STANDBY
FROM ACTIVE DATABASE
SPFILE
SET db_unique_name='DEMO_STBY'
SET db_create_file_dest='+DATA'
SET db_recovery_file_dest='+RECO'
DORECOVER;
This core example assumes Oracle Managed Files and a reviewed source SPFILE. Override source-specific control-file, conversion, listener, and archive-destination settings as needed. Do not add NOFILENAMECHECK to bypass uncertainty about ownership. Measure primary and network load; backup-based duplication is another option.
4. Establish broker-managed protection
Enable DG_BROKER_START on both databases after configuring writable broker-file locations. Resolve independently maintained redo-transport settings before assigning broker ownership. Connect DGMGRL to DEMO_PRI and run:
CREATE CONFIGURATION demo_dg AS PRIMARY DATABASE IS DEMO_PRI CONNECT IDENTIFIER IS DEMO_PRI;
ADD DATABASE DEMO_STBY AS CONNECT IDENTIFIER IS DEMO_STBY MAINTAINED AS PHYSICAL;
ENABLE CONFIGURATION;
SHOW CONFIGURATION;
SHOW DATABASE VERBOSE DEMO_STBY;
VALIDATE DATABASE VERBOSE DEMO_STBY;
Resolve validation findings and generate fresh redo before accepting the configuration.
5. Read the example output
The following is illustrative, normalized output, not a transcript from a customer system. Values depend on your release and lab state.
DEMO_PRI PRIMARY READ WRITE
DEMO_STBY PHYSICAL STANDBY MOUNTED
Broker configuration status: SUCCESS
Mounted apply is sufficient here. Read-only access while redo apply continues has separate Active Data Guard licensing requirements.
Verify the result
Query V$DATAGUARD_STATS on the standby for transport/apply lag and fresh DATUM_TIME values. Switch the current log on the primary and verify new redo arrives and is applied. Check every thread when extending to RAC; stale zero lag is not evidence of current protection.
Troubleshooting
Authentication failures require password-file and listener checks. Apply gaps require locating missing redo and reviewing retention. Do not activate a standby to resolve a build error.
Recovery and next steps
If duplication fails, preserve its log and keep the primary untouched. Repair only identified auxiliary state before retrying. Retain the broker configuration and standby redo logs for the switchover lesson.