Oracle 12c和18c中的MGMTDB(下)

lhrbest發表於2018-09-18

Oracle 12c和18c中的MGMTDB(下)


上一篇參考: http://blog.itpub.net/26736162/viewspace-2132763/


12c Grid Infrastructure 管理資料庫(GIMR) 問答 (文件 ID 2047608.1)


文件內容


用途

問題和答案



什麼是管理資料庫?

管理資料庫是用來幹什麼的?

管理資料庫的資料檔案放在哪裡?

在安裝升級的時候,如果不配置管理資料庫會有什麼樣的問題?

有哪些和管理資料庫相關的資源?

如果管理資料庫停掉,怎樣手工啟動?

怎樣“cd”到管理資料庫的子目錄去檢視跟蹤檔案?

有沒有必要去手動備份或優化資料庫?

在Oracle Restart環境下,GIMR會被預設建立嗎?

需要分配多少磁碟空間給資料庫?

參考


適用於:

Oracle Database - Enterprise Edition - 版本 12.1.0.1 和更高版本
Oracle Database Cloud Schema Service - 版本 N/A 和更高版本
Oracle Database Exadata Express Cloud Service - 版本 N/A 和更高版本
Oracle Database Exadata Cloud Machine - 版本 N/A 和更高版本
Oracle Cloud Infrastructure - Database Service - 版本 N/A 和更高版本
本文件所含資訊適用於所有平臺

用途

此文件是一個對 12c Grid Infrastructure 的新功能:管理資料庫的 FAQ 文件。

問題和答案

 

什麼是管理資料庫?

管理資料庫是一個由 12c 叢集軟體管理的單例項資料庫。因為此資料庫為單例項資料庫,所以它只在叢集的一個節點執行。也正是因為這個資料庫是被叢集管理的,所以如果資料庫執行節點 down 掉,資料庫也會被自動切換到另外的節點。

 

管理資料庫是用來幹什麼的?

在 12c,管理資料庫是一個用來集中存放 Cluster Health Monitor 資料(又稱:CHM/OS,ora.crf)以及其他的資料的資料庫。

 

管理資料庫的資料檔案放在哪裡?

在12.1版本,管理資料庫預設和 OCR、Voting disk 使用一樣的共享儲存。在12.2,在安裝時可以指定使用單獨的diskgroup。

 

在安裝升級的時候,如果不配置管理資料庫會有什麼樣的問題?

管理資料庫在 12.1是非強制的,如果在使用 OUI 安裝升級的時候未選擇該選項,所有的依賴於管理資料庫的功能都會被禁用(比如 CHM/OS 等等)。

在 12.1.0.2 中,管理資料庫變為強制安裝(除了 Exadata環境)。

   

有哪些和管理資料庫相關的資源?

從“crsctl stat res –t”的輸出結果來看,以下是和管理資料庫有關的資源:

ora.mgmtdb
1 ONLINE ONLINE racnode1f Open,STABLE

ora.MGMTLSNR
1 ONLINE ONLINE racnode1f 169.254.118.96 10.3.0.70,STABLE

在 OS 層面,可以看到資料庫“-MGMTDB”和監聽器“MGMTLSNR”:

ps -ef| grep pmon_-MGMTDB

grid 3500 1 0 Jun04 ? 00:06:18 mdb_pmon_-MGMTDB

ps -ef| grep MGMTLSNR

grid 3308 1 0 Jun04 ? 00:00:55 /ocw/c101/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit

 

如果管理資料庫停掉,怎樣手工啟動?

管理資料庫被叢集管理而且應該一直執行。如果資料庫因為一些原因停掉,下面的 srvctl 命令可以用來啟動資料庫:

Usage: srvctl start mgmtdb [-startoption <start_option>] [-node <node_name>]
Usage: srvctl start mgmtlsnr [-node <node_name>]

 

怎樣“cd”到管理資料庫的子目錄去檢視跟蹤檔案?

通常來講,一般沒有必要去檢視管理資料庫的跟蹤檔案。如果需要檢視則必須在資料庫名前加上“./”以避免以下的錯誤,因為資料庫資料庫名前面有個“-”:

cd -MGMTDB
-bash: cd: -M: invalid option
cd: usage: cd [-L|-P] [dir]


cd  ./ -MGMTDB        ==>> this will work as "./" is specified


more -MGMTDB_m000_9912.trc
more: unknown option "-M"
usage: more [-dflpcsu] [+linenum | +/pattern] name1 name2 ...

 

more  ./ -MGMTDB_m000_9912.trc
Trace file /home/grid/app/grid/diag/rdbms/_mgmtdb/-MGMTDB/trace/-MGMTDB_m000_9912.trc
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, Advanced Analytics and Management Database options

 

有沒有必要去手動備份或優化資料庫?

目前沒有必要。

在Oracle Restart環境下,GIMR會被預設建立嗎?

不。在Oracle Restart環境下GIMR預設不會被建立。

 

需要分配多少磁碟空間給資料庫?

OCR 和管理資料庫在外部冗餘的情況下:

至少 5.2GB 的空間的 OCR 用來儲存資料庫(4.5GB+300MB Voting files+400MB OCR),如果節點數超過 4,則每個多出的節點多分配 500MB 的空間。 如:一個六節點的叢集應該使用 6.2GB 空間。

Oracle 的文件說明:  http://docs.oracle.com/database/121/CWLIN/storage.htm#CHDDCAHD

 

 

參考

NOTE:1589394.1  - How to Move/Recreate GI Management Repository (GIMR / MGMTDB) to Different Shared Storage (Diskgroup, CFS or NFS etc)
NOTE:2065175.1  - MDBUtil: GI Management Repository configuration tool






12.2:如何建立 GI Management Repository (文件 ID 2364214.1)


文件內容


目標

解決方案

參考


適用於:

Oracle Database - Enterprise Edition - 版本 12.2.0.1 和更高版本
本文件所含資訊適用於所有平臺

目標

本文概括了建立 12.2 GIMR (GridInfrastructure Management Repository) Database (MGMTDB) 的步驟。

解決方案

 
1. 發出 DBCA 命令來建立 MGMTDB 的 container。

以 grid 使用者,

$ <GI_HOME>/bin/dbca -silent -createDatabase -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc
                                                                             -sid -MGMTDB
                                                                             -gdbName _mgmtdb
                                                                             -storageType ASM
                                                                             -diskGroupName  <DG target>
                                                                             -datafileJarLocation <GI_HOME>/assistants/dbca/templates
                                                                             -characterset AL32UTF8
                                                                             -autoGeneratePasswords
                                                                             -skipUserTemplateCheck

注意,根據需要修改<DG target> (比如 +DATA, +REDO, ...)

2. 建立 pluggable GIMR 庫。

以 grid 使用者,

$ <GI_HOME>/bin/mgmtca -local

 

注意,為了避免使用上述的手工步驟,您可以利用自動化工具 : mdbutil.pl  ,請參閱  Note: 2065175.1

舉例如下:
(oracle)$ ./mdbutil.pl --addmdb --target=+DATAC1
2017-04-04 14:47:48: I Starting To Configure MGMTDB at +DATAC1...
2017-04-04 14:47:57: I Container database creation in progress...
2017-04-04 14:55:20: I Plugable database creation in progress...
2017-04-04 14:57:03: I Executing "/tmp/mdbutil.pl --addchm" on xxxadm01 as root to configure CHM.
root@ xxxadm01 password:
2017-04-04 15:01:36: I MGMTDB & CHM configuration done!

參考

NOTE:2065175.1  - MDBUtil: GI Management Repository configuration tool


如何在不同的共享儲存(磁碟組、CFS、NFS 等)上移動/重建 GIMR (MGMTDB) (文件 ID 2225754.1)


文件內容


目標

解決方案

參考


適用於:

Oracle Database - Enterprise Edition - 版本 12.1.0.1 到 12.2.0.1 [發行版 12.1 到 12.2]
本文件所含資訊適用於所有平臺

目標

本文目的給出轉移 12c 的 GIMR(Grid Infrastructure Management Repository)到其它共享儲存的概要步驟。

對於12.2 請參考 note 2065175.1  - MDBUtil: GI Management Repository configuration tool 來建立GIMR或者移動資料檔案到不同的磁碟組上。這篇文件的內容同樣適用於在12.2 上刪除已經存在的mgmtdb和建立新的mgmtdb

這個過程執行時GIMR 管理資料庫中原有的資料無法保留。請通過 grid 使用者,在任何節點執行下面命令,以手動方式備份“管理資料庫”:

$ <GI_HOME>/bin/oclumon dumpnodeview -allnodes -v > <backup-file>

 

解決方案

 

1. 停止並禁用 ora.crf 資源

需要使用 root 使用者,在每一個節點執行命令:

# <GI_HOME>/bin/crsctl stop res ora.crf -init
# <GI_HOME>/bin/crsctl modify res ora.crf -attr ENABLED=0 -init

不要停止 ora.mgmtlsnr 資源 ora.mgmtdb,否則第二步會遇到下面錯誤:

Oracle Grid Management database is running on node "". Run dbca on node "" to delete the database.


2. 執行 DBCA 命令刪除管理資料庫

使用 grid 使用者執行下面命令,來確定 MGMTDB 執行的節點:

$ <GI_HOME>/bin/srvctl status mgmtdb


在MGMTDB執行的節點上,執行以下命令:

<GI_HOME>/bin/dbca -silent -deleteDatabase -sourceDB -MGMTDB
Connecting to database
4% complete
9% complete
14% complete
19% complete
23% complete
28% complete
47% complete
Updating network configuration files
48% complete
52% complete
Deleting instance and datafiles
76% complete
100% complete
Look at the log file "/home/grid/app/grid/cfgtoollogs/dbca/_mgmtdb.log" for further details.

 

注意:

如果管理MGMTDB庫沒有執行,DBCA 會遇到下面錯誤:

Oracle Grid Management database is running on node "". Run dbca on node "" to delete the database.

解決該問題的辦法是通過下面方式手動刪除:

- 在檔案系統層面,刪除管理資料庫的相關檔案。並刪除 oratab 的相關條目

- 使用 srvctl 刪除 mgmtdb 資源:srvctl remove mgmtdb

 

3. 重建管理資料庫(MGMTDB)

3A. 針對 12.1.0.1 版本

在任一節點使用 grid 使用者執行 DBCA 命令:

<GI_HOME>/bin/dbca -silent -createDatabase -templateName MGMTSeed_Database.dbc -sid -MGMTDB -gdbName _mgmtdb -storageType ASM -diskGroupName <+NEW_DG> -datafileJarLocation <GI_HOME>/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -oui_internal
Copying database files
1% complete
3% complete
10% complete
17% complete
24% complete
31% complete
35% complete
Creating and starting Oracle instance
37% complete
42% complete
47% complete
52% complete
53% complete
56% complete
58% complete
Registering database with Oracle Grid Infrastructure
64% complete
Completing Database Creation
68% complete
78% complete
89% complete
100% complete
Look at the log file "/home/grid/app/grid/cfgtoollogs/dbca/_mgmtdb/_mgmtdb1.log" for further details.


注意:無論是新建立還是修改磁碟組的過程,我們都建議把磁碟組的引數 compatible.asm 和 compatible.rdbms 設定成 12.1。

以上例子是建立了管理資料庫到一個新的磁碟組,如果是使用共享的 NFS/CFS, 請參考以下例子:

<GI_HOME>/bin/dbca -silent -createDatabase -templateName MGMTSeed_Database.dbc -sid -MGMTDB -gdbName _mgmtdb -storageType FS -datafileDestination <NFS_Location> -datafileJarLocation <GI_HOME>/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -oui_internal

 

3B. 針對 12.1.0.2 版本

a. 在任一節點使用 grid 使用者執行 DBCA 命令,並指定好期望使用的磁碟組名:

$ <GI_HOME>/bin/dbca -silent -createDatabase -sid -MGMTDB -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -gdbName _mgmtdb -storageType ASM -diskGroupName <+NEW_DG> -datafileJarLocation $GI_HOME/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck

Copying database files
1% complete
3% complete
10% complete
17% complete
24% complete
31% complete
35% complete
Creating and starting Oracle instance
37% complete
42% complete
47% complete
52% complete
53% complete
56% complete
58% complete
Registering database with Oracle Grid Infrastructure
64% complete
Completing Database Creation
68% complete
78% complete
89% complete
100% complete
Look at the log file "<GI_HOME>/cfgtoollogs/dbca/_mgmtdb/_mgmtdb1.log" for further details.

注意:無論是新建立還是修改磁碟組的過程,我們都建議把磁碟組的引數 compatible.asm 和 compatible.rdbms 設定成12.1。


Ex: CREATE DISKGROUP … ATTRIBUTE 'compatible.rdbms' = '12.1', 'compatible.asm' = '12.1';


管理資料庫可以通過下面命令,從 NFS/CFS 遷移到 ASM 磁碟組:

$ <GI_HOME>/bin/dbca -silent -createDatabase -sid -MGMTDB -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -gdbName _mgmtdb -storageType FS -datafileDestination <NFS_Location> -datafileJarLocation $GI_HOME/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck


b. 使用 DBCA 再建立一個 PDB:


使用 grid 使用者執行下面 DBCA 命令:

注意:命令中的 CLUSTER_NAME 中不可以有中橫線(“-“),需要使用下劃線替代(“_”)。

$ <GI_HOME>/bin/dbca -silent -createPluggableDatabase -sourceDB -MGMTDB -pdbName <CLUSTER_NAME> -createPDBFrom RMANBACKUP -PDBBackUpfile <GI_HOME>/assistants/dbca/templates/mgmtseed_pdb.dfb -PDBMetadataFile <GI_HOME>/assistants/dbca/templates/mgmtseed_pdb.xml -createAsClone true 
Creating Pluggable Database
4% complete
12% complete
21% complete
38% complete
55% complete
85% complete
Completing Pluggable Database Creation
100% complete
Look at the log file "<GI_HOME>/cfgtoollogs/dbca/_mgmtdb/<pdbName>/_mgmtdb2.log" for further details.

 

4. 確保管理資料庫建立成功

使用grid 使用者,檢查管理資料庫執行在哪個節點:

$ <GI_HOME>/bin/srvctl status MGMTDB
Database is enabled
Instance -MGMTDB is running on node <NODE_NAME>

On <NODE_NAME>:

$ <GI_HOME>/bin/mgmtca

 

5. 啟用並啟動 ora.crf 資源

使用root 使用者在每一個節點執行:

# <GI_HOME>/bin/crsctl modify res ora.crf -attr ENABLED=1 -init
# <GI_HOME>/bin/crsctl start res ora.crf -init

  

參考

NOTE:2168379.1  - Mgmtca MGTCA-1101 : Failure in Oracle Grid Infrastructure Management Repository Operation
NOTE:2246123.1  - 12.2: How to Create GI Management Repository
BUG:19530197  - MGTCA-1101: FAILURE IN ORACLE GRID INFRASTRUCTURE MANAGEMENT REPOSITORY OPERATI


12.1.0.2 GI GIMR/MGMTDB SYSMGMTDATA Tablespace Increasing Rapidly (文件 ID 2177879.1)

In this Document


Symptoms

Cause

Solution

References


APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.

SYMPTOMS

12.1.0.2 GIMR database (-MGMTDB) SYSMGMTDATA tablespace keeps increasing with the same retention size:

$ oclumon manage -get reppath

CHM Repository Path = +CRS/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdata. 269.917710623


Tablespace Name File Name Size (M) Used (M) Free (M) % Used
-------------------- -------------------------------------------------------------------------------- ---------- ---------- ---------- ----------
SYSMGMTDATA +CRS/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdata. 269.917710623  16894  16032  521 95

 

Expired CHM data are not purged: 

SQL> select trunc(BEGINTIME), count(*) from chm.CHMOS_PROCESS_INT_TBL group by trunc(BEGINTIME) order by trunc(BEGINTIME);

TRUNC(BEG COUNT(*)
--------- ----------
25-JUL-16 1824587
26-JUL-16 3019039
27-JUL-16 3236612
28-JUL-16 3559627
29-JUL-16 3687053
....
09-AUG-16 3626059
10-AUG-16 3638210
11-AUG-16 3665800
12-AUG-16 3565969
13-AUG-16 3650727
14-AUG-16 3638103
15-AUG-16 3622208
16-AUG-16 3680251
17-AUG-16 2321889

 

CAUSE

Issue was investigated in:

Bug 23563549  - -MGMTDB SYSMGMTDATA IS FILLING UP WHICH CAUSES GRID1 DISK TO REACH 100%.

Bug 24331121  - OCR_VOTE DISK GROUP IS 99% FULL, HIGH UNDO USED BY MGMTDB

 

The cause is due to autoextend for the tablespace being set to on.

 

SOLUTION

Solution 1:

Recreate GIMR which will drop the existing database and set autoextend back to off.

note 1589394.1  - How to Move/Recreate GI Management Repository to Different Shared Storage (Diskgroup, CFS or NFS etc)

 

Or

Solution 2: 

Manually perform the following steps to shrink:

 

1. Stop and disable ora.crf resource.

On each node, as root user:

# <GI_HOME>/bin/crsctl stop res ora.crf -init
# <GI_HOME>/bin/crsctl modify res ora.crf -attr ENABLED=0 -init



2. Identify huge objects from dba_segments and truncate them:

Connect to MGMTDB:

export ORACLE_HOME=<GRID_HOME>
export ORACLE_SID=-MGMTDB
$ORACLE_HOME/bin/sqlplus / as sysdba
SQL> select pdb_name from dba_pdbs where pdb_name!='PDB$SEED';


PDB_NAME
--------------------------------------------------------------------------------------------------------------------------------
CEHAOVMSP1CLU68 ====>>>> this is your PDB name, use it in next command

SQL> alter session set container=CEHAOVMSP1CLU68;

Session altered.

SQL> col obj format a50
SQL> select owner||'.'||SEGMENT_NAME obj, BYTES from dba_segments where owner='CHM' order by 2 asc

Likely you are going to see the following as the biggest table:

CHM.CHMOS_PROCESS_INT_TBL
CHM.CHMOS_DEVICE_INT_TBL

Truncate the table, i.e.:

SQL> truncate table CHM.CHMOS_PROCESS_INT_TBL;
SQL> truncate table CHM.CHMOS_DEVICE_INT_TBL;
..


3. Shrink the tablespace:

https://docs.oracle.com/database/121/ADMIN/schema.htm#ADMIN11600

4. Enable and start ora.crf resource. 

On each node, as root user:

# <GI_HOME>/bin/crsctl modify res ora.crf -attr ENABLED=1 -init
# <GI_HOME>/bin/crsctl start res ora.crf -init

 

REFERENCES

NOTE:1589394.1  - How to Move/Recreate GI Management Repository to Different Shared Storage (Diskgroup, CFS or NFS etc)
BUG:23563549  - -MGMTDB SYSMGMTDATA IS FILLING UP WHICH CAUSES GRID1 DISK TO REACH 100%.



MDBUtil: GI Management Repository configuration tool (文件 ID 2065175.1)

In this Document


Abstract

History

Details

Grid Infrastructure Management Repository (GIMR) database MGMTDB

MDBUtil: GI Management Repository configuration tool

MDBUtil usage

Create MGMTDB/CHM and reconfigure related functions

Migrate MGMTDB database files to another disk group

Check the CHM & MGMTDB status

MDBUtil: troubleshooting

References


APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.1.0.1 to 12.2.0.1 [Release 12.1 to 12.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Linux x86-64

ABSTRACT

This document explains how to use " mdbutil ", a tool used to create the Grid Infrastructure Management Repository (GIMR) database MGMTDB or move its database files to a different disk group in one simple command

HISTORY

Author: Ruggero Citton (ruggero.citton@oracle.com) - RACPack Team
Create Date 2014
Update Date June-2018
Latest " mdbutil " Version: 20180614 $Revision: 1.95 $ 

DETAILS

Grid Infrastructure Management Repository (GIMR) database MGMTDB

The Grid Infrastructure Management Repository enables such features as Cluster Health Monitor, Oracle Database QoS Management, and Rapid Home Provisioning, and provides a historical metric repository that simplifies viewing of past performance and diagnosis of issues.
During the installation of Oracle Grid Infrastructure 12.1.0.1 you've had the option to install the Grid Infrastructure Management Repository (GIMR) database MGMTDB. Starting with Oracle Grid Infrastructure 12.1.0.2 the GIMR database has become mandatory and is automatically installed.

MDBUtil: GI Management Repository configuration tool

If you need to create or re-create the Grid Infrastructure Management Repository (GIMR) database MGMTDB after the installation, specific knowledge and many manual steps are required. (see  Note 1589394.1  for details). You also may desire to move the MGMTDB database files to a different disk group from your Clusterware files.  MDBUtil  has been created to provide this functionality in one simple command.

Note:
 This script is provided for educational purposes only. 
 It is NOT supported by Oracle World Wide Technical Support. 
 The script has been tested and appears to work as intended. 
 You should always run new scripts on a test instance initially.

MDBUtil usage

# ./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

Create MGMTDB/CHM and reconfigure related functions

You can create MGMTDB and configure the related functions such mgmtlsnr, chm issuing (as 'grid' user). PLEASE NOTE: You will also need root user credentials if the CHM resource (ora.crf) has not been previously created.

mdbutil --addmdb --target=<MGMTDB destination>

example:

[grid@rwsdb1 tmp]$ ./mdbutil.pl --addmdb --target=+DATA       
2015-10-12 09:11:17:  I  Starting To Configure MGMTDB at +DATA...
2015-10-12 09:11:19:  I  Container database creation in progress...
2015-10-12 09:17:35:  I  Plugable database creation in progress...
2015-10-12 09:19:00:  I  Executing "/tmp/mdbutil.pl --addchm" on rwsdb1 as root to configure CHM.
root@rwsdb1's password: 
2015-10-12 09:20:17:  I  Executing "/tmp/mdbutil.pl --addchm" on rwsdb2 as root to configure CHM.
root@rwsdb2's password: 
2015-10-12 09:20:22:  I  MGMTDB & CHM configuration done!

Migrate MGMTDB database files to another disk group

You can move MGMTDB database files to another ASM disk group issuing the following command as GI software owner (ex: ‘grid') user:

mdbutil.pl --mvmgmtdb --target=<new MGMTDB destination>  

example:
[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  Creating new path +REDO/_MGMTDB/TEMPFILE
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!

Check the CHM & MGMTDB status

If for any reason, MDBUtil is failing, you can get diagnostics information running mdbutil again using the “-debug” option, example:

mdbutil.pl --status

example:
[grid@rwsdb1 tmp]$ ./mdbutil.pl --status
2015-10-12 09:30:37:  I  Checking CHM status...
2015-10-12 09:30:38:  I  Listener MGMTLSNR is configured and running on rwsdb1
2015-10-12 09:30:39:  I  Database MGMTDB is configured and running on rwsdb1
2015-10-12 09:30:39:  I  Cluster Health Monitor (CHM) is configured and running
--------------------------------------------------------------------------------
CHM Repository Path = +RECO/_MGMTDB/DATAFILES/rwsdb_c/sysmgmtdata.20151012092509.dbf
MGMTDB space used on DG +RECO = 504 Mb
--------------------------------------------------------------------------------

MDBUtil: troubleshooting

If for any reason, MDBUtil is failing, you could get diagnostics information running mdbutil again using " -debug " option, example:

[grid@rwsdb1 tmp]$ ./mdbutil.pl --addmdb --target=+REDO
2015-10-12 09:09:31:  I  Starting To Configure MGMTDB at +REDO...
2015-10-12 09:09:52:  I  Container database creation in progress...
2015-10-12 09:09:59:  E  Cannot create CDB MGMTDB on rwsdb1, exiting...


[grid@rwsdb1 tmp]$ ./mdbutil.pl --addmdb --target=+REDO  -debug
2015-10-12 09:10:18:  D  Executing: /u01/app/12.1.0.2/grid/bin/srvctl status diskgroup -g REDO
2015-10-12 09:10:19:  D  Exit code: 0
2015-10-12 09:10:19:  D  Output of last command execution: 
Disk Group REDO is running on rwsdb1,rwsdb1
2015-10-12 09:10:19:  I  Starting To Configure MGMTDB at +REDO...
2015-10-12 09:10:19:  D  Executing: /u01/app/12.1.0.2/grid/bin/srvctl status mgmtlsnr
2015-10-12 09:10:19:  D  Exit code: 0
2015-10-12 09:10:19:  D  Output of last command execution: 
Listener MGMTLSNR is enabled
2015-10-12 09:10:19:  D  Executing: /u01/app/12.1.0.2/grid/bin/srvctl status mgmtdb
2015-10-12 09:10:20:  D  Exit code: 1
2015-10-12 09:10:20:  D  Output of last command execution: 
PRCD-1120 : The resource for database _mgmtdb could not be found.
2015-10-12 09:10:20:  D  Executing: /u01/app/12.1.0.2/grid/bin/srvctl status mgmtdb
2015-10-12 09:10:20:  D  Exit code: 1
2015-10-12 09:10:20:  D  Output of last command execution: 
PRCD-1120 : The resource for database _mgmtdb could not be found.
2015-10-12 09:10:20:  D  Executing: /u01/app/12.1.0.2/grid/bin/srvctl stop mgmtlsnr
2015-10-12 09:10:21:  D  Exit code: 2
2015-10-12 09:10:21:  D  Output of last command execution: 
PRCC-1016 : MGMTLSNR was already stopped
2015-10-12 09:10:21:  D  Executing: /u01/app/12.1.0.2/grid/bin/srvctl enable oc4j
2015-10-12 09:10:21:  D  Exit code: 2
2015-10-12 09:10:21:  D  Output of last command execution: 
PRKO-2116 : OC4J is already enabled
2015-10-12 09:10:21:  D  Executing: /u01/app/12.1.0.2/grid/bin/srvctl start oc4j
2015-10-12 09:10:21:  D  Exit code: 2
2015-10-12 09:10:21:  D  Output of last command execution: 
PRCC-1014 : oc4j was already running
2015-10-12 09:10:21:  D  Executing: /u01/app/12.1.0.2/grid/bin/crsctl query crs activeversion
2015-10-12 09:10:21:  D  Exit code: 0
2015-10-12 09:10:21:  D  Output of last command execution: 
Oracle Clusterware active version on the cluster is [12.1.0.2.0]
2015-10-12 09:10:21:  I  Container database creation in progress...
2015-10-12 09:10:21:  D  Executing: /u01/app/12.1.0.2/grid/bin/dbca  -silent -createDatabase -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -sid -MGMTDB -gdbName _mgmtdb -storageType ASM -diskGroupName REDO -datafileJarLocation /u01/app/12.1.0.2/grid/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck
2015-10-12 09:10:26:  D  Exit code: 1
2015-10-12 09:10:26:  D  Output of last command execution: 
Look at the log file "/u01/app/grid/cfgtoollogs/dbca/_mgmtdb1.log" for further details.
2015-10-12 09:10:26:  E  Cannot create CDB MGMTDB on rwsdb1, exiting...

--> 
[grid@rwsdb1 tmp]$ cat /u01/app/grid/cfgtoollogs/dbca/_mgmtdb1.log

+REDO does not have enough space. Required space is 1566 MB , available space is 1305 MB.


 

REFERENCES

NOTE:1589394.1  - How to Move/Recreate GI Management Repository (GIMR / MGMTDB) to Different Shared Storage (Diskgroup, CFS or NFS etc)
NOTE:1568402.1  - FAQ: 12c Grid Infrastructure Management Repository (GIMR)
NOTE:2062234.1  - How to Relocate Cluster Health Monitor (CHM) Repository and Increase Retention Time

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

相關文章