Oracle 12c RAC Mobile Mgmtdb Database Data file method

Source: Internet
Author: User


Note: This article declined reprint!

In the previous blog introduced the concept of Mgmtdb in oracle12c RAC, refer to:

Oracle 12cRAC mgmtdb Description

http://blog.csdn.net/tianlesoftware/article/details/41804553

By default, MGMTDB data files are stored in the disk group of OCR voting disk, we can also transfer the MGMTDB in order to save the space of OCR disks.

Of course, the moving position here is also moved from one shared location to another.

Here's how.

1 stopping and disabling ORA.CRF resources

The ORA.CRF here is the CHM.

At all nodes, use the root user to execute the following command:

[Email protected] ~]# crsctlstop res ora.crf-init

Crs-2673:attempting to stop ' ORA.CRF ' on ' Rac1 '

Crs-2677:stop of ' ORA.CRF ' on ' Rac1 ' succeeded

[Email protected] ~]# crsctlmodify res ora.crf-attr enabled=0-init

[Email protected] ~]#

[Email protected] ~]# Crsctl Stop Res ora.crf-init

Crs-2673:attempting to stop ' ORA.CRF ' on ' RAC2 '

Crs-2677:stop of ' ORA.CRF ' on ' Rac2 ' succeeded

[Email protected] ~]# Crsctl Modify Res ora.crf-attr Enabled=0-init

[Email protected] ~]#

Note: Ora.mgmtlsnr and ORA.MGMTDB resources cannot be stopped, otherwise the DBCA will be an error.

2 Execute DBCA Delete Management database

-- View Mgmtdb The running node:

[Email protected] ~]# srvctl status Mgmtdb

Database is enabled

Instance-mgmtdb is running on node RAC2

This shows that running on Node 2, then on Node 2, with the grid user, execute the DBCA command and delete the Mgmtdb.

[Email protected] ~]$ Dbca-silent-deletedatabase-sourcedb-mgmtdb

Connecting to Database

4% Complete

9% Complete

14% Complete

19% Complete

23% Complete

28% Complete

47% Complete

Updating networkconfiguration Files

48% Complete

52% Complete

Deleting instance Anddatafiles

76% Complete

100% Complete

Look at the log file '/u01/gridbase/cfgtoollogs/dbca/_mgmtdb.log ' for further details.

[Email protected] ~]$

Attention:

If you are using DBCA manually created MGMTDB, you may not be able to delete the situation, the specific process can refer to mos:1631336.1.

3 reconstruction of the Mgmtdb CDB1.1 12.1.0.1 Execute the following command

with a grid user, at any node, execute the following command to rebuild the CDB.

$ <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

Attention:

Here the new disk group, the recommended Compatible.asm and Compatible.rdbms properties are set to 12.1.

The above command uses a disk group, and if you are using shared Nfs/cfs, use the following command:

<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

Our database version here is 12.1.0.1, and we are using a disk group, so we execute the first command:

[Email protected]/]$ dbca-silent-createdatabase-templatename mgmtseed_database.dbc-sid-mgmtdb-gdbname _mgmtdb-sto Ragetypeasm-diskgroupname Ocr-datafilejarlocation/u01/gridsoft/12.1.0/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 gridinfrastructure

64% Complete

Completing Database Creation

68% Complete

78% Complete

89% Complete

100% Complete

Look at the log file '/u01/gridbase/cfgtoollogs/dbca/_mgmtdb/_mgmtdb0.log ' for furtherdetails.

[Email protected]/]$

1.2 12.1.0.2 Execute the following command

At any node, use the grid user to execute the following command:

--asm Disk Group:

$ <gi_home>/bin/dbca-silent-createdatabase-sid-mgmtdb -createascontainerdatabasetrue-templatename Mgmtseed_database.dbc-gdbname _mgmtdb-storagetype asm-diskgroupname <+NEW_DG>-datafilejarlocation $GRID _ Home/assistants/dbca/templates-characterset Al32utf8-autogeneratepasswords-skipusertemplatecheck

-- shared 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-charactersetal32utf8-autogeneratepasswords-oui_internal

-- Example:

[[email protected] templates]$ dbca-silent-createdatabase-sid-mgmtdb-createascontainerdatabase true- Templatenamemgmtseed_database.dbc-gdbname _mgmtdb-storagetype Asm-diskgroupname +ocr-datafilejarlocation/u01/ Gridsoft/12.1.0.2/assistants/dbca/templates-characterset Al32utf8-autogeneratepasswords-skipusertemplatecheck

Registering Database with Oracle gridinfrastructure

5% Complete

Copying Database files

7% Complete

9% Complete

16% Complete

23% Complete

30% Complete

41% Complete

Creating and Starting Oracle instance

43% Complete

48% Complete

49% Complete

50% Complete

55% Complete

60% Complete

61% Complete

64% Complete

Completing Database Creation

68% Complete

79% Complete

89% Complete

100% Complete

Look at the log file '/u01/gridbase/cfgtoollogs/dbca/_mgmtdb/_mgmtdb0.log ' for furtherdetails.

[Email protected] templates]$

4 Creating a PDB using DBCA

[Email protected] templates]$ srvctl status Mgmtdb

Database is enabled

Instance-mgmtdb is running on node Rac1

[Email protected] templates]$

At any node, execute DBCA with the grid user to create the PDB with the following command:

$ <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 – Internalskipgihomecheck

-- Query the name of the cluster:

[Email protected]/]$ cemutlo-n

Rac-scan

[Email protected]/]$

Note: The default is Cluster_Name-, here, for example _

We're going to replace rac_scan here.

[Email protected] templates]$ Dbca-silent-createpluggabledatabase-sourcedb-mgmtdb-pdbname Rac_scan- Createpdbfromrmanbackup-pdbbackupfile/u01/gridsoft/12.1.0.2/assistants/dbca/templates/mgmtseed_ Pdb.dfb-pdbmetadatafile/u01/gridsoft/12.1.0.2/assistants/dbca/templates/mgmtseed_pdb.xml-createasclone true- Internalskipgihomecheck

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 "/u01/gridbase/cfgtoollogs/dbca/_mgmtdb/rac_scan/_mgmtdb0.log" forfurther details.

[Email protected] templates]$

5 Verifying Mgmtdb

Use the grid user to perform the following command to verify the MGMTDB operation:

[Email protected] ~]$ srvctl status Mgmtdb

Database is enabled

Instance-mgmtdb is running on node Rac1

This shows node 1, which is executed on Node 1:

[Email protected] ~]$ MGMTCA

[Email protected] ~]$ crsctl stat res-t

......

Ora. Mgmtlsnr

1 Online online Rac1 169.254.193.105 192.

168.57.5,stable

Ora.mgmtdb

1 Online online Rac1 open,stable

......

[Email protected] ~]$

[[email protected]]$ srvctl config mgmtdb

Database Unique Name:_mgmtdb

Database Name:

Oracle Home: <CRShome>

Oracle User:grid

spfile:+ocr/_mgmtdb/parameterfile/spfile.268.865977817

Password file:

Domain:

Start Options:open

Stop options:immediate

Database role:primary

Management policy:automatic

Type:management

PDB Name:rac_scan

PDB Service:rac_scan

Cluster Name:rac-scan

Database Instance:-mgmtdb

[[Email protected]]$

[Email protected] templates]$ Exportoracle_sid=-mgmtdb

[Email protected] templates]$ Sqlplus/as SYSDBA

Sql*plus:release 12.1.0.2.0 Production onwed Dec 10 21:39:13 2014

Copyright (c) 1982, Oracle. All rights reserved.

Connected to:

Oracle Database 12c Enterprise editionrelease 12.1.0.2.0-64bit Production

With the partitioning, Automatic Storage Managementand advanced Analytics Options

Sql> Select file_name Fromdba_data_files Union Select member file_name from V$logfile;

file_name

--------------------------------------------------------------------------------

+ocr/_mgmtdb/datafile/sysaux.257.865977463

+ocr/_mgmtdb/datafile/system.258.865977473

+ocr/_mgmtdb/datafile/undotbs1.259.865977489

+ocr/_mgmtdb/onlinelog/group_1.261.865977635

+ocr/_mgmtdb/onlinelog/group_2.262.865977635

+ocr/_mgmtdb/onlinelog/group_3.263.865977635

6 rows selected.

Sql>

The data file has been transferred to the OCR Disk group.

6 Enabling and starting ORA.CRF resources

At all nodes, execute with the root user:

[Email protected] u01]# Crsctl Modify Res ora.crf-attr Enabled=1-init

[Email protected] u01]# crsctl start res ora.crf-init

Crs-2672:attempting to start ' ORA.CRF ' on ' Rac1 '

Crs-2676:start of ' ORA.CRF ' on ' Rac1 ' succeeded

[Email protected] u01]# Oclumon Manage-get Master

Master = Rac1

[Email protected] u01]#

--------------------------------------------------------------------------------------------

All rights reserved, the article prohibits reprint, otherwise investigates the legal liability!

Aboutdave:

--------------------------------------------------------------------------------------------

qq:251097186

Email: [email protected]

Blog:http://blog.csdn.net/tianlesoftware

Weibo:http://weibo.com/tianlesoftware

Twitter:http://twitter.com/tianlesoftware

Facebook:http://www.facebook.com/tianlesoftware

Linkedin:http://cn.linkedin.com/in/tianlesoftware

Dave's QQ Group:

--------------------------------------------------------------------------------------------

Note: Add group must indicate tablespace and data file relationship | Do not repeat the addition group

cndba_1:104207940 (Full) cndba_2:62697716 (full) cndba_3:283816689

cndba_4:391125754 cndba_5:62697850 cndba_6:62697977 cndba_7:142216823 (full)

Oracle 12c RAC Mobile Mgmtdb Database Data file method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.