Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Monday, October 21, 2019

OMF (Oracle Manage Files)

OMF (Oracle Manage Files) is a database feature, that simplifies tablespace creation. Using OMF, Oracle will automatically assign datafile names to tablespaces and automatically create and delete the required datafiles the operating-system level. It is introduced in Oracle 9i.

These are the parameter for this feature:

db_create_file_dest and db_create_online_log_dest_n.

The db_create_file_dest specifies, where the datafiles will be placed.
The db_create_online_log_dest_n specifies, where the online logs will be placed. Use 1,2,3 instead of n, when you want to have 3 members in each group.

Example:
db_create_file_dest='/oracle/oradata'
db_create_online_log_dest_1='/oracle/oradata'
db_create_online_log_dest_2='/oracle/oradata

How to convert NON-OMF to OMF files ( Oracle Managed File conversion - NON-ASM ) (Doc ID 2182089.1)

Wednesday, October 16, 2019

demilitarized zones (DMZ)

A DMZ is simply a place that is under your control but outside of your internal network and it a place to put servers that you want outsiders to reach but you don't want them to get to your internal network. By limiting access, you can also fine tune monitoring.

However, you would want to expose a portion of these internal applications outside your enterprise for your non-employee users like customers and vendors. For example, Oracle E-Business Suite (flagship Oracle ERP application) has some of the modules like iRecruitment, iSupplier, iStore etc.


In Oracle Application how the nodes (FND_NODES) is to exposed:

>To expose to public use the profile “Node Trust Level”

>Set node to Public/Private (Normal -> private, External -> public)

>Set "Responsibility Trust Level" profile to decide whether to expose Application Responsibility to inside or outside firewall.

Internal Applications Tier
The internal applications tier is the server configured for internal users to access Oracle E-Business Suite. It runs the following major application services:

Web and Forms Services
WebLogic Administration service, Node Manager, Oracle HTTP Server, OPMN, WebLogic Managed Servers
Concurrent Manager Services
Reports and Discoverer Services
External Applications Tier
The external applications tier is the server configured for external users for accessing Oracle E-Business Suite. It runs the following application service:

Oracle HTTP Server
WebLogic components like node manager, managed servers etc.

OPMN
Oracle Process Manager and Notification Server (OPMN) is installed and configured on every tier designated to run the web application.  OPMN provides an integrated way to manage all Oracle Application Server components.  OPMN consists of two main pieces:  the Process Manager and the Notification Server. The Process manager (PM) is the centralized process management mechanism in Oracle Application Server and is used to manage the Oracle HTTP Server. The PM starts, restarts, stops, and monitors every process it manages. It also performs death-detection and automatic restart of the processes. Oracle Notification Server (ONS) is the transport mechanism for failure, recovery, startup, and other related notifications between components in Oracle Application Server.

OHS
Oracle HTTP Server (OHS) is installed and configured on every tier that is designated to run the web application . It provides the key infrastructure required for serving the static and dynamic content generated by Oracle E Business Suite products.

Webgate is an out-of-box client which enforces OAM policies on HTTP resources. Typically, it is installed on the webserver like apache and traps all incoming http traffic before it hits core apache. In this fashion, webgate can enforce OAM policies on the http resources residing on the http server.

Oracle id related reference:
Oracle E-Business Suite 11i Configuration in a DMZ (Metalink Note 287176.1)
Oracle E-Business Suite Release 12 Configuration in a DMZ (Metalink Note 380490.1)
Oracle E-Business Suite Release 12.2 Configuration in a DMZ (Doc ID 1375670.1)


Sunday, October 6, 2019

Recover a table:

In previous releases point in time recovery of a table or table partition was only possible by manually creating a point in time clone of the database.

For TSPITR, we need to specify the auxiliary destination where RMAN would create a temporary database by restoring the controlfile, SYSTEM
tablespace, UNDO tablespace, SYSAUX tablespace and finally the tablespace that needs to be recovered.

Once the temporary database is restored and recovered, RMAN automatically exports the contents of tablespace to be recovered from the
temproary tablespace to a dump file and imports this dump into the Target(Main) database where the table was dropped.


rman target /
RMAN> run
2> {
3> recover tablespace MYTS until time "to_date('2013-05-04:11:38:00','YYYY-MM:DD:HH24:MI:SS')" auxiliary destination '+FRA';
4> }


Once the import is done successfully, RMAN automatically deletes the temporary database that it had created earlier.

Now, lets connect to the main database and check if we are able to access the dropped table. But, before that, you need to bring the tablespace online.

recovering a dropped table with flashback:The recyclebin feature introduced in Oracle 10g allows you to recover dropped tables using the flashback table...to before drop command. With recyclebin, Oracle does not automatically delete dropped tables. Instead, Oracle renames dropped and their associated objects, giving them system-generated recyclebin names that begin with BIN$.

SQL> select object_name, original_name, type from recyclebin;
 OBJECT_NAME                       ORIGINAL_NAME              TYPE   
  ------------------------------    -----------------------    -------
BIN$ABCSD5   TESTING                    TABLE
select * from "BIN$ABCSD5" ;
SQL> flashback table testing to before drop;
SQL> select index_name from user_indexes where table_name = 'testing';
 alter index "recyclebin_name" rename to original_name;


New in Oracle 12c is the Multitenant Architecture, as well as the ability to restore one table from an RMAN backup.


RECOVER TABLE TEST.T1 UNTIL SCN 1853267 AUXILIARY DESTINATION '/u01/aux' REMAP TABLE 'TEST'.'T1':'T1_PREV';
recover table hari.emp until time "to_date('2018-08-14 21:53:42','yyyy-mm-dd:hh24:mi:ss')" auxiliary destination '/u01/fra';
recover table hari.emp until time "to_date('2018-08-14 21:53:42','yyyy-mm-dd:hh24:mi:ss')" auxiliary destination '/u01/fra';

run {

recover table example.test_restore of pluggable database PDB2

until time "to_date('12-01-2016 17:16:00','mm/dd/yyyy hh24:mi:ss')"

auxiliary destination '/oradata/CDB2/aux'

;

}

RMAN> run {

recover table example.test_restore of pluggable database PDB2

until time "to_date('12-01-2016 17:16:00','mm/dd/yyyy hh24:mi:ss')"

auxiliary destination '/oradata/CDB2/aux'

;

}

=================

1.Flashback features:

SHOW RECYCLEBIN;
flashback table <table> to before drop;
FLASHBACK TABLE HR.REG_HIST TO BEFORE DROP;

2.Database Point-in-Time Recovery:

3. Tablespace point-in-time recovery (TSPITR) :

4. Oracle 12c Table Point-in-time Recovery:

rman target /

RMAN> recover table emp.emp until time "to_date('2010-05-16 02:21:27','yyyy-mm-dd:hh24:mi:ss')" auxiliary destination '/u02/RC_BKP';

RMAN> recover table mm.test until time "to_date('00/17/2013 21:01:15','mm/dd/yyyy hh24:mi:ss')" auxiliary destination '/u03/app/oracle/ux' remap table mm.test:test_temp;

Redo logs Details:

Oracle writes to only one online redo log group at a time.Once the online redo log(s) in that group are filled then Oracle will switch to writing the next online redo log group, and so on in a circular fashion.

Each online redo log is assigned a unique sequence number.

We can multiplex each online redo log group. This means that each redo log group can consist of more than one online redo log file. Each file is known as a member. Each member should be located on a different disk, to protect the group from losing all of its members in the event a disk failure should occur. Oracle writes to those members in parallel, to ensure that the database is always recoverable while maintaining performance.

The online redo logs are first created when the database is created, and the database cannot live without them.If all members of the active redo log group are lost, the database crashes, and worse yet, there will be data loss.

Redo logs can have following STATUS’s (select status from v$log;):-

CURRENT – Current redo log. This implies that the redo log is active. The redo log could be open or closed.
ACTIVE – Log is active but is not the current log. It is needed for crash recovery. It may be in use for block recovery. It may or may not be archived.
INACTIVE – Log is no longer needed for instance recovery. It may be in use for media recovery. It might or might not be archived.
CLEARING – Log is being re-created as an empty log after an ALTER DATABASE CLEAR LOGFILE statement. After the log is cleared, the status changes to UNUSED.
CLEARING_CURRENT – Current log is being cleared of a closed thread. The log can stay in this status if there is some failure in the switch such as an I/O error writing the new log header.
UNUSED – Online redo log has never been written to. This is the state of a redo log that was just added, or just after a RESETLOGS, when it is not the current redo log.

Alter system switch logfile;

To switch the logfile to change the STATUS of the logfile from CURRENT to ACTIVE or INACTIVE.

"alter system checkpoint" causes the current active redo log file members inactive
by flushing dirty buffers to data files and recording SCN to data file header and control file,
so that we could drop this group.

ALTER SYSTEM SWITCH LOGFILE vs ALTER SYSTEM ARCHIVE LOG CURRENT:

Both will force a log switch but  will be different way.
ALTER SYSTEM ARCHIVELOG CURRENT is the preferred one that should be used for backup scripts.

The reason being,when you do an 'ALTER SYSTEM SWITCH LOGFILE', you get the prompt back immediately. This command performs a database checkpoint, switches to the next log, In background signals the  archiver to copy the logfile to the archive destination, and returns the prompt.This does not wait for the archive to complete.

Whereas, an 'ALTER SYSTEM ARCHIVE LOG CURRENT' does all of the above, but does not return back to the prompt until the archive is complete.This command is safer because it waits for the OS to acknowledge(ACK) that the redo log has been successfully written.

If you are running RAC, the ALTER SYSTEM ARCHIVE LOG CURRENTwill switch the logs on all RAC nodes (instances), whereas ALTER SYSTEM SWITCH LOGFILE will only switch he logfile on the instance where you issue the switch command.  Hence, ALTER SYSTEM ARCHIVE LOG CURRENT is a best practice for RAC systems.

Alter system switch logfile, tells the background processes to perform the archiving of the current redo log and returns control immediately to the session issuing the statement.

Alter system archive log current, means your server/shadow process performs the arhciving and control is only returned to the session once the archiving is complete.

It issues database checkpoint
It immediately starts writing to the next redo log
In the background, the "switch logfile" command tells the ARCH background process to copy the "old" redo log file to the redo log filesystem. 

ARCHIVE LOG CURRENT waits for the ARCHiver to complete its writing.

SWITCH LOGFILE will not wait for the ARCHiver to complete writing online redo logs to archivelog log filesystem. This is fast.

Few related queries:

set lines 200 pages 200
col GROUP for a10
col TYPE for a20
col MEMBER for a100
col IS_ for a70
select * from v$log; 1:00 PM 
select GROUP#,THREAD#,MEMBERS,STATUS from v$log;

col status for a10;
col GROUP# for 9999;
col type for a10;
col member for a85;
col IS_RECOVERY_DEST_FILE for a5;
set lines 300

select * from v$logfile; 

col status for a10;
col GROUP# for 9999;
col type for a10;
col member for a85;
col IS_RECOVERY_DEST_FILE for a5;
set lines 300
select group#,thread#,members,status,bytes from v$log; 
select * from v$logfile; 

set lines 200 pages 200
col GROUP for a10
col TYPE for a20
col MEMBER for a100
col IS_ for a70
select * from v$log;  
select GROUP#,THREAD#,MEMBERS,STATUS,MEMBERS from v$log;
select * from v$logfile; 


select member, a.group#, a.status, b.status from v$log a, v$logfile b where  a.group# = b.group#  order by a.group#, member;

https://databaseinternalmechanism.com/oracle-backup-recovery/recovering-from-the-loss-of-redo-log-files/


Recovering from the LOSS of REDO log files >>https://databaseinternalmechanism.com/oracle-backup-recovery/recovering-from-the-loss-of-redo-log-files/


Friday, October 4, 2019

Interview Questions and Answers -ASM

What are different types of redundancies in ASM & explain?
When you will use external redundancy and what are the advantages of it?

How to copy file to/from ASM from/to filesystem?

By using ASMCMD cp command

How to find out the databases, which are using the ASM instance?

ASMCMD> lsct
SQL> select DB_NAME from V$ASM_CLIENT;

What is Automatic Storage Management (ASM)?

Automatic Storage Management (ASM) is a new feature that has be introduced in Oracle 10g to simplify the storage of Oracle datafiles, controlfiles and logfiles.Automatic Storage Management (ASM) is an integrated file system and volume manager expressly built for Oracle database files.An Oracle ASM instance is built on the same technology as an Oracle Database instance. An Oracle ASM instance has a System Global Area (SGA) and background processes that are similar to those of Oracle Database. However, because Oracle ASM performs fewer tasks than a database, an Oracle ASM SGA is much smaller than a database SGA. In addition, Oracle ASM has a minimal performance effect on a server. Oracle ASM instances mount disk groups to make Oracle ASM files available to database instances; Oracle ASM instances do not mount databases. 

What are ASM Background Processes in Oracle?

ASMB – Oracle background process. In an DB instance, keeps a (bequeath) persistent DB connection to the local ASM instance. Provides heart-beat and ASM statistics. During a diskgroups rebalancing operation ASM communicates to the DB AU changes via this connection.
RBAL – Re-Balance - RBAL is the ASM related process that performs rebalancing of disk resources controlled by ASM. In a DB instance, opens and mount diskgroups from the local ASM instance.
ARBx – Actual Rebalance - ARBx is configured by ASM_POWER_LIMIT, a slave for rebalancing operations.
PSPx – Oracle backgroud processes. In an ASM instance, Process Spawners
GMON – Oracle backgroud processes. In an ASM instance, diskgroup monitor.

O00x – Oracle backgroud processes. Slaves used to connected from the DB to the ASM instance for ‘short operations’.

What are ASM instance initialization parameters?

INSTANCE_TYPE – Set to ASM or RDBMS depending on the instance type. The default is RDBMS.

DB_UNIQUE_NAME – Specifies a globally unique name for the database. This defaults to +ASM but must be altered if you intend to run multiple ASM instances.

ASM_POWER_LIMIT -The maximum power for a rebalancing operation on an ASM instance. The valid values range from 1 to 11, with 1 being the default. The higher the limit the more resources are allocated resulting in faster rebalancing operations. This value is also used as the default when the POWER clause is omitted from a rebalance operation.

ASM_DISKGROUPS – The list of disk groups that should be mounted by an ASM instance during instance startup, or by the ALTER DISKGROUP ALL MOUNT statement. ASM configuration changes are automatically reflected in this parameter.

ASM_DISKSTRING – Specifies a value that can be used to limit the disks considered for discovery. Altering the default value may improve the speed of disk group mount time and the speed of adding a disk to a disk group. Changing the parameter to a value which prevents the discovery of already mounted disks results in an error. The default value is NULL allowing all suitable disks to be considered.

What is ASM Disks ?
The physical disks are known as ASM disks, while the files that reside on the disks are know as ASM files.The disks in a disk group are referred to as ASM disks. On Windows operating systems, an ASM disk is always a partition.

When an ASM instance starts, it automatically discovers all available ASM disks.Discovery is the process of determining every disk device to which the ASM instance has been given I/O permissions (by some operating system mechanism), and of examining the contents of the first block of such disks to see if they are recognized as belonging to a disk group. ASM discovers disks in the paths that are listed in an initialization parameter, or if the parameter is NULL, in an operating system–dependent default path.

What is ASM diskgroups?
The primary component of ASM is the disk group. A disk group consists of a grouping of disks that are managed together as a unit.

What is Failure groups?

They are defined within a disk group to support the required level of redundancy. For two-way mirroring you would expect a disk group to contain two failure groups so individual files are written to two locations.

A Failure Group is a subset of the disks in a Diskgroup, which could fail at the same time because they
share a common piece of hardware. The failure of that common piece of hardware must be tolerated.

**A Failure Group is a subset of the disks in a Diskgroup.They are defined within a disk group to support the required level of redundancy.Failure Groups are used to place mirror copies of data.

Failure groups are used to determine which ASM disks to use for storing redundant copies of data. For example, if 2-way mirroring is specified for a file, ASM automatically stores redundant copies of file extents in separate failure groups. Failure groups apply only to normal and high redundancy disk groups. You define the failure groups in a disk group when you create or alter the disk group.

What is stripping and mirroring?

Striping is spreading data across multiple disks so that IO is spread across multiple disks and hence increase in throughput. It provides read/write performance but fail over support.
ASM offers two types of striping, with the choice depending on the type of database file. Coarse striping uses a stripe size of 1MB, and you can use coarse striping for every file in your database, except for the control files, online redo log files, and flashback files. Fine striping uses a stripe size of 128KB. You can use fine striping for control files, online redo log files, and flashback files.

Mirroring means redundancy. It may add performance benefit for read operations but overhead for write operations. It’s basic purpose is to provide fail over support.
If you specify mirroring for a file, then Oracle ASM automatically stores redundant copies of the file extents in separate failure groups.

There are three ASM mirroring options/There are three types of ASM disk groups:

High Redundancy – In this configuration, for each primary extent, there are two mirrored extents. For Oracle Database Appliance this means, during normal operations there would be three extents (one primary and two secondary) containing the same data, thus providing “high” level of protection. Since ASM distributes the partnering extents in a way that prevents all extents to be unable due to a component failure in the IO path, this configuration can sustain at least two simultaneous disk failures on Oracle Database Appliance (which should be rare but is possible).

******
Oracle ASM provides triple mirroring by default. A loss of two Oracle ASM disks in different failure groups is tolerated.

A high redundancy disk group can tolerate the failure of two failure groups. If one or two failure groups fail, the disk group remains mounted and serviceable, and ASM performs a rebalance of the surviving disks to restore redundancy for the data in the failed disks. If more than two failure groups fail, ASM dismounts the disk group.

Normal Redundancy – In this configuration, for each primary extent, there is one mirrored (secondary) extent. This configuration protects against at least one disk failure. Note that in the event a disk fails in this configuration, although there is typically no outage or data loss, the system operates in a vulnerable state, should a second disk fail while the old failed disk replacement has not completed. Many Oracle Database Appliance customers thus prefer the High Redundancy configuration to mitigate the lack of additional protection during this time.

**********
Oracle ASM provides two-way mirroring by default, which means that all files are mirrored so that there are two copies of every extentOpens a new window. A loss of one Oracle ASM disk is tolerated. You can optionally choose three-way or unprotected mirroring.

A file specified with HIGH redundancy (three-way mirroring) in a NORMAL redundancy disk group provides additional protection from a bad disk sector, not protection from a disk failure.

A normal redundancy disk group can tolerate the failure of one failure group. If only one failure group fails, the disk group remains mounted and serviceable, and ASM performs a rebalance of the surviving disks (including the surviving disks in the failed failure group) to restore redundancy for the data in the failed disks. If more than one failure group fails, ASM dismounts the disk group.

External Redundancy – In this configuration there are only primary extents and no mirrored extents. This option is typically used in traditional non-appliance environments when the storage sub-system may have existing redundancy such as hardware mirroring or other types of third-party mirroring in place. Oracle Database Appliance does not support External Redundancy.8. What is a diskgroup?
A disk group consists of multiple disks and is the fundamental object that ASM manages. Each disk group contains the metadata that is required for the management of space in the disk group. The ASM instance manages the metadata about the files in a Disk Group in the same way that a file system manages metadata about its files. However, the vast majority of I/O operations do not pass through the ASM instance. In a moment we will look at how file
I/O works with respect to the ASM instance.

*****
Oracle ASM does not provide mirroring redundancy and relies on the storage system to provide RAID functionality. Any write error causes a forced dismount of the disk group. All disks must be located to successfully mount the disk group.

An external redundancy disk group cannot tolerate the failure of any disks in the disk group. Any kind of disk failure causes ASM to dismount the disk group.

What are different types of redundancies in ASM & explain?

* Normal redundancy

* High redundancy

* External redundancy

The redundancy level controls how many disk failures are tolerated without dismounting the disk group or losing data.

External redundancy

Oracle ASM does not provide mirroring redundancy and relies on the storage system to provide RAID functionality. Any write error causes a forced dismount of the disk group. All disks must be located to successfully mount the disk group.

An external redundancy disk group cannot tolerate the failure of any disks in the disk group. Any kind of disk failure causes ASM to dismount the disk group.

Normal redundancy

Oracle ASM provides two-way mirroring by default, which means that all files are mirrored so that there are two copies of every extentOpens a new window. A loss of one Oracle ASM disk is tolerated. You can optionally choose three-way or unprotected mirroring.

A file specified with HIGH redundancy (three-way mirroring) in a NORMAL redundancy disk group provides additional protection from a bad disk sector, not protection from a disk failure.

A normal redundancy disk group can tolerate the failure of one failure group. If only one failure group fails, the disk group remains mounted and serviceable, and ASM performs a rebalance of the surviving disks (including the surviving disks in the failed failure group) to restore redundancy for the data in the failed disks. If more than one failure group fails, ASM dismounts the disk group.

High redundancy

Oracle ASM provides triple mirroring by default. A loss of two Oracle ASM disks in different failure groups is tolerated.

A high redundancy disk group can tolerate the failure of two failure groups. If one or two failure groups fail, the disk group remains mounted and serviceable, and ASM performs a rebalance of the surviving disks to restore redundancy for the data in the failed disks. If more than two failure groups fail, ASM dismounts the disk group.

******
Normal redundancy - for 2-way mirroring, requiring two failure groups, when ASM allocates an extent for a normal redundancy file, ASM allocates a primary copy and a secondary copy. ASM chooses the disk on which to store the secondary copy in a different failure group other than the primary copy.
High redundancy - for 3-way mirroring, requiring three failure groups, in this case the extent is mirrored across 3 disks.
External redundancy - to not use ASM mirroring. This is used if you are using hardware mirroring or third party redundancy mechanism like RAID, Storage arrays.

What is ASM Rebalancing?

Any change in the storage configuration like disk addition or dropping will trigger a oracle ASM rebalance operation  The main objective of the oracle ASM rebalance operation is to always provide an even distribution of file extents and space usage across all disks in the diskgroup. Rebalancing is performed on all database files on a per file basis.
RBAL will calculate estimation time and work required to perform the task and then message the
ARBx processes to actually handle the request. The number of ARBx processes invoked is
directly determined by the asm_power_limit.

Select * from v$asm_operation

****************
ASM enables you to change the storage configuration without having to take the database offline. It automatically rebalances—redistributes file data evenly across all the disks of the disk group—after you add disks to or drop disks from a disk group.

Effects of Adding and Dropping Disks from a Disk Group

ASM automatically rebalances whenever disks are added or dropped. For a normal drop operation (without the FORCE option), a disk is not released from a disk group until data is moved off of the disk through rebalancing. Likewise, a newly added disk cannot support its share of the I/O workload until rebalancing completes. It is more efficient to add or drop multiple disks at the same time so that they are rebalanced as a single operation. This avoids unnecessary movement of data.

For a drop operation, when rebalance is complete, ASM takes the disk offline momentarily, and then drops it, setting disk header status to FORMER.

You can add or drop disks without shutting down the database. However, a performance impact on I/O activity may result.

Tuning Rebalance Operations

The V$ASM_OPERATION view provides information that can be used for adjusting ASM_POWER_LIMIT and the resulting power of rebalance operations. The V$ASM_OPERATION view also gives an estimate in the EST_MINUTES column of the amount of time remaining for the rebalance operation to complete. You can see the effect of changing the rebalance power by observing the change in the time estimate.

SET pagesize 299
SET lines 2999
SELECT GROUP_NUMBER,
       OPERATION,
       STATE,
       POWER,
       ACTUAL,
       ACTUAL,
       EST_MINUTES
FROM gv$asm_operation;

What processes does the rebalancing?


RBAL, ARBx

What is the use of ASM_POWER_LIMIT?

ASM_POWER_LIMIT is dynamic parameter, which will be useful for rebalancing the data across disks.Value can be 1(lowest) to 11 (highest).

What is an incarnation number?

An incarnation number is a part of ASM filename syntax. It is derived from the time stamp. Once the file is created, its incarnation number doesn’t change.

What is the use of an incarnation number in Oracle ASM filename?

Incarnation number distinguishes between a new file that has been created using the same file number and another file that has been deleted

What is an oracle flex ASM?
Answer Oracle flex ASM is a feature that enables an ASM instance to run on separate physical servers from the database servers

What is the use of asmadmin?
Answer asadmin is the operating system group that holds users who have sysasm database privilege. This privilege is needed for operations like mounting disk group, dismounting disk group, storage administration

What is the purpose of asmoper operating system group?
asmoper operating system group is used for users that have the privilege to startup and stop the oracle ASM instance. The database privilege for these users will be sysoper for asm

What is the difference between asmdba and asmoper?
The users belonging to asmdba group have sysdba database privilege at ASM level. This is the highest administrative privilege needed for oracle ASM. Whereas, asmoper is given sysoper privilege which is less than asmdba

What are different types of stripings in ASM & their differences?

Fine-grained striping
Coarse-grained striping

What are different types of stripings in ASM & their differences?

Fine-grained striping
Coarse-grained striping

What happen if you miss "+" sign while adding datafile in ASM disk group ?

What is allocation unit and what is default value of au_size and how to change?

Every ASM disk is divided into allocation units (AU). An AU is the fundamental unit of allocation within a disk group. A file extent consists of one or more AU. An ASM file consists of one or more file extents.
CREATE DISKGROUP disk_group_2 EXTERNAL REDUNDANCY DISK '/dev/sde1' ATRRIBUTE 'au_size' = '32M';
lsdg
select NAME,ALLOCATION_UNIT_SIZE from v$asm_diskgroup;

What are different types of redundancies in ASM & explain?


Normal redundancy - for 2-way mirroring, requiring two failure groups, when ASM allocates an extent for a normal redundancy file, ASM allocates a primary copy and a secondary copy. ASM chooses the disk on which to store the secondary copy in a different failure group other than the primary copy.
High redundancy - for 3-way mirroring, requiring three failure groups, in this case the extent is mirrored across 3 disks.
External redundancy - to not use ASM mirroring. This is used if you are using hardware mirroring or third party redundancy mechanism like RAID, Storage arrays.

When you will use external redundancy and what are the advantages of it?

What is allocation unit and what is default value of au_size and how to change?

Every ASM disk is divided into allocation units (AU). An AU is the fundamental unit of allocation within a disk group. A file extent consists of one or more AU. An ASM file consists of one or more file extents.
CREATE DISKGROUP disk_group_2 EXTERNAL REDUNDANCY DISK '/dev/sde1' ATRRIBUTE 'au_size' = '32M';
lsdg
select NAME,ALLOCATION_UNIT_SIZE from v$asm_diskgroup;

What are different types of redundancies in ASM & explain?


Normal redundancy - for 2-way mirroring, requiring two failure groups, when ASM allocates an extent for a normal redundancy file, ASM allocates a primary copy and a secondary copy. ASM chooses the disk on which to store the secondary copy in a different failure group other than the primary copy.
High redundancy - for 3-way mirroring, requiring three failure groups, in this case the extent is mirrored across 3 disks.
External redundancy - to not use ASM mirroring. This is used if you are using hardware mirroring or third party redundancy mechanism like RAID, Storage arrays.

When you will use external redundancy and what are the advantages of it?

What can be the various header status that an ASM disk can assume?

MEMBER :

Disks that belong to a disk group, that is, disks that have a disk group name in the disk header, show a header status of MEMBER.

CANDIDATE :

Disks that were discovered, but that have not yet been assigned to a disk group, have a status of CANDIDATE

PROVISIONED :

PROVISIONED status implies that an additional platform-specific action has been taken by an administrator to make the disk available for Oracle ASM. These disks are discovered by ASM

FORMER :

Disks that previously belonged to a disk group and were dropped cleanly from the disk group have a status of FORMER.

FOREIGN :

When adding a disk, the FORCE option must be used if Oracle ASM recognizes that the disk was managed by Oracle. Such a disk appears in the V$ASM_DISK view with a status of FOREIGN. In this case, you can only add the disk to a disk group by using the FORCE keyword.

What is  ASM: Backup and restore DG metadata?

Overview – ASMCMD md_backup and md_restore

ASMCMD 11g  is extended to include ASM disk group metadata backup and restore functionality.
This provides the ability to recreate a pre-existing ASM disk group with the same disk paths,disk names,failure groups, attributes, templates and alias directory structure
In 10g you have to manually recreate the ASM disk group and any required user directories/templates.
In 11g we can take backup of ASM diskgroup metadata
The md_backup command creates a backup file containing metadata for one or more disk groups. i
By default all the mounted disk groups are included in the backup file which is saved in the current working directory.

ASM diskgroup metadata backup is performed using md_backup command. If no diskgroup specified ASM md_backup backs up all the mounted diskgroup metadata.
ASMCMD 11g  is extended to include ASM disk group metadata backup and restore functionality.
Backup All Mounted Diskgroup
ASMCMD> md_backup /home/oragrid/dg_bkp
Backup Specific Diskgroup
ASMCMD> md_backup /home/oragrid/dg_bkp_DG_TST2_DATA -G DG_TST2_DATA
ASMCMD> md_backup /home/oragrid/dg_bkp_DG_FLEX_DATA -G DG_FLEX_DATA
Disk group metadata to be backed up: DG_FLEX_DATA

How to Restore ASM DiskGroup Metadata
Backup taken using md_backup can only be stored using md_restore
Restoring Diskgroup with Same Name as Before
ASMCMD> md_restore /home/oragrid/dg_bkp_DG_FLEX_DATA --full -G DG_FLEX_DATA
Restoring Diskgroup with Different Name
Restoring the diskgroup DG_FLEX_DATA as DG_FLEX_FRA
ASMCMD>md_restore /home/oragrid/dg_bkp_DG_FLEX_DATA --newdg -o 'DG_FLEX_DATA:DG_FLEX_FRA'

**ASMCMD – New commands in 11gR1 (Doc ID 451900.1)

Adding New Disk To ASM Diskgroup >>https://dbaclass.com/article/adding-new-disk-asm-diskgroup/
http://www.nazmulhuda.info/how-to-add-disk-in-asm-disk-group
https://dbaclass.com/article/adding-new-disk-asm-diskgroup/
https://www.thegeekdiary.com/how-to-add-new-disk-to-an-existing-diskgroup-on-rac-cluster-or-standalone-asm-configuration/