Exercise 20-2, Step 3:
asm_diskgroups=dg1If this is not done, you will have to mount the disk group manually every time
you start the ASM instance:
alter diskgroup dg1 mount;Creating and Using ASM Files
The ASM disk groups are created in the ASM instance; the ASM files are created in the
RDBMS instance. The normal commands for creating datafiles, tempfiles, and log files
can all take a disk group name in place of a filename. For example,
SQL> create tablespace new_tbs datafile '+dg1' size 100m;SQL> alter tablespace system add datafile '+system_dg' size 1000m;SQL> alter database add logfile group 4 '+dg_log1','+dg_log2' size 100m;The first of these commands creates a new tablespace with one datafile in the disk
group DG1. The second command adds a datafile to the SYSTEM tablespace, in a disk
group created specially for the SYSTEM datafiles; this will probably be a disk group
created with HIGH redundancy. The third command creates a new online log file
group, with two members in different disk groups; these will likely be groups with
EXTERNAL redundancy, because you can rely on the multiplexing to provide fault
tolerance.
To direct archive logs to ASM, set the LOG_ARCHIVE_DEST parameters to point
to disk groups:
P AR T III
SQL> alter system set log_archive_dest_1='location=+dg_arc1';SQL> alter system set log_archive_dest_2='location=+dg_arc2';It is also possible to direct the flash recovery area to an ASM disk group:
SQL> alter system set db_recovery_file_dest='+dg_flash';In all these examples, you do not specify a filename, only a disk group. ASM will
generate the actual filenames according to its own conventions. If you wish, you can
see the names by querying views such as V$DATAFILE, V$LOGFILE, or V$ARCHIVED_
LOG, but there is little value in this. A feature of ASM is that it gives you complete
independence from the physical storage: there is no reason for you to want to know
the actual filenames. It is possible to interpret the system-generated names, but they
are not any sort of physical path.
Bạn đang xem exercise 20- - OCA /OCP ORACLE DATABASE 11G A LL-IN-ONE EXAM GUIDE- P81 POT