> What is ASM in Oracle ?
Oracle ASM is Oracle's volume manager specially designed for Oracle database data. It is available since Oracle database version 10g and many improvements have been made in versions 11g release 1 and 2.
ASM offers support for Oracle RAC clusters without the requirement to install 3rd party software, such as cluster aware volume managers or filesystems.
ASM is shipped as part of the database server software (Enterprise and Standard editions) and does not cost extra money to run.
ASM simplifies administration of Oracle related files by allowing the administrator to reference disk groups rather than individual disks and files, which are managed by ASM.
The ASM functionality is an extention of the Oracle Managed Files (OMF) functionality that also includes striping and mirroring to provide balanced and secure storage. The new ASM functionality can be used in combination with existing raw and cooked file systems,along with OMF and manually managed files.
> Why should we use separate ASM home ?
ASM should be installed separately from the database software in its own ORACLE_HOME directory. This will allow you the flexibility to patch and upgrade ASM and the database software independently.
> How many ASM instances should one have ?
Several databases can share a single ASM instance. So, although one can create multiple ASM instances on a single system, normal configurations should have one and only one ASM instance per system.
For clustered systems, create one ASM instance per node (called +ASM1, +ASM2, etc).
> How many diskgroups should one have ?
Generally speaking one should have only one disk group for all database files – and, optionally a second for recovery files (see FRA).
> What is ASM Rebalancing ?
The rebalancing speed is controlled by the ASM_POWER_LIMIT initialization parameter. Setting it to 0 will disable disk rebalancing.
ALTER DISKGROUP data REBALANCE POWER 11;
> What happens when an Oracle ASM diskgroup is created ?
When an ASM diskgroup is created, a hierarchialfilesystem structure is created.
> How does this filesystem structure appear ?
Oracle ASM diskgroup'sfilesystem structure is similar to UNIX filesystem hierarchy or Windows filesystem hierarchy.
> Where are the Oracle ASM files stored ?
Oracle ASM files are stored within the Oracle ASM diskgroup. If we dig into internals, oracle ASM files are stored within the Oracle
ASM filesystem structures.
> How are the Oracle ASM files stored within the Oracle ASM filesystem structure ?
Oralce ASM files are stored within the Oracle ASM filesystem structures as objects that RDBMS instances/Oracle database instance access. RDBMS/Oracle instance treats the Oracle ASM files as standard filesystem files.
> What are the Oracle ASM files that are stored within the Oracle ASM file hierarchy ?
Files stored in Oracle ASM diskgroup/Oracl ASM filestructures include:
3) Server Parameter Files(SPFILE)
4) Redo Log files
> What happens when you create a file/database file in ASM?What commands do you use to create database files ?
Some common commands used for creating database files are :
1) Create tabespace
2) Add Datafile
3) Add Logfile
SQL> CREATE TABLESPACE TS1 DATAFILE '+DATA1' SIZE 10GB;
Above command creates a datafile in DATA1 diskgroup
> How can you access a databasefile in ASM diskgroup under RDBMS ?
Once the ASM file is created in ASM diskgroup, a filename is generated. This file is now visible to the user via the standard RDBMS view V$DATAFILE.
> What will be the syntax of ASM filenames ?
ASM filename syntax is as follows:
+diskgroup_name – Name of the diskgroup that contains this file
database_name – Name of the database that contains this file
datafile – Can be one among 20 different ASM file types
tag_name – corresponds to tablespace name for datafiles, groupnumber for redo log files
file_number – file_number in ASM instance is used to correlate filenames in database instance
incarnation_number – It is derived from the timestamp. IT is used to provide uniqueness
> What is an incarnation number ?
An incarnation number is a part of ASM filename syntax. It is derived from the timestamp. Once the file is created, its incarnation number doesnot 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 RAC ? What is the benefit of RAC over single instance database ?
In Real Application Clusters environments, all nodes concurrently execute transactions against the same database. Real Application
Clusters coordinates each node's access to the shared data to provide consistency and integrity. Benefits:
Improve response time
> What is Oracle RAC One Node ?
Oracle RAC one Node is a single instance running on one node of the cluster while the 2nd node is in cold standby mode. If the instance fails for some reason then RAC one node detect it and restart the instance on the same node or the instance is relocate to the 2nd node incase there is failure or fault in 1st node. The benefit of this feature is that it provides a cold failover solution and it automates the instance relocation without any downtime and does not need a manual intervention. Oracle introduced this feature with the release of 11gR2 (available with Enterprise Edition).
Real Application Clusters
Oracle RAC is a cluster database with a shared cache architecture that overcomes the limitations of traditional shared-nothing and shared-disk approaches to provide a highly scalable and available database solution for all your business applications. Oracle RAC provides the foundation for enterprise grid computing.
Oracle's Real Application Clusters (RAC) option supports the transparent deployment of a single database across a cluster of servers, providing fault tolerance from hardware failures or planned outages. Oracle RAC running on clusters provides Oracle's highest level of capability in terms of availability, scalability, and low-cost computing.
One DB opened by multipe instances so the the db ll be Highly Available if an instance crashes.
Cluster Software. Oracles Clusterware or products like Veritas Volume Manager are required to provide the cluster support and allow each node to know which nodes belong to the cluster and are available and with Oracle Cluterware to know which nodes have failed and to eject then from the cluster, so that errors on that node can be cleared.
Oracle Clusterware has two key components Cluster Registry OCR and Voting Disk.
The cluster registry holds all information about nodes, instances, services and ASM storage if used, it also contains state information ie they are available and up or similar.
The voting disk is used to determine if a node has failed, i.e. become separated from the majority. If a node is deemed to no longer belong to the majority then it is forcibly rebooted and will after the reboot add itself again the the surviving cluster nodes.
Advantages of RAC (Real Application Clusters)
Reliability – if one node fails, the database won't fail
Availability – nodes can be added or replaced without having to shutdown the database
Scalability – more nodes can be added to the cluster as the workload increases