Skip to main content

Posts

Showing posts from April, 2025

Recover Standby using incremental backup

Introduction: RMAN provides us facility to take the incremental backup from a specified System Change Number (SCN). By using this we can recover the Standby Database where archive gap is huge or archives are missing. This method allows us to efficiently resynchronize a standby database with minimal downtime and reduced network impact. Prerequisites: Oracle Data Guard should be configured. Disable DG broker if any as it will start MRP automatically. Environment: Server Primary Standby Hostname Source Target IP 192.168.80.51 192.168.80.111 OS OEL 9 OEL 9 SID ORCLDC ORCLDR Service Name ORCLDC ORCLDR Now proceed for recovery activity step by step: 1. Check difference of SCN at DB and file level between Primary and Standby At Primary: SQL> select name,db_unique_n...

Oracle Database Parameters

Introduction: Oracle database parameters are settings that define how the database operates, influencing aspects like memory allocation, resource limits, security, and performance. These parameters are typically stored in a parameter file, which is a text file (PFILE) or a binary file (SPFILE). We can use parameters to: Set limits for the entire database. Set limits on database resources. Set user or process limits. Control the database's behaviour and performance. Parameter Files: PFILE (Parameter File- init[SID].ora): A text file containing initialization parameters. SPFILE (Server Parameter File- spfile[SID].ora): A binary file that stores initialization parameters. Scope: SCOPE parameter in ALTER SYSTEM statements determines where and when parameter changes take effect. Below are the available options to be used. MEMORY: It will change the parameter value only in the current instance's memory, and the change will be lost post restart of DB instance. SPFILE:...

Standby File Management is set to MANUAL

Introduction: STANDBY_FILE_MANAGEMENT enables or disables automatic standby file management. When automatic standby file management is enabled or set to TRUE, operating system file additions and deletions on the primary database are replicated on the standby database. This parameter has following values: MANUAL : disables automatic standby file management. AUTO : enables automatic standby file management. Scenario : On the Standby Database STANDBY_FILE_MANAGEMENT was set to FALSE by mistake or for any xyz reason. Post that on Primary some datafiles were added & Primary-Standby is out of sync. Prerequisites: Oracle Data Guard should be configured. Set STANDBY_FILE_MANAGEMENT to FALSE on standby & add datafiles on Primary. (For testing purpose only). Environment: Server Primary Standby Hostname Source Target IP 192.168.80.51 192.168.80.111 O...

Oracle Statspack

Introduction: STATSPACK is a performance diagnosis tool, available since Oracle8i. Along with additional reporting, statspack can store snapshots of system statistics over time, allowing greater accuracy and flexibility. This guide will walk you through the STATSPACK utility step-by-step. Collecting Snapshots: Oracle Snapshots are moment-in-time collections of all of the database statistics that the Oracle database continuously collects. Snapshots can be collected a various levels, each increasing level collecting a better information about the database.So to collect the better information we can increase the snaspshot level. Below table will describe the levels Level Information Collected 0 General Performance Statistics 5 Addition Data: SQL Statements 6 Addition Data: SQL Plans and SQL Plan Usage 7 Addition Data: Segment Level Statistics ...

Recover Standby using service

Introduction: From 12c onwards, Oracle provides  a new commands RECOVER FROM SERVICE for make the database sync if standby database is out of sync by reducing the steps. Prerequisites: Oracle Data Guard should be configured. Disable DG broker if any as it will start MRP automatically. Oracle version should be 12c or later. Environment: Server Primary Standby Hostname Source Target IP 192.168.80.51 192.168.80.111 OS OEL 9 OEL 9 SID ORCLDC ORCLDR Service Name ORCLDC ORCLDR Now proceed for recovery activity step by step: 1. Check difference of SCN at DB and file level between Primary and Standby. At Primary: SQL> select name, db_unique_name, database_role, open_mode from v$database; NAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE --------- ---...