Home » Oracle » Oracle Database » Top 46 Oracle ASM Interview Questions

Top 46 Oracle ASM Interview Questions

Oracle ASM is widely used in the IT industry. In this post, I have compiled the Top 46 Oracle ASM Interview Questions to enhance knowledge about Oracle ASM instances. These questions are good for basic and experienced levels. We have also given the advanced Level Interview questions

Basic Level Oracle ASM Interview Questions

Question 1
What is ASM in Oracle?

Answer

  • 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 and 12c
  • ASM offers support for Oracle RAC clusters without the requirement to install 3rd party software, such as cluster-aware volume managers or file systems.
  • ASM is shipped as part of the database server software (Enterprise and Standard editions) and does not cost extra money to run.
  • ASM simplifies the 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 extension 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. Learn more on the below link

Oracle Automatic Storage Management

Question 2
What is the ASM instance in Oracle?

Answer  
The ASM functionality is controlled by an ASM instance. This is not a full database instance, just the memory structures, and as such is very small and lightweight.

Characteristics of Oracle ASM instance

  • The ASM instance, which is generally named +ASM1, is started with the INSTANCE_TYPE=ASM init.ora parameter
  • Do not mount the database but manage metadata required to make ASM files available for DB instances
  • DB Instance access ASM files directly and connects with ASM instance only for the layout of ASM files
  • Requires only the init.ora file for startup
  • Instance Name is +ASM or +ASM1 for RAC
  • ASM instance can be started in the same database home or separate homes also

Question 3

What are ASM Background Processes in Oracle?

Answer

Oracle ASM Interview Questions

Question 4
What are ASM instance initialization parameters?

Answer

Oracle ASM Interview Questions

ASM  Initialization Parameters

Question 5  

How does the Oracle ASM instance work?
Answer

The ASM instance manages and communicates the map of where each file extent resides. It also controls the process of rebalancing the placement of the extents when the storage allocation is changed ie when the disk is added or removed from ASM.

As an ASM instance uses only about 64-MB for its system global area, it requires a relatively small amount of system resources. In a RAC configuration, an ASM instance on each node in the cluster manages all disk groups for that node, in coordination with the other nodes in the cluster.

The ASM instance creates an extent map that has a pointer to each 1MB extent of the data file is located. When a database instance creates or opens a database file that is managed by ASM, the database instance messages the ASM instance and ASM returns an extent map for that file.

From that point, the database instance performs all I/O directly to the disks unless the location of that file is being changed. Three things might cause the extent map for a database instance to be updated

1) Rebalancing the disk layout following a storage configuration change (adding or dropping a disk from a disk group),

2) Opening of a new database file, and

3) extending an existing database file when a tablespace is enlarged.

Question 6

What are ASM Disks?
Answer

The physical disks are known as ASM disks. Learn more about that at the below link
Oracle ASM disks

Question 7

What are ASM diskgroups?

Answer

ASM disk groups, each of which comprises of several physical disks that are controlled as a single unit. Learn more about that at the below link
Oracle ASM Diskgroups

Question 8

What are Failure groups

Answer

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.
ASM Failure Groups

Question 9

Why should we use a separate ASM home?

Answer

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.

Question 10

How many ASM instances should one have?

Answer

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).

Question 11

How many diskgroups should one have?

Answer

Generally, one should have only one disk group for all database files – and, optionally a second for recovery files i.e +DATA for datafile and +FRA for Recovery files

Here is an example:

CREATE DISKGROUP DATA EXTERNAL REDUNDANCY DISK ‘/dev/raw1', ‘/dev/raw2';
CREATE DISKGROUP FRA EXTERNAL REDUNDANCY DISK ‘/dev/raw3', ‘/dev/raw4';

Here is an example of how you can enable automatic file management with such a setup in each database served by that ASM instance:

ALTER SYSTEM SET db_create_file_dest = ‘+DATA’ SCOPE=SPFILE;
ALTER SYSTEM SET db_recovery_file_dest = ‘+FRA’ SCOPE=SPFILE;

You may also decide to introduce additional disk groups – for example, if you decide to put historic data on low-cost disks, or if you want ASM to mirror critical data across 2 storage cabinets.

See also  How to check temp tablespace in Oracle: Size, resize, add, drop

Data with different storage characteristics should be stored in different disk groups. Each disk group can have different redundancy (mirroring) settings (high, normal, and external), different fail-groups, etc. However, it is generally not necessary to create many disk groups with the same storage characteristics (i.e. +DATA1, +DATA2, etc. all on the same type of disk).

Non ASM to ASM

Question 12

What is stripping and mirroring?

Answer

Striping is spreading data across multiple disks so that IO is spread across multiple disks and hence increases the throughput. It provides read/write performance but failover support.

ASM offers two types of striping, with the choice depending on the type of database file.

(1)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.

(2)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 benefits for reading operations but overhead for writing operations. Its basic purpose is to provide fail-over support.
There are three ASM mirroring options:

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 a “high” level of protection.

Since ASM distributes the partnering extents in a way that prevents all extents to be unavailable 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).

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 been completed.

Many Oracle Database Appliance customers thus prefer the High Redundancy configuration to mitigate the lack of additional protection during this time.

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

Question 13

What is ASM Rebalancing?

Answer

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;
ALTER DISKGROUP DATA REBALANCE POWER 5;
ALTER DISKGROUP DATA REBALANCE POWER 8;

Oracle ASM Rebalance

Question 14

What happens when an Oracle ASM disk group is created?

Answer  

When an ASM disk group is created, a hierarchical filesystem structure is created.

Question 15

How does this filesystem structure appear?

Answer

Oracle ASM disk group’s filesystem structure is similar to UNIX filesystem hierarchy or Windows filesystem hierarchy.

Question 16

Where are the Oracle ASM files stored?

Answer

Oracle ASM files are stored within the Oracle ASM disk group. If we dig into the internals, oracle ASM files are stored within the Oracle ASM filesystem structures.

Question 17  

How are the Oracle ASM files stored within the Oracle ASM filesystem structure?

Answer

Oracle ASM files are stored within the Oracle ASM filesystem structures as objects that RDBMS instances/Oracle database instances access. RDBMS/Oracle instance treats the Oracle ASM files as standard filesystem files.

Question 18

What are the Oracle ASM files that are stored within the Oracle ASM file hierarchy?

Answer

Files stored in Oracle ASM diskgroup/Oracle ASM file structures include:
(1) Datafile
(2) Control files
(3) Server Parameter Files(SPFILE)
(4) Redo Log files

Question 19  

How can you access a database file in the ASM diskgroup under RDBMS?

Answer

Once the ASM file is created in the ASM diskgroup, a filename is generated. This file is now visible to the user via the standard RDBMS view V$DATAFILE.

Question 20

What will be the syntax of ASM filenames?

Answer  

ASM filename syntax is given below
+diskgroup_name/database_name/database_file_type/tag_name.file_number.incarnation
where,
+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, group number for redo log files
file_number – file_number in ASM instance is used to correlate filenames in the database instance
incarnation_number – It is derived from the timestamp. IT is used to provide uniqueness

Experienced level Oracle ASM Interview Questions

Question 21

What is an incarnation number?

Answer

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.

Question 22

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

Answer

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

Question 23

See also  ORA-00257: archiver error. Connect internal only, until freed.

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

Oracle Flex Cluster 12c

Question 24

What is the use of asmadmin?
Answer 

asmadmin is the operating system group that holds users that have sysasm database privilege. This privilege is needed for operations like mounting disk group, dismounting disk group, storage administration

Question 25

What is the purpose of the asmoper operating system group?
Answer

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

Question 26

What is the difference between asmdba and asmoper?
Answer

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

Question 27

How to copy files between ASM disk groups?
Answer

ASMCMD command cp can be used to copy files between ASM disk groups on the local instance as well as remote instances

Question 28

What is ASM metadata and where is it present?
Answer

ASM metadata is the information that ASM uses to control the disk group. It is present within a disk group.

How to collect ASM metadata

Question 29

What is ASM metadata composed of?
Answer  

An ASM metadata includes the following:
(1) The disks that belong to a disk group
(2) Amount of space available within a disk group
(3) The filenames of the files within a disk group
(4) The location of disk group datafile data extents
(5) A redo log that records information about automatically changing data blocks

Question 30

What is the Oracle ASM filter driver?
Answer

  • Oracle ASM filter driver is a new feature in Oracle Database 12c Release 2 12.1.0.2. As an abbreviation, this is called Oracle ASMFD which happens to be a kernel module.
  • This kernel module is included in the path of the I/O path of Oracle ASM disks. this module is included to protect the underlying ASM disks from unnecessary typically non-oracle writes related I/O operations which in turn protects disks from being corrupt

Question 31

What is the ASM POWER_LIMIT?

Answer

This is the parameter that controls the number of Allocation units the ASM instance will try to rebalance at any given time. In ASM versions less than 11.2.0.3 the default value is 11 however it has been changed to unlimited in later versions.

Question 32

What is a rolling upgrade?

Answer  

A patch is considered rolling if it can be applied to the cluster binaries without having to shut down the database in a RAC environment. All nodes in the cluster are patched in a rolling manner, one by one, with only the node which is being patched unavailable while all other instances open.

Question 33

How does ASM provide Redundancy?
Answer

When you create a disk group, you specify an ASM disk group type based on one of the following three redundancy levels:
(1) Normal for 2-way mirroring – 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.
(2) High for 3-way mirroring. In this case, the extent is mirrored across 3 disks.
(3)External to not use ASM mirroring. This is used if you are using Third-party Redundancy mechanisms like RAID, Storage arrays.

Question 34

Can we change the Redundancy for Diskgroup after its creation?

Answer

No, we cannot modify the redundancy for Diskgroup once it has been created. To alter it we will be required to create a new Diskgroup and move the files to it. This can also be done by restoring the full backup on the new Diskgroup.

Question 35

Does the ASM instance automatically rebalances and takes care of hot spots?
Answer

No. This is a myth and ASM does not do it. It will initiate automatic rebalance only when a new disk is added to Diskgroup or we drop a disk from the existing Diskgroup.

Question 36

What is ASMLIB?
Answer  

ASMLIB is the support library for the ASM. ASMLIB allows an Oracle Database using ASM more efficient and capable access to diskgroups. The purpose of ASMLIB is to provide an alternative interface to identify and access block devices. Additionally, the ASMLIB API enables storage and operating system vendors to supply extended storage-related features.

Question 37  

What is the SYSASM role?
Answer

Starting from Oracle 11g, the SYSASM role can be used to administer the ASM instances. You can continue using the SYSDBA role to connect to ASM but it will generate the following warning messages at the time of startup/shutdown, create Diskgroup/add a disk, etc
Alert entry
WARNING: Deprecated privilege SYSDBA for command ‘STARTUP’

Advanced Level

Question 38

What is Kfed?
Answer
kfed is a utility that can be used to view the ASM Disk information. The syntax for using it is

kfed read <device name>

Question 39

How is Cluster Synchronization Service used in ASM

Answer

An ASM storage system requires the use of an additional specialized database instance called ASM, which will actually manage the storage for a set of Oracle databases. In order to use ASM storage for your Oracle databases, you must first ensure that you have Oracle’s Cluster Synchronization Service (CSS) running on your databases.

See also  how to find the Oracle database version

CSS is responsible for synchronizing ASM instances and your database instances, and it is
installed as part of your Oracle software. CSS also synchronizes recovery from an ASM instance failure. You can find out if the CSS service is running by using the following command:

Question 40

What processes does the rebalancing?
Answer

RBAL, ARBn

Question 41

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

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

Question 42

What are the different types of striping in ASM & their differences?
Answer

Fine-grained striping
Coarse-grained striping

Question 43

What is the best LUN size for ASM?
Answer  

There is no best size. In most cases, the storage team will dictate to you based on their standardized LUN size. The ASM administrator merely has to communicate the ASM Best Practices and application characteristics to storage folks :
(a)Need equally sized / performance LUNs
(b) Minimum of 4 LUNs
(c) The capacity requirement
(d) The workload characteristic (random r/w, sequential r/w) & any response time SLA

Question 44

Can my RDBMS and ASM instances run different versions?
Answer

Yes. ASM can be at a higher version or at a lower version than its client databases. There are two components of compatibility:
(a) Software compatibility
(b) Diskgroup compatibility attributes:
(i) compatible.asm
(ii) compatible.rdbms
This is a diskgroup level change and not an instance-level change…no rolling upgrade here!

Question 45

How do I backup my ASM instance?
Answer

There is no backup for ASM instance as ASM has no files to backup Unlike the database, ASM does require a controlfile type structure or any other external metadata to bootstrap itself. All the data ASM needs to startup is on disk structures (disk headers and other disk group metadata).

Question 46

How does ASM work with multipathing software?
Answer

Multipathing software is at a layer lower than ASM and thus is transparent.
You may need to adjust ASM_DISKSTRING to specify only the path to the multipathing pseudo devices.
Multipathing tools provide the following benefits:
(a) It provides a single block device interface for a multi-pathed LUN
(b) it detects any component failures in the I/O path; e.g., fabric port, channel adapter, or HBA.
(c) When a loss of path occurs, ensure that I/Os are re-routed to the available paths, with no process disruption.
(d) Reconfigure the multipath automatically when events occur.
(e) Ensure that failed paths get revalidated as soon as possible and provide auto failback

Question 47

What are the Advantages of ASM in Oracle?

Answer

  • Provides automatic load balancing over all the available disks, thus reducing hot spots in the file system
  • Prevents fragmentation of disks, so you don’t need to manually relocate data to tune I/O performance
  • Adding disks is straightforward – ASM automatically performs online disk reorganization when you add or remove storage
  • Uses redundancy features available in intelligent storage arrays
  • The storage system can store all types of database files
  • Using disk group makes configuration easier, as files are placed into disk groups
  • ASM provides stripping and mirroring
  • ASM and non-ASM Oracle files can coexist

Question 48

What is a diskgroup?

Answer
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.

I hope you find Oracle ASM Interview Questions helpful and useful. Please do provide the feedback

Related Articles
Unix shell scripting interview questions: compilation of Unix shell scripting interview questions for success in any interviews. Examples are given for the command also
Oracle interview questions: 49 Oracle Interview questions and answers: Basics, Oracle SQL to help you in interviews
Oracle PLSQL interview questions: 25 Oracle PLSQL interview questions with detailed explanations and answers for the success in an interview
Weblogic Interview questions: Weblogic Interview questions to help you |How to access the admin console|States of the Weblogic Server|multicast and unicast
oracle apps dba interview questions: 60 awesome oracle apps dba interview questions.Must read to succeed in interviews and jobs
oracle apps technical interview questions and answers: 19 oracle apps technical interview questions and answers to succeed in your career
how to check oracle version: check out how to find the version of oracle database. what is the latest Oracle Version, what is innovation and long-term release
https://en.wikipedia.org/wiki/Automatic_Storage_Management

Recommended  Courses

The following are some of the recommended courses you can buy if you want to get a step further

Given below are the links to some of the courses


Oracle DBA 11g/12c – Database Administration for Junior DBA : This course is good for the people who are starting as Junior DBA or aspire to be Oracle DBA. This will provide a good understanding of backup & recovery and General administration tasks
Oracle Database: Oracle 12C R2 RAC Administration : This course covers the installation, administration of Oracle RAC. A good course for Oracle DBA who want to upgrade his skills for Oracle RAC
Oracle Data Guard: Database Administration for Oracle 12C R2 : This course covers the installation, administration of Oracle Dataguard. A good course for Oracle DBA who want to upgrade his skills for Oracle Dataguard

2 thoughts on “Top 46 Oracle ASM Interview Questions”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top