學習ASM技術(五)--檔名和Template
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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 學習ASM技術(七)--ASM檔案轉化ASM
- 學習ASM技術(八)--ASM操作原理ASM
- 學習ASM技術(八)--ASM操作原理. 續ASM
- 學習ASM技術(三)--diskgroup管理ASM
- 學習ASM技術(二)--diskgroup管理ASM
- 學習ASM技術(完結篇)--常用ASM命令ASM
- 學習ASM技術(四)--條帶化原理和rebalanceASM
- 學習ASM技術(六)-- ASMCMD命令列ASM命令列
- 學習ASM技術(一)--環境搭建ASM
- Oracle ASM Template DirectoryOracleASM
- ASM Disk Group TemplateASM
- 【ASM學習】從ASM拷貝檔案的方法ASM
- 全面學習和應用ORACLE ASM特性--(5)管理asm磁碟中的檔案OracleASM
- 全面學習和應用ORACLE ASM特性--(4)管理asm磁碟組中目錄和檔案OracleASM
- 防病毒、駭客技術、網路安全技術的學習經驗、學習方法和學習網站學習網站
- 【ASM學習】ASM 管理ASM
- 【ASM學習】ASM文件ASM
- asm中template特性測試!ASM
- docker技術學習Docker
- 如何學習技術?
- ASM檔案別名的分析ASM
- 《Java核心技術》第五章 繼承 學習筆記Java繼承筆記
- ASM 學習ASM
- 會話技術 cookie和session 學習筆記會話CookieSession筆記
- 58和百姓網的技術學習
- 學習和使用技術的4種層次
- 學習和使用技術的四種層次
- 思考、學習新技術的原則和方式
- 如何學習新技術
- docker技術沙龍學習Docker
- 技術學習網站學習網站
- 攝影技術學習
- 全面學習和應用ORACLE ASM特性--(2)管理asm磁碟OracleASM
- 【Web技術學習】PHP學習筆記WebPHP筆記
- 全面學習和應用ORACLE ASM特性OracleASM
- 作為一名後端開發者,你需要學習和掌握的技術棧都有哪些呢?後端
- 全面學習和應用ORACLE ASM特性--(3)新增和修改asm磁碟組OracleASM
- 學習筆記:cache 和spring cache 技術(1)筆記Spring