Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to transform a single instance GI environment into a cluster environment

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to convert a single instance GI environment into a cluster environment". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to convert a single instance GI environment into a cluster environment".

-

1. Conversion of stand-alone ASM to cluster ASM

-

-

1.1 close the GI environment resources.

-

[oracle@a42ams1 ~] $sqlplus / as sysdba

SQL > shutdown immediate

[grid@a42ams1 ~] $crsctl stop has

-

1.2 check the installation environment information

-

-1.2.1 configure mutual trust

. / sshUserSetup.sh-hosts "a42ams1 a42ams2"-user grid-advanced-noPromptPassphrase

. / sshUserSetup.sh-hosts "a42ams1 a42ams2"-user oracle-advanced-noPromptPassphrase

More / etc/hosts | grep-Ev'^ # | ^ $| 127.0.0.1 | vip | scan |:'| awk'{print "ssh" $2 "date;"}'> ping.sh

-1.2.2 perform cluster installation verification

. / runcluvfy.sh stage-pre crsinst-n a42ams1 Magi a42ams2-verbose

-

1.3 Uninstall the stand-alone environment GI and clear the software files

-

[root@a42ams1 ~] # cd / grid/app/11.2.0/

[root@a42ams1 grid] # cd crs/install/

[root@a42ams1 install] #. / roothas.pl-deconfig-force

Using configuration parameter file:. / crsconfig_params

CRS resources for listeners are still configured

PRKO-2573: ONS daemon is already stopped.

CRS-2673: Attempting to stop 'ora.A42AMSARCH.dg' on 'a42ams1'

CRS-2673: Attempting to stop 'ora.A42AMSDATA1.dg' on 'a42ams1'

CRS-2673: Attempting to stop 'ora.A42AMSOCR.dg' on 'a42ams1'

CRS-2677: Stop of 'ora.A42AMSOCR.dg' on 'a42ams1' succeeded

CRS-2677: Stop of 'ora.A42AMSDATA1.dg' on 'a42ams1' succeeded

CRS-2677: Stop of 'ora.A42AMSARCH.dg' on 'a42ams1' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'a42ams1'

CRS-2677: Stop of 'ora.asm' on 'a42ams1' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'a42ams1'

CRS-2677: Stop of 'ora.cssd' on 'a42ams1' succeeded

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'a42ams1'

CRS-2673: Attempting to stop 'ora.evmd' on 'a42ams1'

CRS-2677: Stop of 'ora.evmd' on 'a42ams1' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'a42ams1' has completed

CRS-4133: Oracle High Availability Services has been stopped.

Successfully deconfigured Oracle Restart stack

-11.2.0.4 is no longer supported (How to Convert a Single-Instance ASM to Cluster ASM (document ID 452758.1))

[oracle@a42ams1 ~] $cd $ORACLE_HOME/bin

[oracle@a42ams1 bin] $dbca-silent-deleteASM

This is no longer a supported operation. Use Automatic Storage Management Configuration Assistant (ASMCA) from grid infrastructure/clusterware home to delete ASM.

-- separating the ORACLE_HOME information of GI

[grid@a42ams1 ~] $

$ORACLE_HOME/oui/bin/runInstaller-silent-detachHome ORACLE_HOME=$ORACLE_HOME

-

1.4 newly installed GI/DB environment (pay attention to adjusting catalogs and environment variables)

-

-- if you need to use the existing disk as the OCR disk, you need to empty the disk information.

[root@a42ams1 ~] # dd if=/dev/zero of=/dev/asm-ocr1 bs=1M count=100

[root@a42ams1 ~] # dd if=/dev/zero of=/dev/asm-ocr2 bs=1M count=100

[root@a42ams1 ~] # dd if=/dev/zero of=/dev/asm-ocr3 bs=1M count=100

-

two。 Conversion of stand-alone database to cluster database

-

-

2.1 Mount the original DG (both nodes can be mounted)

-

[grid@a42ams1 ~] $kfod aisle disks=all ds=true o=all

[grid@a42ams1 ~] $sqlplus / as sysasm

SQL > alter diskgroup A42AMSDATA1 mount

SQL > alter diskgroup A42AMSARCH mount

-

2.2 start the original database (oracle executable permissions need to be modified, otherwise the disk group cannot be accessed when the database is started)

-

2.2.1 copy the original parameter file and password file to the new installation directory and start the database

[oracle@a42ams1 ~] $sqlplus / as sysdba

SQL > startup

ORA-01565: error in identifying file'+ A42AMSDATA1 Universe a 42amsdbamp spfilea42amsdb.ora'

ORA-17503: ksfdopn:2 Failed to open file + A42AMSDATA1/a42amsdb/spfilea42amsdb.ora

ORA-15001: diskgroup "A42AMSDATA1" does not exist or is not mounted

ORA-15040: diskgroup is incomplete

-- 2.2.2 adjust oracle executable file permissions

[oracle@a42ams1 trace] $ls-la $ORACLE_HOME/bin/oracle

-rwsr-s--x 1 oracle oinstall 239626689 Jun 14 10:23 / oracle/app/oracle/product/11.2.0.4/db_1/bin/oracle

[root@a42ams1 bin] # / grid/app/11.2.0.4/grid/bin/setasmgidwrap o=/oracle/app/oracle/product/11.2.0.4/db_1/bin/oracle

-- 2.2.3 start the database

[oracle@a42ams1 ~] $sqlplus / as sysdba

SQL > startup

2.2.4 add the database to the crs resource and verify the environment information

[oracle@a42ams1] $srvctl add database-d a42amsdb-o / oracle/app/oracle/product/11.2.0.4/db_1-p + A42AMSDATA1/a42amsdb/spfilea42amsdb.ora-c Single-x a42ams1

[oracle@a42ams1] $srvctl config database-d a42amsdb

-

2.3Transforming rac database (MOS ID 1362116.1)

-

[oracle@a42ams1 ~] $cd $ORACLE_HOME/assistants/rconfig/sampleXMLs

[oracle@a42ams1 sampleXMLs] $cp ConvertToRAC_AdminManaged.xml ~

-2.3.1 replace conversion information

[oracle@a42ams1 ~] $vi ConvertToRAC_AdminManaged.xml

-- conversion path information (the directories of the source and destination prompted in the configuration file can be the same)

:% s#/oracle/product/11.2.0/db_1#/oracle/app/oracle/product/11.2.0.4/db_1#g

-- instance information

To be replaced by:

-Node information

To be replaced by:

-- instance prefix information

Sales

To be replaced by:

A42amsdb

-- DG information adjustment (DG information is empty because data migration is not required)

+ ASMDG

To be replaced by:

+ ASMDG

To be replaced by:

-- 2.3.2 change the sys password to oracle

SQL > alter user sys identified by oracle

-- 2.3.3 check the conversion file

[oracle@a42ams1 ~] $vi ConvertToRAC_AdminManaged.xml

To be replaced by:

[oracle@a42ams1 ~] $ORACLE_HOME/bin/rconfig. / ConvertToRAC_AdminManaged.xml

-2.3.4 perform the conversion

[oracle@a42ams1 ~] $vi ConvertToRAC_AdminManaged.xml

To be replaced by:

[oracle@a42ams1 ~] $ORACLE_HOME/bin/rconfig. / ConvertToRAC_AdminManaged.xml

Converting Database "a42amsdb" to Cluster Database. Target Oracle Home: / oracle/app/oracle/product/11.2.0.4/db_1. Database Role: PRIMARY.

Setting Data Files and Control Files

Adding Database Instances

Adding Redo Logs

Enabling threads for all Database Instances

Setting TEMP tablespace

Adding UNDO tablespaces

Adding Trace files

Setting Fast Recovery Area

Updating Oratab

Creating Password file (s)

Configuring Listeners

Configuring related CRS resources

Starting Cluster Database

-- 2.3.5 perform conversion check conversion results and modify environment variables

[oracle@a42ams1] $srvctl config database-d a42amsdb

[oracle@a42ams1] $crsctl stat res ora.a42amsdb.db-t

[oracle@a42ams1 ~] $ps-ef | grep ora_smon

[oracle@a42ams2 ~] $ps-ef | grep ora_smon

Thank you for your reading. the above is the content of "how to convert a single-instance GI environment into a cluster environment". After the study of this article, I believe you have a deeper understanding of how to convert a single-instance GI environment into a cluster environment. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report