 |
|
Oracle
Creating the ASM Instance Manually (on
Windows)
Oracle Tips by Burleson Consulting |
This
is an excerpt from "Oracle 10g New Features for Administrators" by
Ahmed Baraka.
1. If CSS service is not there, create it by
executing the following bat file:
<orahome>\bin\localconfig
add
2. Building the ASM Candidate "disks": for testing
or development purpose
ASMTOOL -create
c:\asmdisks\asmdisk1 250
3. Create a pfile with the name "init+ASM.ora" in
the folder <ORACLE_HOME>\database. Insert the following parameters
in the file:
INSTANCE_TYPE=ASM
_ASM_ALLOW_ONLY_RAW_DISKS = FALSE
DB_UNIQUE_NAME = +ASM
ASM_DISKSTRING ='C:\asmdisks\*'
LARGE_POOL_SIZE = 16M
BACKGROUND_DUMP_DEST =
'D:\oracle\admin\+ASM\bdump'
USER_DUMP_DEST = 'D:\oracle\admin\+ASM\udump'
CORE_DUMP_DEST = 'D:\oracle\admin\+ASM\cdump'
Note: The undocumented
parameter_ASM_ALLOW_ONLY_RAW_DISKS is used to make the instance
recognize virtual disks created in previous step.
Of course, in a production database, this parameter
is not used.
4. Create the ASM instance service:
ORADIM -NEW -ASMSID
+ASM -STARTMODE auto
5. Startup the instance
SET ORACLE_SID=+ASM
C:\> SQLPLUS / AS SYSDBA
SQL> STARTUP FORCE
SQL> SELECT PATH, MOUNT_STATUS FROM V$ASM_DISK;
Creating the ASM Instance Manually (on Unix)
Steps here assumes the following:
• Red Hat Enterprise Server 3 installed and patched
to kernel version 2.4.21-15
• Oracle version 10.1.0.3 (Enterprise Edition)
installed as per instructions here.
1. After logging as root, create disks Create
physical files:
dd if=/dev/zero
of=/asmdisks/disk1 bs=1024k
count=250
Map loopback devices to the files:
/sbin/losetup
/dev/loop1 /asmdisks/disk1
2. Download oracleasm utility from Oracle site.
3. Install the utility files as follows:
rpm -ivh *.rpm
4. With the basic libraries installed, you need to
configure them so that they get re-loaded at every server
reboot:
[root@koala
howardjr]# /etc/init.d/oracleasm
configure
Default user to own the driver interface []:
oracle
Default group to own the driver interface []:
oinstall
Start Oracle ASM library driver on boot (y/n)
[n]: y
Fix permissions of Oracle ASM disks on boot
(y/n) [y]: y
5. Writing the ASM Disk Header information:
/etc/init.d/oracleasm
createdisk ASMD1
/dev/loop1
Marking disk "/dev/loop1" as an ASM disk [ OK ]
6. After logging on as Oracle user now, under the
$ORACLE _HOME/dbs directory, create the file "init+ASM.ora" and
type the following in it:
INSTANCE_TYPE =
ASM
DB_UNIQUE_NAME = +ASM
LARGE_POOL_SIZE = 16M
ASM_DISKSTRING = 'ORCL:*'
[oracle@koala dbs]$ export ORACLE_SID=+ASM
[oracle@koala dbs]$ sqlplus / as sysdba
SQL> startup
SQL> select path from v$asm_disk;
Starting and Shutting Down an ASM Instance
• When starting an ASM instance, you can use the
STARTUP command with the NOMOUNT, MOUNT, RESTRICT and FORCE
options. You cannot use the STARTUP OPEN syntax.
• If you either start up your ASM instance with the
STARTUP RESTRICT command or issue the ALTER SYSTEM ENABLE
RESTRICTED SESSION command in a normal ASM instance, Oracle
database instances cannot connect to the ASM instance.
• If you shut down an ASM instance, all Oracle
databases currently connected to it will also shut down.
 |
If you like Oracle tuning, see the
book "Oracle
Tuning: The Definitive Reference", with 950 pages of tuning
tips and scripts.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot of Oracle tuning scripts. |