1、数据文件命名含义
SQL> select file_name from dba_data_files;
FILE_NAME
------------------------------------------------------------
+ASM_DISKGROUP/ora10g/datafile/system.259.712716453
+DG1/ora10g/datafile/undotbs1.259.712716475
+ASM_DISKGROUP/ora10g/datafile/sysaux.260.712716487
+ASM_DISKGROUP/ora10g/datafile/users.261.712716503
格式说明:
+DATA/yoda/datafile/tbs_name.asm_filenumber.incarnation_number
+DATA: diskgroup名
yoda: 该数据库名
datafile: 文件类型,表示是数据文件
tbs_name: 表空间名
asm file#: 表示ASM file编号,$asm_file.file_number
incarnation number: 从时间戳提取,唯一值 。
2、在ASM实例中查询文件编号和大小
$export ORACLE_SID=+ASM
SQL>sqlplus '/as sysdba'
SQL> select file_number, bytes/1024/1024 from v$asm_file;
FILE_NUMBER BYTES/1024/1024
-------------------------- ---------------
259 500.007813
260 340.007813
261 5.0078125
259 340.007813
所查询到的值,与dba_data_files相匹配。
3、数据文件的模板(template)管理
查看数据文件属性
SQL>select name, redundancy, striped
from v$asm_alias a, v$asm_file b
where a.file_number = b.file_number
and a.group_number = b.group_number
order by name;
NAME REDUND STRIPE
------------------------------------------------ ----------------- ------------
Current.256.712716441 HIGH FINE
Current.257.712716441 HIGH FINE
Current.258.712716441 HIGH FINE
SYSAUX.260.712716487 MIRROR COARSE
SYSTEM.259.712716453 MIRROR COARSE
TEMP.260.712716493 UNPROT COARSE
UNDOTBS1.259.712716475 UNPROT COARSE
USERS.261.712716503 MIRROR COARSE
control01.ctl HIGH FINE
control02.ctl HIGH FINE
control03.ctl HIGH FINE
group_1.256.712716443 UNPROT FINE
group_2.257.712716445 UNPROT FINE
group_3.258.712716447 UNPROT FINE
redo01.log UNPROT FINE
redo02.log UNPROT FINE
redo03.log UNPROT FINE
spfile.262.712718229 MIRROR COARSE
spfileora10g.ora MIRROR COARSE
系统管理人员能改变系统缺省 template, 但不能删除该删除,管理员能增加自己的template,然后在该模板上创建数据文件。
SQL> alter diskgroup dg1 add template noncritical_files attributes (unprotected);
SQL> create tablespace test datafile '+DG1/test.dbf(noncritical_files)' size 100M;
更改template属性
SQL>alter diskgroup dg1 alter template noncritical_files attributes (coarse);
删除template
SQL> alter diskgroup dg1 drop template noncritical_files;
以下是ASM 缺省template信息
文件类型 缺省模板 缺省条带化
------------------------------- ------------------------ ---------------------
archived redo logs ARCHIVELOG coarse
control files CONTROLFILE fine
control files autobackup AUTOBACK coarse
datafile DATAFILE coarse
datafile backup piece BACKUPSET coarse
DataGuard broker
configuration DATAGUARDCONFIG coarse
datapump Dumpset DUMPSET coarse
flashback logs FLASHBACK fine
Online Redo Logs ONLINELOG fine
spfile PARAMETERFILE coarse
tempfiles TEMPFILE coarse
查看ASM template
SQL>select * from v$asm_template;
SQL> select file_name from dba_data_files;
FILE_NAME
------------------------------------------------------------
+ASM_DISKGROUP/ora10g/datafile/system.259.712716453
+DG1/ora10g/datafile/undotbs1.259.712716475
+ASM_DISKGROUP/ora10g/datafile/sysaux.260.712716487
+ASM_DISKGROUP/ora10g/datafile/users.261.712716503
格式说明:
+DATA/yoda/datafile/tbs_name.asm_filenumber.incarnation_number
+DATA: diskgroup名
yoda: 该数据库名
datafile: 文件类型,表示是数据文件
tbs_name: 表空间名
asm file#: 表示ASM file编号,$asm_file.file_number
incarnation number: 从时间戳提取,唯一值 。
2、在ASM实例中查询文件编号和大小
$export ORACLE_SID=+ASM
SQL>sqlplus '/as sysdba'
SQL> select file_number, bytes/1024/1024 from v$asm_file;
FILE_NUMBER BYTES/1024/1024
-------------------------- ---------------
259 500.007813
260 340.007813
261 5.0078125
259 340.007813
所查询到的值,与dba_data_files相匹配。
3、数据文件的模板(template)管理
查看数据文件属性
SQL>select name, redundancy, striped
from v$asm_alias a, v$asm_file b
where a.file_number = b.file_number
and a.group_number = b.group_number
order by name;
NAME REDUND STRIPE
------------------------------------------------ ----------------- ------------
Current.256.712716441 HIGH FINE
Current.257.712716441 HIGH FINE
Current.258.712716441 HIGH FINE
SYSAUX.260.712716487 MIRROR COARSE
SYSTEM.259.712716453 MIRROR COARSE
TEMP.260.712716493 UNPROT COARSE
UNDOTBS1.259.712716475 UNPROT COARSE
USERS.261.712716503 MIRROR COARSE
control01.ctl HIGH FINE
control02.ctl HIGH FINE
control03.ctl HIGH FINE
group_1.256.712716443 UNPROT FINE
group_2.257.712716445 UNPROT FINE
group_3.258.712716447 UNPROT FINE
redo01.log UNPROT FINE
redo02.log UNPROT FINE
redo03.log UNPROT FINE
spfile.262.712718229 MIRROR COARSE
spfileora10g.ora MIRROR COARSE
系统管理人员能改变系统缺省 template, 但不能删除该删除,管理员能增加自己的template,然后在该模板上创建数据文件。
SQL> alter diskgroup dg1 add template noncritical_files attributes (unprotected);
SQL> create tablespace test datafile '+DG1/test.dbf(noncritical_files)' size 100M;
更改template属性
SQL>alter diskgroup dg1 alter template noncritical_files attributes (coarse);
删除template
SQL> alter diskgroup dg1 drop template noncritical_files;
以下是ASM 缺省template信息
文件类型 缺省模板 缺省条带化
------------------------------- ------------------------ ---------------------
archived redo logs ARCHIVELOG coarse
control files CONTROLFILE fine
control files autobackup AUTOBACK coarse
datafile DATAFILE coarse
datafile backup piece BACKUPSET coarse
DataGuard broker
configuration DATAGUARDCONFIG coarse
datapump Dumpset DUMPSET coarse
flashback logs FLASHBACK fine
Online Redo Logs ONLINELOG fine
spfile PARAMETERFILE coarse
tempfiles TEMPFILE coarse
查看ASM template
SQL>select * from v$asm_template;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/354732/viewspace-629497/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/354732/viewspace-629497/