Datasheet

38
Chapter 1
Using Oracle ASM
After you indicate that you want to use ASM, you will be prompted to create the SYS pass-
word to the ASM instance. DBCA will then present to you a list of available disk groups that
you can use to create the database.
DBCA will conrm your selection in the next screen. You will then be presented with a
screen that asks you where you want the flash recovery area to be assigned. It will prepopu-
late this screen with one of the disk groups that you selected to use in the previous screen
(typically it will be the second disk group in the list).
The DBCA will set all of the different file location parameters to those in the ASM disk
groups that you selected (for example,
CONTROL_FILES, DB_CREATE_FILE_DEST, DB_RECOVERY_
FILE_DEST
, and LOG_ARCHIVE_DEST_1). You can edit these choices if you want to use a mix of
ASM and cooked file systems for some reason.
You complete the DBCA screens as normal and DBCA will then create a database that is
totally (or partially, if you prefer) using ASM.
Creating a Database Manually Using ASM Disks
It can actually be easier to create a database using ASM than to create a database with DBCA,
if only because less typing is required! To create an Oracle database with ASM, follow the
standard procedures, but when you are creating the parameter file, make sure you assign
the following parameters to an ASM disk group:
DB_CREATE_FILE_DEST
DB_RECOVERY_FILE_DEST
Once you have done this, issuing the create database command requires no parameters
at all! Simply issue the command and thats it! Oracle will create the various database files
on ASM disk.
Creating a Control File in an ASM Disk Group Location
When you create a database from the DBCA or manually, you can opt to create the database
control files in an ASM location by setting the
CONTROL_FILES parameter to an ASM disk
group. A note about moving control files, or any other database-related files: be very careful.
It’s dangerous to re-create the control file because it is a rather central part of your database!
If you have an existing database and you want to move the control files to ASM, it gets
a bit stickier. You will pretty much have to use the
create controlfile command to move
the database control files to ASM disks. You will need to change the database
CONTROL_
FILES
parameter before you run the create controlfile command. Here is an example of
this operation:
SQL> alter system set control_files=’’ scope=SPFILE;
SQL> alter system set
DB_CREATE_FILE_DEST=’+COOKED_DGROUP1’,’+COOKED_DGROUP2’ scope=spfile;
SQL> shutdown immediate
SQL> startup nomount
SQL>CREATE CONTROLFILE REUSE DATABASE “11GDB”
95134c01.indd 38 1/28/09 9:43:46 AM