How Are ASM Files Used in the Database?
These
commands
will create the SALESDATA tablespace and all data files
underneath it on dskgrp01.
A template can also be used
to specify the redundancy and striping of datafiles in a
disk group. Using the example
given above, issue
the following commands.
ALTER SYSTEM SET DB_CREATE_FILE_DEST =
‘+dskgrp01 (DBAHELPER1) ’;
CREATE TABLESPACE SALESDATA;
When ASM creates a datafile,
the default size is 100MB with the auto-extensible feature
turned on to allow
unlimited size. The
SIZE
clause can be used to
override the default.
To create the index tablespace for the
SALESDATA with just one datafile of 800 MB, use the following
command:
CREATE TABLESPACE SALESIDX DATAFILE
‘+dskgrp02’ SIZE 800 MB AUTOEXTEND ON;
To create redo log files using ASM files by
the same method given above, specify them in
the initialization
parameter file and use the ADD LOGFILE command. The following
example creates a log file with a member in each of the two disk
groups, dskgrp03 and dskgrp04.
DB_CREATE_ONLINE_LOG_DEST_1 = ‘+dskgrp03’|
DB_CREATE_ONLINE_LOG_DEST_2 = ‘+dskgrp04’
ALTER DATABASE ADD LOGFILE;