Datasheet
Using ASM Storage
37
Let’s see where Oracle put the datafile now by querying the DBA_DATA_FILES view:
select tablespace_name, file_name
from dba_data_files Where tablespace_name=’ANOTHER_TEST’;
TABLESPACE_NAME FILE_NAME
--------------- ------------------------------------------------------------
ANOTHER_TEST +COOKED_DGROUP1/11GDB/datafile/another_test.256.613065911
The create tablespace command comes with a number of different options when you
are using cooked file systems, and there is no reason you cannot use those options when
you are using ASM file systems. For example, you can create a tablespace with autoextend
enabled, as shown here:
create tablespace another_test
datafile ’+COOKED_DGROUP1’ size 100k
autoextend on next 10m maxsize 300m;
If you want to create a tablespace using a template other than the default template, this
is easy too, as shown in this example:
create tablespace different_template
datafile ’+COOKED_DGROUP1(alternate_template)’;
Tablespace Maintenance When Using Tablespaces Referencing
Specific ASM Disk Groups
Tablespace maintenance is basically unchanged when using ASM disks. For example, you
can add a datafile with the
alter tablespace command as you normally would:
alter tablespace part_asm_tbs Add datafile ’+COOKED_DGROUP1’ size 100k;
Creating a Database Using ASM Disk Group Locations
You can create a database that completely uses ASM disk group locations. You can do this
when creating the database through the DBCA interface or if you are going to manually
create the database. In the following sections, we will look at both options.
Creating a Database Using ASM Disks with DBCA
If you are creating the database with the DBCA, you will have the opportunity to indicate
that you want to use ASM disks for the database as a part of the DBCA workflow.
95134c01.indd 37 1/28/09 9:43:46 AM