91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Oracle ASM -- disk header

發布時間:2020-04-10 18:39:19 來源:網絡 閱讀:1637 作者:diter 欄目:關系型數據庫

我們知道asm是以au為分配單元,默認一個au為1m,那么disk header位于第一個au的第一個數據塊上,而asm block編號是從0開始

下面通過kfed工具來了解asm diskheader內容

[root@localhost ~]# kfed read /dev/asm-diskb
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                            1 ; 0x002: KFBTYP_DISKHEAD   --disk header
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       0 ; 0x004: T=0 NUMB=0x0
kfbh.block.obj:              2147483648 ; 0x008: TYPE=0x8 NUMB=0x0
kfbh.check:                  2625524850 ; 0x00c: 0x9c7e5472
kfbh.fcn.base:                     2795 ; 0x010: 0x00000aeb
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfdhdb.driver.provstr:         ORCLDISK ; 0x000: length=8
kfdhdb.driver.reserved[0]:            0 ; 0x008: 0x00000000
kfdhdb.driver.reserved[1]:            0 ; 0x00c: 0x00000000
kfdhdb.driver.reserved[2]:            0 ; 0x010: 0x00000000
kfdhdb.driver.reserved[3]:            0 ; 0x014: 0x00000000
kfdhdb.driver.reserved[4]:            0 ; 0x018: 0x00000000
kfdhdb.driver.reserved[5]:            0 ; 0x01c: 0x00000000
kfdhdb.compat:                186646528 ; 0x020: 0x0b200000
kfdhdb.dsknum:                        0 ; 0x024: 0x0000
kfdhdb.grptyp:                        2 ; 0x026: KFDGTP_NORMAL  --磁盤組冗余方式
kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER  --磁盤herder狀態,3為可用
kfdhdb.dskname:               DATA_0000 ; 0x028: length=9       --磁盤名稱
kfdhdb.grpname:                    DATA ; 0x048: length=4       --磁盤組名稱
kfdhdb.fgname:                DATA_0000 ; 0x068: length=9       --fail group name
kfdhdb.capname:                         ; 0x088: length=0
kfdhdb.crestmp.hi:             33006007 ; 0x0a8: HOUR=0x17 DAYS=0xd MNTH=0x8 YEAR=0x7de
kfdhdb.crestmp.lo:            811750400 ; 0x0ac: USEC=0x0 MSEC=0x95 SECS=0x6 MINS=0xc
kfdhdb.mntstmp.hi:             33006676 ; 0x0b0: HOUR=0x14 DAYS=0x2 MNTH=0x9 YEAR=0x7de
kfdhdb.mntstmp.lo:           1221844992 ; 0x0b4: USEC=0x0 MSEC=0xf8 SECS=0xd MINS=0x12
kfdhdb.secsize:                     512 ; 0x0b8: 0x0200
kfdhdb.blksize:                    4096 ; 0x0ba: 0x1000   --塊大小
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000  --au單位,這是是byte,1M
kfdhdb.mfact:                    113792 ; 0x0c0: 0x0001bc80
kfdhdb.dsksize:                   10240 ; 0x0c4: 0x00002800  --磁盤大小這里為10G
kfdhdb.pmcnt:                         2 ; 0x0c8: 0x00000002
kfdhdb.fstlocn:                       1 ; 0x0cc: 0x00000001  
kfdhdb.altlocn:                       2 ; 0x0d0: 0x00000002
kfdhdb.f1b1locn:                      2 ; 0x0d4: 0x00000002  -- file directory 所在au位置后面會有對單獨詳細解釋
kfdhdb.redomirrors[0]:                0 ; 0x0d8: 0x0000
kfdhdb.redomirrors[1]:                0 ; 0x0da: 0x0000
kfdhdb.redomirrors[2]:                0 ; 0x0dc: 0x0000
kfdhdb.redomirrors[3]:                0 ; 0x0de: 0x0000
kfdhdb.dbcompat:              168820736 ; 0x0e0: 0x0a100000
kfdhdb.grpstmp.hi:             33006007 ; 0x0e4: HOUR=0x17 DAYS=0xd MNTH=0x8 YEAR=0x7de
kfdhdb.grpstmp.lo:            811466752 ; 0x0e8: USEC=0x0 MSEC=0x380 SECS=0x5 MINS=0xc
kfdhdb.vfstart:                       0 ; 0x0ec: 0x00000000
kfdhdb.vfend:                         0 ; 0x0f0: 0x00000000
kfdhdb.spfile:                        0 ; 0x0f4: 0x00000000
kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000000
kfdhdb.ub4spare[0]:                   0 ; 0x0fc: 0x00000000
kfdhdb.ub4spare[1]:                   0 ; 0x100: 0x00000000
....
kfdhdb.acdb.aba.seq:                  0 ; 0x1d4: 0x00000000
kfdhdb.acdb.aba.blk:                  0 ; 0x1d8: 0x00000000
kfdhdb.acdb.ents:                     0 ; 0x1dc: 0x0000
kfdhdb.acdb.ub2spare:                 0 ; 0x1de: 0x0000


上面對disk header 關鍵部分作了解釋,關于這個命令不指定參數是默認是aun=0 blkn=0 因此 kfed read  /dev/asm-diskb aun=0 blkn=0 也可以得到同樣的結果

disk header的內容非常重要,如果disk header損壞,asm磁盤組將無法mount,下面通過3種方法描述disk header 備份恢復


一,使用linux dd命令


1)創建磁盤組


SQL> CREATE DISKGROUP diter2 EXTERNAL REDUNDANCY DISK '/dev/asm-diskj' ATTRIBUTE 'compatible.asm' = '11.2.0.0.0';
Diskgroup created.



2)備份,注意前面看到disk heard 塊大小是4096

[root@localhost ~]# dd if=/dev/asm-diskj of=/tmp/disk_header.bak bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.000115 seconds, 35.6 MB/s


3)同樣使用dd命令破壞 disk header


[root@localhost ~]# dd if=/dev/zero of=/dev/asm-diskj bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 2.2e-05 seconds, 186 MB/s


4) 重啟后發現diter2無法mount


SQL> startup;
ASM instance started

Total System Global Area  283930624 bytes
Fixed Size		    2212656 bytes
Variable Size		  256552144 bytes
ASM Cache		   25165824 bytes
ORA-15032: not all alterations performed
ORA-15017: diskgroup "DITER2" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup
"DITER2"
ORA-15080: synchronous I/O operation to a disk failed


5)通過kfed工具


[root@localhost ~]# kfed read /dev/asm-diskj
kfbh.endian:                          0 ; 0x000: 0x00
kfbh.hard:                            0 ; 0x001: 0x00
kfbh.type:                            0 ; 0x002: KFBTYP_INVALID
kfbh.datfmt:                          0 ; 0x003: 0x00
kfbh.block.blk:                       0 ; 0x004: T=0 NUMB=0x0
kfbh.block.obj:                       0 ; 0x008: TYPE=0x0 NUMB=0x0
kfbh.check:                           0 ; 0x00c: 0x00000000
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
ERROR!!!, failed to get the oracore error message


6)恢復


[root@localhost ~]# dd if=/tmp/disk_header.bak of=/dev/asm-diskj bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.008171 seconds, 501 kB/s
-- 恢復后發現可以成功mount
SQL> alter diskgroup diter2 mount;

Diskgroup altered.



二,通過kfed 備份恢復

1) 備份

[root@localhost ~]# kfed read /dev/asm-diskj text=/tmp/disk_header2.bak
[root@localhost ~]# cat /tmp/disk_header2.bak 
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                            1 ; 0x002: KFBTYP_DISKHEAD
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       0 ; 0x004: T=0 NUMB=0x0
kfbh.block.obj:              2147483648 ; 0x008: TYPE=0x8 NUMB=0x0
kfbh.check:                   247870715 ; 0x00c: 0x0ec634fb
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfdhdb.driver.provstr:         ORCLDISK ; 0x000: length=8
kfdhdb.driver.reserved[0]:            0 ; 0x008: 0x00000000
kfdhdb.driver.reserved[1]:            0 ; 0x00c: 0x00000000
kfdhdb.driver.reserved[2]:            0 ; 0x010: 0x00000000
kfdhdb.driver.reserved[3]:            0 ; 0x014: 0x00000000
kfdhdb.driver.reserved[4]:            0 ; 0x018: 0x00000000
kfdhdb.driver.reserved[5]:            0 ; 0x01c: 0x00000000
kfdhdb.compat:                186646528 ; 0x020: 0x0b200000
kfdhdb.dsknum:                        0 ; 0x024: 0x0000
kfdhdb.grptyp:                        1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname:             DITER2_0000 ; 0x028: length=11
kfdhdb.grpname:                  DITER2 ; 0x048: length=6
kfdhdb.fgname:              DITER2_0000 ; 0x068: length=11
kfdhdb.capname:                         ; 0x088: length=0
kfdhdb.crestmp.hi:             33006692 ; 0x0a8: HOUR=0x4 DAYS=0x3 MNTH=0x9 YEAR=0x7de
kfdhdb.crestmp.lo:           3585968128 ; 0x0ac: USEC=0x0 MSEC=0x362 SECS=0x1b MINS=0x35
kfdhdb.mntstmp.hi:             33006692 ; 0x0b0: HOUR=0x4 DAYS=0x3 MNTH=0x9 YEAR=0x7de
kfdhdb.mntstmp.lo:           3730122752 ; 0x0b4: USEC=0x0 MSEC=0x14a SECS=0x25 MINS=0x37
kfdhdb.secsize:                     512 ; 0x0b8: 0x0200
kfdhdb.blksize:                    4096 ; 0x0ba: 0x1000
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.mfact:                    113792 ; 0x0c0: 0x0001bc80
kfdhdb.dsksize:                    3072 ; 0x0c4: 0x00000c00
kfdhdb.pmcnt:                         2 ; 0x0c8: 0x00000002
kfdhdb.fstlocn:                       1 ; 0x0cc: 0x00000001
kfdhdb.altlocn:                       2 ; 0x0d0: 0x00000002
kfdhdb.f1b1locn:                      2 ; 0x0d4: 0x00000002
kfdhdb.redomirrors[0]:                0 ; 0x0d8: 0x0000
kfdhdb.redomirrors[1]:                0 ; 0x0da: 0x0000
kfdhdb.redomirrors[2]:                0 ; 0x0dc: 0x0000
kfdhdb.redomirrors[3]:                0 ; 0x0de: 0x0000
kfdhdb.dbcompat:              168820736 ; 0x0e0: 0x0a100000
kfdhdb.grpstmp.hi:             33006692 ; 0x0e4: HOUR=0x4 DAYS=0x3 MNTH=0x9 YEAR=0x7de
kfdhdb.grpstmp.lo:           3585892352 ; 0x0e8: USEC=0x0 MSEC=0x318 SECS=0x1b MINS=0x35
kfdhdb.vfstart:                       0 ; 0x0ec: 0x00000000
kfdhdb.vfend:                         0 ; 0x0f0: 0x00000000
kfdhdb.spfile:                        0 ; 0x0f4: 0x00000000
kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000000
kfdhdb.ub4spare[0]:                   0 ; 0x0fc: 0x00000000
kfdhdb.ub4spare[1]:                   0 ; 0x100: 0x00000000
..
kfdhdb.ub4spare[53]:                  0 ; 0x1d0: 0x00000000
kfdhdb.acdb.aba.seq:                  0 ; 0x1d4: 0x00000000
kfdhdb.acdb.aba.blk:                  0 ; 0x1d8: 0x00000000
kfdhdb.acdb.ents:                     0 ; 0x1dc: 0x0000
kfdhdb.acdb.ub2spare:                 0 ; 0x1de: 0x0000


2) 破壞


[root@localhost ~]# dd if=/dev/zero of=/dev/asm-diskj bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 1.8e-05 seconds, 228 MB/s


3)恢復

[root@localhost ~]# kfed merge /dev/asm-diskj text=/tmp/disk_header2.bak 
[root@localhost ~]# 
SQL> startup;
ASM instance started

Total System Global Area  283930624 bytes
Fixed Size		    2212656 bytes
Variable Size		  256552144 bytes
ASM Cache		   25165824 bytes
ORA-15032: not all alterations performed
ORA-15017: diskgroup "DITER2" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup
"DITER2"
ORA-15080: synchronous I/O operation to a disk failed
SQL> alter diskgroup diter2 mount;

Diskgroup altered.




三 使用asmcmd的md_backup和md_restore命令備份恢復


1) 備份


ASMCMD> md_backup /tmp/diter2.bak -G DITER2
Disk group metadata to be backed up: DITER2


2)破壞


[root@localhost ~]# dd if=/dev/zero of=/dev/asm-diskj bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 1.8e-05 seconds, 228 MB/s



3)恢復

ASMCMD> md_restore /tmp/diter2.bak --full -G diter2
ORA-03135: connection lost contact
Process ID: 27387
Session ID: 17 Serial number: 14 (DBD ERROR: OCIStmtExecute/Describe)
[grid@localhost ~]$ asmcmd
ASMCMD> md_restore /tmp/diter2.bak --full -G diter2
Current Diskgroup metadata being restored: DITER2
Diskgroup DITER2 created!
System template AUTOBACKUP modified!
System template ONLINELOG modified!
System template OCRBACKUP modified!
System template ASMPARAMETERBAKFILE modified!
System template ASMPARAMETERFILE modified!
System template ASM_STALE modified!
System template PARAMETERFILE modified!
System template OCRFILE modified!
System template CHANGETRACKING modified!
System template ARCHIVELOG modified!
System template DUMPSET modified!
System template TEMPFILE modified!
System template XTRANSPORT modified!
System template FLASHBACK modified!
System template DATAGUARDCONFIG modified!
System template DATAFILE modified!
System template CONTROLFILE modified!
System template BACKUPSET modified!
System template FLASHFILE modified!

注意這里恢復后磁盤組會自動mount,
如果在恢復過程中報下面錯誤
ASMCMD>  md_restore /tmp/diter2.bak --full -G diter2
Current Diskgroup metadata being restored: DITER2
ASMCMD-09352: CREATE DISKGROUP failed
ORA-15018: diskgroup cannot be created
ORA-15283: ASM operation requires compatible.rdbms of 11.1.0.7.0 or higher (DBD ERROR: OCIStmtExecu
將compatible.rdbms更改為11.2就可以了
alter diskgroup FRA set attribute 'compatible.rdbms'='11.2';



下面是通過md_bakcup 備份的文件內容,可以看到是備份了整個asm disk 的 metadata,所以asm元數據全部破壞,我們也可以恢復它

[root@localhost ~]# cat /tmp/diter2.bak 
@diskgroup_set = (
                   {
                     'ATTRINFO' => {
                                     'TEMPLATE.OCRBACKUP.REDUNDANCY' => '17',
                                     'TEMPLATE.PARAMETERFILE.MIRROR_REGION' => '0',
                                     'TEMPLATE.TEMPFILE.REDUNDANCY' => '17',
                                     'TEMPLATE.TEMPFILE.MIRROR_REGION' => '0',
                                     'TEMPLATE.PARAMETERFILE.REDUNDANCY' => '17',
                                     'SECTOR_SIZE' => '512',
                                     'TEMPLATE.DATAGUARDCONFIG.REDUNDANCY' => '17',
                                     'ACCESS_CONTROL.UMASK' => '066',
                                     'TEMPLATE.ASM_STALE.STRIPE' => '0',
                                     'TEMPLATE.ARCHIVELOG.STRIPE' => '0',
                                     'TEMPLATE.DATAGUARDCONFIG.PRIMARY_REGION' => '0',
                                     'TEMPLATE.OCRBACKUP.STRIPE' => '0',
                                     'TEMPLATE.DATAFILE.STRIPE' => '0',
                                     'AU_SIZE' => '1048576',
                                     'TEMPLATE.ASMPARAMETERFILE.STRIPE' => '0',
                                     'TEMPLATE.CHANGETRACKING.PRIMARY_REGION' => '0',
                                     'TEMPLATE.CONTROLFILE.REDUNDANCY' => '17',
                                     'TEMPLATE.FLASHFILE.STRIPE' => '0',
                                     'TEMPLATE.BACKUPSET.PRIMARY_REGION' => '0',
                                     'TEMPLATE.ARCHIVELOG.PRIMARY_REGION' => '0',
                                     'TEMPLATE.CHANGETRACKING.STRIPE' => '0',
                                     'TEMPLATE.ONLINELOG.PRIMARY_REGION' => '0',
                                     'TEMPLATE.CHANGETRACKING.REDUNDANCY' => '17',
                                     'TEMPLATE.BACKUPSET.STRIPE' => '0',
                                     'TEMPLATE.OCRFILE.MIRROR_REGION' => '0',
                                     'DISK_REPAIR_TIME' => '3.6h',
                                     'TEMPLATE.AUTOBACKUP.REDUNDANCY' => '17',
                                     'TEMPLATE.DUMPSET.REDUNDANCY' => '17',
                                     'TEMPLATE.FLASHBACK.MIRROR_REGION' => '0',
                                     'TEMPLATE.DUMPSET.MIRROR_REGION' => '0',
                                     'TEMPLATE.DUMPSET.PRIMARY_REGION' => '0',
                                     'TEMPLATE.ASM_STALE.REDUNDANCY' => '17',
                                     'TEMPLATE.FLASHBACK.PRIMARY_REGION' => '0',
                                     'TEMPLATE.CONTROLFILE.STRIPE' => '1',
                                     'TEMPLATE.DATAFILE.REDUNDANCY' => '17',
                                     'TEMPLATE.XTRANSPORT.REDUNDANCY' => '17',
                                     'TEMPLATE.AUTOBACKUP.PRIMARY_REGION' => '0',
                                     'TEMPLATE.CONTROLFILE.MIRROR_REGION' => '0',
                                     'TEMPLATE.DATAFILE.PRIMARY_REGION' => '0',
                                     'TEMPLATE.ASMPARAMETERFILE.REDUNDANCY' => '17',
                                     'TEMPLATE.FLASHFILE.MIRROR_REGION' => '0',
                                     'TEMPLATE.ASM_STALE.MIRROR_REGION' => '0',
                                     'TEMPLATE.FLASHBACK.REDUNDANCY' => '17',
                                     'TEMPLATE.DATAGUARDCONFIG.STRIPE' => '0',
                                     'CELL.SMART_SCAN_CAPABLE' => 'FALSE',
                                     'TEMPLATE_VERSION' => '186646528',
                                     'TEMPLATE.PARAMETERFILE.STRIPE' => '0',
                                     'TEMPLATE.DATAFILE.MIRROR_REGION' => '0',
                                     'TEMPLATE.PARAMETERFILE.PRIMARY_REGION' => '0',
                                     'TEMPLATE.BACKUPSET.MIRROR_REGION' => '0',
                                     'TEMPLATE.OCRBACKUP.MIRROR_REGION' => '0',
                                     'TEMPLATE.ONLINELOG.REDUNDANCY' => '17',
                                     'TEMPLATE.ASMPARAMETERBAKFILE.STRIPE' => '0',
                                     'ACCESS_CONTROL.ENABLED' => 'FALSE',
                                     'TEMPLATE.DATAGUARDCONFIG.MIRROR_REGION' => '0',
                                     'TEMPLATE.TEMPFILE.PRIMARY_REGION' => '0',
                                     'COMPATIBLE.RDBMS' => '11.2',
                                     'TEMPLATE.FLASHFILE.PRIMARY_REGION' => '0',
                                     'TEMPLATE.ONLINELOG.MIRROR_REGION' => '0',
                                     'TEMPLATE.FLASHFILE.REDUNDANCY' => '17',
                                     'TEMPLATE.OCRBACKUP.PRIMARY_REGION' => '0',
                                     'TEMPLATE.OCRFILE.STRIPE' => '0',
                                     'TEMPLATE.AUTOBACKUP.MIRROR_REGION' => '0',
                                     'TEMPLATE.ASM_STALE.PRIMARY_REGION' => '0',
                                     'TEMPLATE.ASMPARAMETERBAKFILE.PRIMARY_REGION' => '0',
                                     'TEMPLATE.XTRANSPORT.PRIMARY_REGION' => '0',
                                     'TEMPLATE.DUMPSET.STRIPE' => '0',
                                     'TEMPLATE.TEMPFILE.STRIPE' => '0',
                                     'TEMPLATE.OCRFILE.PRIMARY_REGION' => '0',
                                     'TEMPLATE.ONLINELOG.STRIPE' => '0',
                                     'TEMPLATE.ARCHIVELOG.REDUNDANCY' => '17',
                                     'TEMPLATE.OCRFILE.REDUNDANCY' => '17',
                                     'TEMPLATE.ARCHIVELOG.MIRROR_REGION' => '0',
                                     'TEMPLATE.ASMPARAMETERFILE.MIRROR_REGION' => '0',
                                     'TEMPLATE.FLASHBACK.STRIPE' => '0',
                                     'TEMPLATE.CONTROLFILE.PRIMARY_REGION' => '0',
                                     'TEMPLATE.XTRANSPORT.MIRROR_REGION' => '0',
                                     'TEMPLATE.BACKUPSET.REDUNDANCY' => '17',
                                     'TEMPLATE.ASMPARAMETERBAKFILE.REDUNDANCY' => '17',
                                     'TEMPLATE.XTRANSPORT.STRIPE' => '0',
                                     'TEMPLATE.CHANGETRACKING.MIRROR_REGION' => '0',
                                     'COMPATIBLE.ASM' => '11.2.0.0.0',
                                     'TEMPLATE.ASMPARAMETERBAKFILE.MIRROR_REGION' => '0',
                                     'TEMPLATE.ASMPARAMETERFILE.PRIMARY_REGION' => '0',
                                     'TEMPLATE.AUTOBACKUP.STRIPE' => '0'
                                   },
                     'DISKSINFO' => {
                                      'DITER2_0000' => {
                                                         'DITER2_0000' => {
                                                                            'TOTAL_MB' => '3072',
                                                                            'FAILGROUP' => 'DITER2_0000',
                                                                            'NAME' => 'DITER2_0000',
                                                                            'DGNAME' => 'DITER2',
                                                                            'PATH' => '/dev/asm-diskj'
                                                                          }
                                                       }
                                    },
                     'DGINFO' => {
                                   'DGTORESTORE' => 0,
                                   'DGCOMPAT' => '11.2.0.0.0',
                                   'DGNAME' => 'DITER2',
                                   'DGDBCOMPAT' => '11.2.0.0.0',
                                   'DGTYPE' => 'EXTERN',
                                   'DGAUSZ' => '1048576'
                                 },
                     'ALIASINFO' => {},
                     'TEMPLATEINFO' => {
                                         '11' => {
                                                   'DGNAME' => 'DITER2',
                                                   'STRIPE' => 'COARSE',
                                                   'TEMPNAME' => 'AUTOBACKUP',
                                                   'REDUNDANCY' => 'UNPROT',
                                                   'SYSTEM' => 'Y'
                                                 },
                                         '7' => {
                                                  'DGNAME' => 'DITER2',
                                                  'STRIPE' => 'COARSE',
                                                  'TEMPNAME' => 'ONLINELOG',
                                                  'REDUNDANCY' => 'UNPROT',
                                                  'SYSTEM' => 'Y'
                                                },
                                         '2' => {
                                                  'DGNAME' => 'DITER2',
                                                  'STRIPE' => 'COARSE',
                                                  'TEMPNAME' => 'ASMPARAMETERBAKFILE',
                                                  'REDUNDANCY' => 'UNPROT',
                                                  'SYSTEM' => 'Y'
                                                },
                                         '17' => {
                                                   'DGNAME' => 'DITER2',
                                                   'STRIPE' => 'COARSE',
                                                   'TEMPNAME' => 'OCRBACKUP',
                                                   'REDUNDANCY' => 'UNPROT',
                                                   'SYSTEM' => 'Y'
                                                 },
                                         '1' => {
                                                  'DGNAME' => 'DITER2',
                                                  'STRIPE' => 'COARSE',
                                                  'TEMPNAME' => 'ASMPARAMETERFILE',
                                                  'REDUNDANCY' => 'UNPROT',
                                                  'SYSTEM' => 'Y'
                                                },
                                         '18' => {
                                                   'DGNAME' => 'DITER2',
                                                   'STRIPE' => 'COARSE',
                                                   'TEMPNAME' => 'ASM_STALE',
                                                   'REDUNDANCY' => 'UNPROT',
                                                   'SYSTEM' => 'Y'
                                                 },
                                         '0' => {
                                                  'DGNAME' => 'DITER2',
                                                  'STRIPE' => 'COARSE',
                                                  'TEMPNAME' => 'PARAMETERFILE',
                                                  'REDUNDANCY' => 'UNPROT',
                                                  'SYSTEM' => 'Y'
                                                },
                                         '16' => {
                                                   'DGNAME' => 'DITER2',
                                                   'STRIPE' => 'COARSE',
                                                   'TEMPNAME' => 'OCRFILE',
                                                   'REDUNDANCY' => 'UNPROT',
                                                   'SYSTEM' => 'Y'
                                                 },
                                         '13' => {
                                                   'DGNAME' => 'DITER2',
                                                   'STRIPE' => 'COARSE',
                                                   'TEMPNAME' => 'CHANGETRACKING',
                                                   'REDUNDANCY' => 'UNPROT',
                                                   'SYSTEM' => 'Y'
                                                 },
                                         '6' => {
                                                  'DGNAME' => 'DITER2',
                                                  'STRIPE' => 'COARSE',
                                                  'TEMPNAME' => 'ARCHIVELOG',
                                                  'REDUNDANCY' => 'UNPROT',
                                                  'SYSTEM' => 'Y'
                                                },
                                         '3' => {
                                                  'DGNAME' => 'DITER2',
                                                  'STRIPE' => 'COARSE',
                                                  'TEMPNAME' => 'DUMPSET',
                                                  'REDUNDANCY' => 'UNPROT',
                                                  'SYSTEM' => 'Y'
                                                },
                                         '9' => {
                                                  'DGNAME' => 'DITER2',
                                                  'STRIPE' => 'COARSE',
                                                  'TEMPNAME' => 'TEMPFILE',
                                                  'REDUNDANCY' => 'UNPROT',
                                                  'SYSTEM' => 'Y'
                                                },
                                         '12' => {
                                                   'DGNAME' => 'DITER2',
                                                   'STRIPE' => 'COARSE',
                                                   'TEMPNAME' => 'XTRANSPORT',
                                                   'REDUNDANCY' => 'UNPROT',
                                                   'SYSTEM' => 'Y'
                                                 },
                                         '14' => {
                                                   'DGNAME' => 'DITER2',
                                                   'STRIPE' => 'COARSE',
                                                   'TEMPNAME' => 'FLASHBACK',
                                                   'REDUNDANCY' => 'UNPROT',
                                                   'SYSTEM' => 'Y'
                                                 },
                                         '15' => {
                                                   'DGNAME' => 'DITER2',
                                                   'STRIPE' => 'COARSE',
                                                   'TEMPNAME' => 'DATAGUARDCONFIG',
                                                   'REDUNDANCY' => 'UNPROT',
                                                   'SYSTEM' => 'Y'
                                                 },
                                         '8' => {
                                                  'DGNAME' => 'DITER2',
                                                  'STRIPE' => 'COARSE',
                                                  'TEMPNAME' => 'DATAFILE',
                                                  'REDUNDANCY' => 'UNPROT',
                                                  'SYSTEM' => 'Y'
                                                },
                                         '4' => {
                                                  'DGNAME' => 'DITER2',
                                                  'STRIPE' => 'FINE',
                                                  'TEMPNAME' => 'CONTROLFILE',
                                                  'REDUNDANCY' => 'UNPROT',
                                                  'SYSTEM' => 'Y'
                                                },
                                         '10' => {
                                                   'DGNAME' => 'DITER2',
                                                   'STRIPE' => 'COARSE',
                                                   'TEMPNAME' => 'BACKUPSET',
                                                   'REDUNDANCY' => 'UNPROT',
                                                   'SYSTEM' => 'Y'
                                                 },
                                         '5' => {
                                                  'DGNAME' => 'DITER2',
                                                  'STRIPE' => 'COARSE',
                                                  'TEMPNAME' => 'FLASHFILE',
                                                  'REDUNDANCY' => 'UNPROT',
                                                  'SYSTEM' => 'Y'
                                                }
                                       }
                   }
                 );

關于md_resotre 命令我們也可以生成sql腳本恢復
ASMCMD> md_restore -h
Unknown option: h
usage: md_restore  <backup_file> [--silent]
                   [--full|--nodg|--newdg] [-S <sql_script_file>]
                   [-G '<diskgroup_name>,<diskgroup_name>,...']
                   [-o '<old_diskgroup_name>:<new_diskgroup_name>,...']
help:  help md_restore
ASMCMD> md_restore -S /tmp/diter2.sql /tmp/diter2.bak
Current Diskgroup metadata being restored: DITER2
ASMCMD> quit
[grid@localhost ~]$ cat /tmp/diter2.sql 
create diskgroup DITER2 EXTERNAL redundancy  disk '/dev/asm-diskj' name DITER2_0000 size 3072M attribute 'compatible.asm' = '11.2.0.0.0' , 'compatible.rdbms' = '11.2' , 'au_size' = '1048576', 'sector_size' = '512', 'cell.smart_scan_capable' = 'FALSE';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.TEMPFILE.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.PARAMETERFILE.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.OCRBACKUP.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.TEMPFILE.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.PARAMETERFILE.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.DATAGUARDCONFIG.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'ACCESS_CONTROL.UMASK' = '066';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ASM_STALE.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ARCHIVELOG.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.DATAGUARDCONFIG.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.OCRBACKUP.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.DATAFILE.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.CONTROLFILE.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ASMPARAMETERFILE.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.CHANGETRACKING.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.BACKUPSET.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.FLASHFILE.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ARCHIVELOG.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.CHANGETRACKING.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ONLINELOG.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.CHANGETRACKING.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.BACKUPSET.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.OCRFILE.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'DISK_REPAIR_TIME' = '3.6h';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.AUTOBACKUP.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.DUMPSET.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.FLASHBACK.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.DUMPSET.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.DUMPSET.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ASM_STALE.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.FLASHBACK.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.XTRANSPORT.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.DATAFILE.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.CONTROLFILE.STRIPE' = '1';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.AUTOBACKUP.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.CONTROLFILE.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.DATAFILE.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.FLASHFILE.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ASMPARAMETERFILE.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ASM_STALE.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.FLASHBACK.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.DATAGUARDCONFIG.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE_VERSION' = '186646528';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.PARAMETERFILE.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.DATAFILE.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.PARAMETERFILE.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.BACKUPSET.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.OCRBACKUP.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ONLINELOG.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ASMPARAMETERBAKFILE.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'ACCESS_CONTROL.ENABLED' = 'FALSE';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.DATAGUARDCONFIG.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.TEMPFILE.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.FLASHFILE.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ONLINELOG.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.FLASHFILE.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.OCRBACKUP.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.OCRFILE.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.AUTOBACKUP.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ASM_STALE.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.XTRANSPORT.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ASMPARAMETERBAKFILE.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.DUMPSET.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.TEMPFILE.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.OCRFILE.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.OCRFILE.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ARCHIVELOG.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ONLINELOG.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ARCHIVELOG.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.FLASHBACK.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ASMPARAMETERFILE.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.XTRANSPORT.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.CONTROLFILE.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.BACKUPSET.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.XTRANSPORT.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ASMPARAMETERBAKFILE.REDUNDANCY' = '17';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.CHANGETRACKING.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ASMPARAMETERFILE.PRIMARY_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.ASMPARAMETERBAKFILE.MIRROR_REGION' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 set attribute 'TEMPLATE.AUTOBACKUP.STRIPE' = '0';
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template AUTOBACKUP attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template ONLINELOG attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template OCRBACKUP attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template ASMPARAMETERBAKFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template ASMPARAMETERFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template ASM_STALE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template PARAMETERFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template OCRFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template CHANGETRACKING attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template ARCHIVELOG attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template DUMPSET attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template TEMPFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template XTRANSPORT attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template FLASHBACK attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template DATAGUARDCONFIG attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template DATAFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template CONTROLFILE attributes (UNPROTECTED FINE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template BACKUPSET attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DITER2 alter template FLASHFILE attributes (UNPROTECTED COARSE);


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

康保县| 中西区| 莱州市| 兖州市| 汉寿县| 绥芬河市| 河北区| 鹿邑县| 和静县| 抚顺市| 孟州市| 金川县| 石狮市| 洛阳市| 廉江市| 银川市| 德令哈市| 商洛市| 竹北市| 景东| 赫章县| 水城县| 固始县| 和龙市| 神农架林区| 安泽县| 斗六市| 蒙阴县| 古交市| 当雄县| 玉山县| 福海县| 贺州市| 冀州市| 井研县| 偏关县| 平舆县| 麟游县| 故城县| 兴城市| 田林县|