Scenario Preview:
We have One node RAC database setup 12c with Active - Passive database server. Now we have to convert it into 2 node active -active database .
- Status of one node rac database
oracle@srv2:~> srvctl config database -d RAC
Database unique name: RAC
Database name: RAC
Oracle home: /u01/app/oracle/product/12.1.0/db_1
Oracle user: oracle
Spfile: +DATA/RAC/PARAMETERFILE/spfile.274.1038413121
Password file: +DATA/RAC/PASSWORD/pwdrac.262.1038412435
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: FRA,DATA
Mount point paths:
Services: staf
Type: RACOneNode
Online relocation timeout: 5
Instance name prefix: RAC2
Candidate servers: srv1,srv2
OSDBA group: dba
OSOPER group: oper
Database instances:
Database is administrator managed
- Active node instance status database
oracle@srv2:~> srvctl status database -d rac
Instance RAC2_1 is running on node srv1
Online relocation: INACTIVE
oracle@srv2:~>
- Convert node one database to 2 node RAC Database
oracle@srv1:~> srvctl convert database -d RAC -c RAC
- Check the status of 2 node RAC database
oracle@srv1:~> srvctl config database -d rac
Database unique name: RAC
Database name: RAC
Oracle home: /u01/app/oracle/product/12.1.0/db_1
Oracle user: oracle
Spfile: +DATA/RAC/PARAMETERFILE/spfile.274.1038413121
Password file: +DATA/RAC/PASSWORD/pwdrac.262.1038412435
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: FRA,DATA
Mount point paths:
Services: staf
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances: RAC2_1
Configured nodes: srv1
Database is administrator managed
oracle@srv1:~>
- Add instance to rac database and mention server name (here srv2), Rember all commands are operated on active on node database
oracle@srv1:~> srvctl add instance -d RAC -i rac_2 -n srv2
- Start instance of node2 instance
oracle@srv1:~> srvctl start instance -d rac -i rac_2
- Check the status of database
oracle@srv1:~> srvctl status database -db rac
Instance RAC2_1 is running on node srv1
Instance rac_2 is running on node srv2
- Check the configuration status
oracle@srv1:~> srvctl config database -db oradb
PRCD-1120 : The resource for database oradb could not be found.
PRCR-1001 : Resource ora.oradb.db does not exist
oracle@srv1:~> srvctl config database -db rac
Database unique name: RAC
Database name: RAC
Oracle home: /u01/app/oracle/product/12.1.0/db_1
Oracle user: oracle
Spfile: +DATA/RAC/PARAMETERFILE/spfile.274.1038413121
Password file: +DATA/RAC/PASSWORD/pwdrac.262.1038412435
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: FRA,DATA
Mount point paths:
Services: staf
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances: RAC2_1,rac_2
Configured nodes: srv1,srv2
Database is administrator managed
- Check clusterware status
oracle@srv2:~> crsctl status resource -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRS.dg
ONLINE ONLINE srv1 STABLE
ONLINE ONLINE srv2 STABLE
ora.DATA.dg
ONLINE ONLINE srv1 STABLE
ONLINE ONLINE srv2 STABLE
ora.FRA.dg
ONLINE ONLINE srv1 STABLE
ONLINE ONLINE srv2 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE srv1 STABLE
ONLINE ONLINE srv2 STABLE
ora.asm
ONLINE ONLINE srv1 Started,STABLE
ONLINE ONLINE srv2 Started,STABLE
ora.net1.network
ONLINE ONLINE srv1 STABLE
ONLINE ONLINE srv2 STABLE
ora.ons
ONLINE ONLINE srv1 STABLE
ONLINE ONLINE srv2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE srv1 STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE srv2 STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE srv2 STABLE
ora.MGMTLSNR
1 ONLINE ONLINE srv1 169.254.52.81 192.16
8.10.1,STABLE
ora.cvu
1 ONLINE ONLINE srv2 STABLE
ora.mgmtdb
1 ONLINE ONLINE srv1 Open,STABLE
ora.oc4j
1 ONLINE ONLINE srv2 STABLE
ora.rac.db
1 ONLINE ONLINE srv1 Open,STABLE
2 ONLINE ONLINE srv2 Open,STABLE
ora.rac.staf.svc
1 ONLINE ONLINE srv1 STABLE
ora.scan1.vip
1 ONLINE ONLINE srv1 STABLE
ora.scan2.vip
1 ONLINE ONLINE srv2 STABLE
ora.scan3.vip
1 ONLINE ONLINE srv2 STABLE
ora.srv1.vip
1 ONLINE ONLINE srv1 STABLE
ora.srv2.vip
1 ONLINE ONLINE srv2 STABLE
--------------------------------------------------------------------------------
oracle@srv2:~>
No comments:
Post a Comment