ASM & RDBMS Interactions: Creating a file

How do new files get created when running with ASM?

It is the responsibility of the RDBMS instance to begin the procedure for creating the new file:

The RDBMS instance sends a request to the ASM instance to create the file via the Onnn background processes. This request contains information on the size of the file to create, the type, and the diskgroup name where to create the file in.

The ASM instance then uses this information to allocate the appropriate number of extents on the correct disks. After allocating the extents for the file ASM sends the extent map information back to the RDBMS instance and creates an entry in its Continuing Operations Directory (COD) metadata file.

Once the RDBMS has the extent map it can issue the I/O to initialise the file. Remember I/O to datafiles never goes through the ASM instance it is always from the RDBMS instance direct to the file in question. The ASM instance just takes care of the metadata only.

After this I/O has completed, the RDBMS instance messages the ASM instance that the creation of the file has completed successfully. The ASM instance then updates it’s metadata files to reflect the change.

Should the RDBMS decide to abort the file creation, then ASM can use the COD to rollback the creation of the file, which includes freeing the space that was allocated for the new file.


2 thoughts on “ASM & RDBMS Interactions: Creating a file

  1. Thanks Jarneil , for the info.
    Would like to know , follow the same algorithm for dropping datafiles and resizeing also ?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s