Beruflich Dokumente
Kultur Dokumente
For example, if there is a disk group named data, then you can create a tablespa
ce tblspace in that disk group with the following SQL statement:
CREATE TABLESPACE tblspace DATAFILE +data;
The following example illustrates the usage of Oracle ASM with defaults. This ex
ample enables Oracle ASM to create and manage the tablespace data file for you,
using Oracle supplied defaults that are adequate for most situations.
Assume the following initialization parameter setting:
DB_CREATE_FILE_DEST = +data
The following statement creates the tablespace and its data file:
CREATE TABLESPACE tblspace;
Creating Redo Logs in Oracle ASM
Online redo logs can be created in multiple disk groups, either implicitly in an
initialization parameter file or explicitly in an ALTER DATABASE...ADD LOGFILE
statement. Each online log should have one log member in multiple disk groups. T
he filenames for log file members are automatically generated. All partially cre
ated redo log files, created because of a system error, are automatically delete
d.
For example, if there are disk groups named data1 and data2, you can create a lo
g file with a member in each disk group with the following SQL statement:
ALTER DATABASE ADD LOGFILE (+data1,+data2);
The following example creates a log file with a member in each of the disk group
s data1 and data2. The following parameter settings are included in the initiali
zation parameter file:
DB_CREATE_ONLINE_LOG_DEST_1 = +data1
DB_CREATE_ONLINE_LOG_DEST_2 = +data2
The following statement is run at the SQL prompt:
ALTER DATABASE ADD LOGFILE;
Creating Control Files in Oracle ASM
Control files can be explicitly created in multiple disk groups. The filenames f
or control files are automatically generated.
If you must specify a control file by name, then you can use alias filenames to
reference Oracle ASM files and use easy to understand names. Using aliases in th
e specification of a control file during its creation enables you to later refer
to the control file with a user-specified name. An alias can also be specified
as a control file name in the CONTROL_FILES initialization parameter.
When creating a control file, data files and log files that are stored in Oracle
ASM disk groups should be given to the CREATE CONTROLFILE command using the fil
e reference form of their Oracle ASM filenames. However, the use of the RESETLOG
S option requires the use of a file creation form for the specification of the l
og files.
Creating Control Files in Oracle ASM: Example 1
ed in this manner, the archive log filenames are unique, even if archived twice.
If LOG_ARCHIVE_DEST is set to a disk group name, LOG_ARCHIVE_FORMAT is ignored.
Unique filenames for archived logs are automatically created by the Oracle datab
ase. If LOG_ARCHIVE_DEST is set to a directory in a disk group, LOG_ARCHIVE_FORM
AT has its normal semantics.
The following sample archive log names might be generated with DB_RECOVERY_FILE_
DEST set to +data. ORCL is the value of the DB_UNIQUE_NAME parameter:
+DATA/ORCL/ARCHIVELOG/2009_09_23/thread_1_seq_38.614.541956473
+DATA/ORCL/ARCHIVELOG/2009_09_23/thread_4_seq_35.609.541956477
+DATA/ORCL/ARCHIVELOG/2009_09_23/thread_2_seq_34.603.541956487
+DATA/ORCL/ARCHIVELOG/2009_09_25/thread_3_seq_100.621.541956497
+DATA/ORCL/ARCHIVELOG/2009_09_25/thread_1_seq_38.614.541956511
CREATE CONTROLFILE SET DATABASE "suportasm" RESETLOGS ARCHIVELOG