Table of Contents
Overview and Prerequisites
- GI must be configured and cluster stack should be up on all nodes
- RAC One Node or RAC binaries must be installed across cluster nodes
- ASM instance should be up and running
- ASM DG should mounted and provide space to install the database
Setup RAC One Note ( 12c )
As Oracle user invoke dbca --> Advanced mode --> Oracle ONE Node database --> Admin-Managed --> Select cluster Nodes : gract1,grat2 Resources status and database status ***** Cluster Resources: ***** Resource NAME INST TARGET STATE SERVER STATE_DETAILS --------------------------- ---- ------------ ------------ --------------- ----------------------------------------- ora.rac1node.db 1 ONLINE ONLINE gract1 Open,STABLE ora.rac1node.rac1node_svc.svc 1 ONLINE ONLINE gract1 STABLE [root@gract1 Desktop]# srvctl status database -d rac1node Instance rac1node_1 is running on node gract1 Online relocation: INACTIVE [oracle@gract1 ~]$ srvctl config database -d rac1node Database unique name: rac1node Database name: rac1node Oracle home: /u01/app/oracle/product/12102/racdb Oracle user: oracle Spfile: +DATA/RAC1NODE/PARAMETERFILE/spfile.293.856004093 Password file: +DATA/RAC1NODE/PASSWORD/pwdrac1node.298.856002671 Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: Disk Groups: DATA Mount point paths: Services: rac1node_svc Type: RACOneNode Online relocation timeout: 30 Instance name prefix: rac1node Candidate servers: gract1,gract2 OSDBA group: dba OSOPER group: oper Database instances: Database is administrator managed --> Type: RACOneNode means we have RAC One Node database
Relocate RAC One Node database
# srvctl relocate database -d rac1node -v -n gract2 Configuration updated to two instances Instance rac1node_2 started Services relocated Waiting for up to 30 minutes for instance rac1node_1 to stop ... Instance rac1node_1 stopped Configuration updated to one instance Resource NAME INST TARGET STATE SERVER STATE_DETAILS --------------------------- ---- ------------ ------------ --------------- ----------------------------------------- ora.rac1node.db 2 ONLINE ONLINE gract2 Open,STABLE ora.rac1node.rac1node_svc.svc 1 ONLINE ONLINE gract2 STABLE
Scaling up RAC ONE NODE to Standard RAC
Convert RAC One Node to a RAC database [oracle@gract1 ~]$ srvctl convert database -d rac1node -c RAC [oracle@gract1 ~]$ srvctl config database -d rac1node Database unique name: rac1node Database name: rac1node Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: Disk Groups: DATA Mount point paths: Services: rac1node_svc Type: RAC Database instances: rac1node_2 [oracle@gract1 ~]$ srvctl status database -d rac1node Instance rac1node_2 is running on node gract2 Add and start instance [oracle@gract1 ~]$ srvctl add instance -d rac1node -i rac1node_1 -n gract1 [oracle@gract1 ~]$ srvctl start instance -d rac1node -i rac1node_1 [oracle@gract1 ~]$ srvctl status database -d rac1node Instance rac1node_1 is running on node gract1 Instance rac1node_2 is running on node gract2 ***** Cluster Resources: ***** Resource NAME INST TARGET STATE SERVER STATE_DETAILS --------------------------- ---- ------------ ------------ --------------- ----------------------------------------- ora.rac1node.db 1 ONLINE ONLINE gract1 Open,STABLE ora.rac1node.db 2 ONLINE ONLINE gract2 Open,STABLE ora.rac1node.rac1node_svc.svc 1 ONLINE ONLINE gract2 STABLE
Scaling Down to RAC One Node
Stop and remove instance [oracle@gract1 ~]$ srvctl stop instance -d rac1node -i rac1node_2 -f [oracle@gract1 ~]$ srvctl remove instance -d rac1node -i rac1node_2 Remove instance from the database rac1node? (y/[n]) y PRKO-3147 : Instance rac1node_2 cannot be removed because it is the only preferred instance for service(s) rac1node_svc for database rac1node [oracle@gract1 ~]$ srvctl remove service -d rac1node -s rac1node_svc [oracle@gract1 ~]$ srvctl remove instance -d rac1node -i rac1node_2 Remove instance from the database rac1node? (y/[n]) y [oracle@gract1 ~]$ srvctl convert database -d rac1node -c RACONENODE -i rac1node_1 PRCD-1242 : Unable to convert RAC database rac1node to RAC One Node database because the database had no service added --> It is mandatory to have at-least one service active for given instance before you convert it into RACONENODE mode, else you will get error. [oracle@gract1 ~]$ srvctl add service -d rac1node -s rac1node_svc -r rac1node_1 [oracle@gract1 ~]$ srvctl convert database -d rac1node -c RACONENODE -i rac1node_1 Verify db status [oracle@gract1 ~]$ srvctl config database -d rac1node Database unique name: rac1node Database name: rac1node ... Services: rac1node_svc Type: RACOneNode Online relocation timeout: 30 Instance name prefix: rac1node [oracle@gract1 ~]$ srvctl status database -d rac1node Instance rac1node_1 is running on node gract1 Online relocation: INACTIVE