Single File Creation: Examples
Alias ASM file name
SQL> ALTER TABLESPACE myspace ADD
2 DATAFILE '+DATA/mydir/myspace02.dbf' SIZE 50M;
Alias file name with template
SQL> ALTER TABLESPACE myspace ADD
2 DATAFILE '+DATA(mytemplate)/mydir/myspace03.dbf';
Incomplete file name
SQL> ALTER TABLESPACE myspace ADD
2 DATAFILE '+DATA' SIZE 50M;
Note: When the SIZE parameter is not given, the SIZE defaults to 100 MB.
Multiple File Creation: Example
DB_CREATE_ONLINE_LOG_DEST_2 = '+FRA'
+DATA/ORA11g/ONLINELOG/group_5.269.699798885
+FRA/ORA11g/ONLINELOG/group_5.256.699799169
Multiple file creation operations work only in conjunction with incomplete ASM file names. In such operations, the incomplete file name reference is implied through the use of the following database initialization parameters:
The above example illustrates how an online redo log group containing two members is created without any explicit file references.
Although it is recommended that you use the Database Configuration Assistant (DBCA) to create databases, it is possible to set DB_CREATE_FILE_DEST to an ASM disk group and create a complete database using the following simple statement:
CREATE DATABASE sample;
This statement creates a database with at least the following ASM files:
Alias ASM file name
SQL> ALTER TABLESPACE myspace ADD
2 DATAFILE '+DATA/mydir/myspace02.dbf' SIZE 50M;
Alias file name with template
SQL> ALTER TABLESPACE myspace ADD
2 DATAFILE '+DATA(mytemplate)/mydir/myspace03.dbf';
Incomplete file name
SQL> ALTER TABLESPACE myspace ADD
2 DATAFILE '+DATA' SIZE 50M;
Note: When the SIZE parameter is not given, the SIZE defaults to 100 MB.
Multiple File Creation: Example
- Create an online redo log group with two members.
- Set the following database initialization parameters:
DB_CREATE_ONLINE_LOG_DEST_2 = '+FRA'
- Then create the log group without any file references:
- The resulting fully qualified file names are:
+DATA/ORA11g/ONLINELOG/group_5.269.699798885
+FRA/ORA11g/ONLINELOG/group_5.256.699799169
Multiple file creation operations work only in conjunction with incomplete ASM file names. In such operations, the incomplete file name reference is implied through the use of the following database initialization parameters:
- DB_CREATE_FILE_DEST
- DB_CREATE_ONLINE_LOG_DEST_<n> (where <n> = 1, 2, 3, 4 or 5)
The above example illustrates how an online redo log group containing two members is created without any explicit file references.
Although it is recommended that you use the Database Configuration Assistant (DBCA) to create databases, it is possible to set DB_CREATE_FILE_DEST to an ASM disk group and create a complete database using the following simple statement:
CREATE DATABASE sample;
This statement creates a database with at least the following ASM files:
- A SYSTEM tablespace data file in the disk group specified in DB_CREATE_FILE_DEST
- A SYSAUX tablespace data file in the disk group specified in DB_CREATE_FILE_DEST
- A multiplexed online redo log with two log groups. Each log group will have one member in the disk group specified in DB_CREATE_FILE_DEST and a second member in the disk group specified in DB_RECOVERY_FILE_DEST.
No comments:
Post a Comment