【ASM】ASMCMD chtmpl 更改ASM 模版的屬性

楊奇龍發表於2011-07-10

ASMCMD [+DATA/dummy/parameterfile] > help chtmpl
        chtmpl [--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;

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>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22664653/viewspace-701787/,如需轉載,請註明出處,否則將追究法律責任。

相關文章