在Oracle12CR2 Rac內..會強制安裝一套資料庫名叫做MGMTDB的資料庫

但是他預設是安裝在OCR的Diskgroup(如果OCR配置空間小,很容易將OCR塞爆,所以必須將此資料庫轉移至其他Disk Group)

Oracle就提供一個tools來解決這個問題

GI Management Repository configuration tool (Doc ID 2065175.1) --抓取相關tool ,或者沒有可以由我提供

MDBUtil用法

# ./mdbutil.pl -h
Usage:
     Create/Enable MGMTDB & CHM
       mdbutil.pl --addmdb --target=<MGMTDB destination>
     Move MGMTDB to another location
       mdbutil.pl --mvmgmtdb --target=<new MGMTDB destination>   
     Check MGMTDB status
       mdbutil.pl --status
   
     mdbutil.pl OPTIONS
       --addmdb            Create MGMTDB/CHM and reconfigure related functions
       --mvmgmtdb          Migrate MGMTDB to another location   
       --target='+DATA'    MGMTDB Disk Group location
       --status            Check the CHM & MGMTDB status
       --help              Display this help and exit
       --debug             Verbose commands output/trace
   
     Example:
       Create/Enable MGMTDB:
         mdbutil.pl --addmdb --target=+DATA
       Move MGMTDB to another location:
         mdbutil.pl --mvmgmtdb --target=+REDO             
       Check CHM:
         mdbutil.pl --status

 

 

-------------------------實作

1.先去官方抓取腳本 (Doc ID 2065175.1)
    
    2.使用指令
        0.su - grid
        1.rac1-> ./mdbutil.pl -h

    3.將MGMTDB遷移至另一個磁碟盤
        1.rac1-> /tmp/mdbutil.pl --mvmgmtdb --target='+DATA' --debug
            Moving MGMTDB, it will be stopped, are you sure (Y/N)? Y
            .
            .
            .    
            .
            2017-11-21 15:07:27: I MGMTDB Successfully moved to +DATA!

[grid@rwsdb1 tmp]$ /tmp/mdbutil.pl --mvmgmtdb --target=+REDO
Moving MGMTDB, it will be stopped, are you sure (Y/N)? y
2015-10-12 09:24:53: I Checking for the required paths under +REDO
2015-10-12 09:24:54: I Creating new path +REDO/_MGMTDB/PARAMETERFILE
2015-10-12 09:24:56: I Creating new path +REDO/_MGMTDB/CONTROLFILE
2015-10-12 09:24:59: I Creating new path +REDO/_MGMTDB/ONLINELOG
2015-10-12 09:25:01: I Creating new path +REDO/_MGMTDB/DATAFILES
2015-10-12 09:25:04: I
2015-10-12 09:25:06: I Creating new path +REDO/_MGMTDB/DATAFILES/rwsdb_c
2015-10-12 09:25:08: I Creating new path +REDO/_MGMTDB/TEMPFILE/rwsdb_c
2015-10-12 09:25:08: I Getting MGMTDB Database files location
2015-10-12 09:25:09: I Getting MGMTDB Temp files location
2015-10-12 09:25:09: I Getting MGMTDB PDB rwsdb_c files location
2015-10-12 09:25:09: I Getting MGMTDB PDB rwsdb_c Temp files location
2015-10-12 09:25:10: I Creating temporary PFILE
2015-10-12 09:25:10: I Creating target SPFILE
2015-10-12 09:25:16: I Stopping mgmtdb
2015-10-12 09:25:36: I Copying MGMTDB DBFiles to +REDO
2015-10-12 09:25:52: I Copying MGMTDB rwsdb_c PDB DBFiles to +REDO
2015-10-12 09:26:33: I Creating the CTRL File
2015-10-12 09:26:59: I The CTRL File has been created and MGMTDB is now running from +REDO
2015-10-12 09:26:59: I Setting MGMTDB SPFile location
2015-10-12 09:27:00: I Modifing the init parameter
2015-10-12 09:27:00: I Removing old MGMTDB
2015-10-12 09:27:02: I Restarting MGMTDB using target SPFile
2015-10-12 09:27:47: I MGMTDB Successfully moved to +REDO!

 

文章標籤
全站熱搜
創作者介紹
創作者 jiade_Chen 的頭像
jiade_Chen

assistant engineer

jiade_Chen 發表在 痞客邦 留言(0) 人氣(40)