ASMCMD [+DATA/dummy/parameterfile] > help chtmpl
chtmpl <-G dgname> [--striping ] [--redundancy ] [--primary ] [--secondary ] name
更改已存在的模版的属性
-G disk group to place the template in
[--striping ] striping (Coarse|Fine)
[--redundancy ] redundancy (Unprotected|Mirror|High)
[--primary ] primary region (Hot|Cold)
[--secondary ] secondary region (Hot|Cold)
name name of the template
实验演示更改ARCHIVELOG 的 primary 属性由cold到hot。其他一次类推。
SQL> col diskgroup for a10
SQL> col name for a20
SQL> SELECT dg.name AS diskgroup, t.name, t.stripe, t.redundancy, t.primary_region, t.mirror_region
2 FROM V$ASM_DISKGROUP dg, V$ASM_TEMPLATE t
3 WHERE dg.group_number = t.group_number and dg.name = 'DATA' ORDER BY t.name;|cold>|cold>|mirror|high>|fine>|cold>|cold>|mirror|high>|fine>
DISKGROUP NAME STRIPE REDUNDANCY PRIMARY_ MIRROR_R
---------- -------------------- ------------ ------------ -------- --------
DATA ARCHIVELOG COARSE MIRROR COLD COLD
DATA ASMPARAMETERBAKFILE COARSE MIRROR COLD COLD
DATA ASMPARAMETERFILE COARSE MIRROR COLD COLD
DATA ASM_STALE COARSE HIGH COLD COLD
DATA AUTOBACKUP COARSE MIRROR COLD COLD
DATA BACKUPSET COARSE MIRROR COLD COLD
DATA CHANGETRACKING COARSE MIRROR COLD COLD
DATA CONTROLFILE FINE HIGH COLD COLD
DATA DATAFILE COARSE MIRROR COLD COLD
DATA DATAGUARDCONFIG COARSE MIRROR COLD COLD
DATA DUMPSET COARSE MIRROR COLD COLD
11 rows selected.
进行更改。
ASMCMD [+DATA/rac] > chtmpl -G DATA --primary hot ARCHIVELOG
ASMCMD [+DATA/rac] >
ASMCMD [+DATA/rac] >
再次查询
SQL> SELECT dg.name AS diskgroup, t.name, t.stripe, t.redundancy, t.primary_region, t.mirror_region
2 FROM V$ASM_DISKGROUP dg, V$ASM_TEMPLATE t
3 WHERE dg.group_number = t.group_number and dg.name = 'DATA' ORDER BY t.name;
DISKGROUP NAME STRIPE REDUNDANCY PRIMARY_ MIRROR_R
---------- -------------------- ------------ ------------ -------- --------
DATA ARCHIVELOG COARSE MIRROR HOT COLD
DATA ASMPARAMETERBAKFILE COARSE MIRROR COLD COLD
DATA ASMPARAMETERFILE COARSE MIRROR COLD COLD
DATA ASM_STALE COARSE HIGH COLD COLD
DATA AUTOBACKUP COARSE MIRROR COLD COLD
DATA BACKUPSET COARSE MIRROR COLD COLD
DATA CHANGETRACKING COARSE MIRROR COLD COLD
DATA CONTROLFILE FINE HIGH COLD COLD
DATA DATAFILE COARSE MIRROR COLD COLD
DATA DATAGUARDCONFIG COARSE MIRROR COLD COLD
DATA DUMPSET COARSE MIRROR COLD COLD
11 rows selected.
SQL>