oraclegeek.net
Welcome to Oraclegeek arrow Oracle 10g arrow Laptop ASM - Windows
Thursday, 09 September 2010
Welcome to Oraclegeek
Articles
Oracle 10g
Oracle 9i
Oracle Security
Oracle Applications
Oraclegeek Blog
Template Chooser
Computer Translations
Laptop ASM for Windows Print E-mail
Written by amit poddar   
Thursday, 07 June 2007

1.0 Introduction

In 10g Oracle introduced its own volume manager Automatic Storage Management (ASM). There was a lot of hoopla surrounding it. Many notable authors have praised it and have said that ASM is the future of storing database files. So obviously many oracle technicians, including me wanted to learn this new technology.

But ASM needs raw devices which I can provide by attaching some unformatted hard drive to my desktop. I can also install Vmware and use the guest operating system to install ASM since I can easily fake raw devices in Vmware virtual machine. But I didn’t want to go through all that pain I wanted to be able to install and learn ASM on my desktop without buying anything or installing anything extra except Oracle. I came across a very creative way of simulating ASM which I am going to describe in this article.

This article assumes that you are running professional version of windows and you are using Oracle version 10g release 2 i.e. 10.2.0.1. Also this article has been written and tested for 32 bit windows only. I have not done this on 64 bit windows, so I don’t know whether this will work on 64 bit windows or not.

This article will go through the following:

  • Create a 8GB ASM array.
  • Create 2 disk groups DGROUP1 and DGROUP2
  • Create a database using the above two disk groups as db_create_file_dest and db_recovery_file_dest.

So if you are running any professional version of windows, and are planning to use 10g release 2 Oracle, then please read on to implement ASM on your humble desktop.

2.0 Hard disk faking methods

ASM takes units of physical disks and wraps them up into a logical volume which is then presented to databases as a single chunk of available storage. To create an ASM storage array on a laptop or desktop PC, therefore, we need to be able to present Oracle with a number of 'chunks' of physical disks. There are many ways to do this which I am going to describe in detail.

  • We can buy number of disks and attach to our desktop but that would cost money.
  • Alternatively we can partition our existing hard drive into many unformatted logical partitions. But I do not want to disrupt my existing hard drive so dramatically.
  • We can install Vmware and create as many virtual drives for our guest operating system. But Vmware costs money and we would also need an extra license to install windows as a guest operating system. Moreover virtual machines run slower than real machines.
  • What I intend to do here is to fool oracle into using regular files filled with zeroes as physical storage devices, not exactly fool it since oracle itself provides us with and underscore parameter to make it possible to use regular files as physical devices. As a matter of fact Oracle 10g release2 on windows comes with an executable to create such files. Note that this approach requires, use of an underscore parameter, so this approach is strictly no-no for production environment.


3.0 Faking Hard Disks

As I mentioned before 10g release 2 comes with an executable called asmtool which can be used to create solid files to be used as physical storage devices. When I say solid I mean they are filled with zeroes as opposed to empty or sparse file i..e all the space in the file is really allocated and each byte in the file is 0. ASM demands “solid” files to treat them as physical storage.

This executable is located in ORACLE_HOME/bin directory, which should already be in your path after installing Oracle software. You should therefore be able to invoke this executable from anywhere. Following commands will create 8 files of size 1GB each to be treated as 8 physical devices by ASM.

 

Last Updated ( Saturday, 10 November 2007 )
 
 
(C) 2010 oraclegeek.net
Joomla! is Free Software released under the GNU/GPL License.
Design by Mamboteam.com | Powered by Mambobanner.de