How to check if MRP Process is Running

Below Query is Used to verify if MRP process is running fine on Standby Database, after any maintenance activity that requires disconnect to Primary and Standby database.
SQL> SELECT CLIENT_PROCESS, PROCESS, THREAD#, SEQUENCE#, STATUS FROM V$MANAGED_STANDBY;
Below is the sample output from the query:
SQL> SELECT CLIENT_PROCESS, PROCESS, THREAD#, SEQUENCE#, STATUS FROM V$MANAGED_STANDBY;
CLIENT_P PROCESS      THREAD#  SEQUENCE# STATUS
——– ——— ———- ———- ————
ARCH     ARCH               2     101072 CLOSING
ARCH     ARCH               0          0 CONNECTED
ARCH     ARCH               1     298101 CLOSING
ARCH     ARCH               2     103073 CLOSING
ARCH     ARCH               3      95398 CLOSING
ARCH     ARCH               1     296100 CLOSING
ARCH     ARCH               3      95399 CLOSING
ARCH     ARCH               3      95400 CLOSING
ARCH     RFS                0          0 IDLE
ARCH     RFS                0          0 IDLE
ARCH     RFS                0          0 IDLE
LGWR     RFS                2     101074 IDLE
LGWR     RFS                1     296102 RECEIVING
UNKNOWN  RFS                0          0 IDLE
UNKNOWN  RFS                0          0 IDLE
LGWR     RFS                3      95401 IDLE
UNKNOWN  RFS                0          0 IDLE
17 rows selected.

Protection Modes in Oracle Dataguard

We have 3 Protection modes available in Oracle DataGuard
1. Maximum Performance :
This is the default protection mode. It provides the highest level of data protection that is possible
without affecting the performance of a primary database. This is accomplished by allowing transactions to commit as soon as all redo data generated by those transactions has been written to the online log. 
2. Maximum Availability :
This protection mode provides the highest level of data protection that is possible without compromising the availability of a primary database. Transactions do not commit until all redo data needed to recover those transactions has been written to the online redo log and to at least one standby database.
3. Maximum Protection :
This protection mode ensures that no data loss will occur if the primary database fails. To provide this level of protection, the redo data needed to recover a transaction must be written to both the online redo log and to at least one standby database before the transaction commits. To ensure that data loss cannot occur, the primary database will shut down, rather than continue processing transactions.

What is Edition Based Redefinition (EBR) in Oracle?



Edition Based Redefinition (EBR) is a new feature introduced from Oracle Software Version 11g R2.Edition-based redefinition allows multiple versions of PL/SQL objects, views and synonyms in a single schema.This feature facilitates Online patching of database objects in R12.2 online Patching.

Editionable and Non-editionable Objects


Below schema object types are editionable in the database:

SYNONYM
VIEW
SQL translation profile

All PL/SQL object types:

FUNCTION
LIBRARY
PACKAGE and PACKAGE BODY
PROCEDURE
TRIGGER
TYPE and TYPE BODY

If a schema object type is editionable in the database, then it can be editionable in schemas.All other schema object types are noneditionable in the database and in every schema, and objects of that type are always noneditioned. Tables are always noneditioned objects.


To view the editions related information in the database, use the below datadictionary tables.

DBA_EDITIONS: SELECT * FROM dba_editions;

DBA_OBJECTS_AE: DBA_OBJECTS_AE view shows all objects, of all editions.

Oracle Recovery Manager Features: BACKUP AS COPY

What is the advantage backup as copy feature in RMAN?

RMAN(Recovery Manager) utility creates backup in the form of backupsets or backup pieces by default.RMAN utility also allows other method which is similar to user managed hot backup. It can be acheived using ‘BACKUP AS COPY’ command.Using “Backup as Copy” RMAN creates backup in the form of image copies. However, we do not need to put the database in begin backup/end backup mode as in Conventional Hot Backup.

Syntax for Datafile Backup using Backup as copy:

RMAN> backup as copy datafile 1 format ‘/backup/data/datafile01.dbf’ ;



Another advantage of this feature is that it allows to create image copy of control file.

 RMAN> backup as copy current controlfile format ‘F:CntrlFile_Bkp.ctl’;  



How do we identify backups taken  as Image copies using RMAN?


Use “LIST COPY” Command. “LIST BACKUP” only gives a list of backup sets which were created using default RMAN backup Methos.

Syntax:

RMAN> LIST COPY;

Oracle RMAN (Recovery Manager) Concepts

What is the difference between obsolete and expired Backup in RMAN?

Obsolete Backup: Backup pieces or backup sets which are not needed for recovery.
We can use the REPORT OBSOLETE command to list the obsolete backups and DELETE OBSOLETE command to delete the obsolete backup.

Expired Backup:When the CROSSCHECK command is used to determine whether backups recorded in the repository still exist on disk or tape, if RMAN cannot locate the backups, then it updates their records in the RMAN repository to EXPIRED status.We can then use the DELETE EXPIRED command to remove records of expired backups from the RMAN repository.


Oracle DBA Concepts: Background Processes in Oracle ASM (Automatic storage Management)

The following background processes are an integral part of Automatic Storage Management:


ARBn performs the actual rebalance data extent movements in an Automatic Storage Management instance. There can be many of these processes running at a time, named ARB0, ARB1, and so on.


ASMB runs in a database instance that is using an ASM disk group. ASMB communicates with the ASM instance, managing storage and providing statistics. ASMB can also run in the ASM instance. ASMB runs in ASM instances when the ASMCMD cp command runs or when the database instance first starts if the SPFILE is stored in ASM.


GMON maintains disk membership in ASM disk groups.


MARK marks ASM allocation units as stale following a missed write to an offline disk. This essentially tracks which extents require resync for offline disks.


RBAL runs in both database and ASM instances. In the database instance, it does a global open of ASM disks. In an ASM instance, it also coordinates rebalance activity for disk groups.


How to change Rebalance Power in ASM Instances?

Whenever a new diskgroup is added or dropped, ASM automatically performs REBALANCING operation.Power used by rebalacing defaults to value specified for asm_power_limit initialization parameter.We can check the status of rebalancing from v$asm_operation view.

Increasing the value of ASM_POWER_LIMIT, reduces the estimated time for completion of Rebalance Operation.

ASM power limit can be increased using the below command

alter system set asm_power_limit =11;

To know more about values for this parameter, check this link:

http://www.appsdbadiaries.com/2017/06/asm-features-rebalancing.html


But this does not increase the rebalancing power of current operation. 

To increase the rebalancing power of ongoing operation, use the below command

 alter diskgroup dg1 rebalance power 11;

We can also specify rebalance power at the time of adding or dropping disks.

alter diskgroup dg1 add disk d01 rebalance power 11;


When to use asm_power_limit 0?

Whenever there is a need to add/drop several disks (like migrations), setting the power limit to 0 is highly beneficial.We can avoid the waiting time for rebalance operation to complete,before the next disk is rebalanced.In such cases, set the asm_power_limit to 0, add/drop all the disks and set the value of asm_power_limit to a non zero value.
Rebalance operation will be parallelized and completes faster.


Initialization Parameters Required for Oracle ASM (Automatic Storage Management)

The below parameters are required for ASM instance.


1. INSTANCE_TYPE 


INSTANCE_TYPE specifies whether the instance is a database instance or an Automatic Storage Management instance.


Values:


RDBMS


The instance is a database instance.


ASM


The instance is an Automatic Storage Management instance.




2. DB_UNIQUE_NAME 


DB_UNIQUE_NAME specifies a globally unique name for the database


Default value
Database instances: the value of DB_NAME
Automatic Storage Management instances: +ASM


3. ASM_POWER_LIMIT 


ASM_POWER_LIMIT specifies the maximum power on an Automatic Storage Management instance for disk rebalancing. The higher the limit, the faster rebalancing will complete. Lower values will take longer, but consume fewer processing and I/O resources.


Default value 1


Range of Values 0 to 11 (Prior to 11gR2)

Range of Values 0 to 1024(From 11gR2)






4. ASM_DISKGROUPS 


ASM_DISKGROUPS specifies a list of names of disk groups to be mounted by an Automatic Storage Management instance at instance startup or when an ALTER DISKGROUP ALL MOUNT statement is issued.


Automatic Storage Management (ASM) automatically adds a disk group to this parameter when the disk group is successfully created or mounted, and automatically removes a disk group from this parameter when the disk group is dropped or dismounted.


Issuing the ALTER DISKGROUP…ALL MOUNT or ALTER DISKGROUP…ALL DISMOUNT command does not affect the value of this parameter.


5.ASM_DISKSTRING 


ASM_DISKSTRING specifies an operating system-dependent value used by Automatic Storage Management to limit the set of disks considered for discovery. When a new disk is added to a disk group, each Automatic Storage Management instance that has the disk group mounted must be able to discover the new disk using the value of ASM_DISKSTRING.


6. ASM_PREFERRED_READ_FAILURE_GROUPS 


ASM_PREFERRED_READ_FAILURE_GROUPS specifies the failure groups that contain preferred read disks. Preferred disks are instance specific. This parameter is only valid in ASM instances.