In the previous article we have configured Oracle 12cR1 One Node RAC. Whereas here let us do some playful activities using the configured environment.Description:-
As I said already we have Oracle 12cR1 One Node RAC database configured in Nodes prodrac101 & prodrac102. Due to OS maintenance activity, we are in need to stop the oracle services in Node 1 and relocate them to Node 2 to reduce the downtime of the database and make sure the business continuity.
Let’s start the demo
Below is the database configuration output.
$ srvctl config database -d ORCL Database unique name: ORCL Database name: ORCL Oracle home: /oradb/app/oracle/product/12.1.0.2/db_1 Oracle user: oracle Spfile: +DBWR_DATA/ORCL/PARAMETERFILE/spfile.278.985981865 Password file: +DBWR_DATA/ORCL/PASSWORD/pwdorcl.276.985981257 Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: ORCLPOOL Disk Groups: DBWR_FRA,DBWR_DATA Mount point paths: Services: ORCL.oracledbwr.com Type: RACOneNode Online relocation timeout: 30 Instance name prefix: ORCL Candidate servers: OSDBA group: dba OSOPER group: oper Database instances: Database is policy managed
Note-down the serverpool name of the database is configured. Let us verify the instance is running on which node.
$ srvctl status database -d ORCL Instance ORCL_1 is running on node prodrac101 Online relocation: INACTIVE
From the above output we can see that the instance is running in the first node. So, we will relocate the instance from Node 1(prodrac101) to Node 2(prodrac102).
Before we start the relocate process make sure the serverpool’s are configured properly. Say for example, below is configuration of serverpool in our environment.
$ srvctl config srvpool Server pool name: Free Importance: 0, Min: 0, Max: -1 Category: Candidate server names: Server pool name: Generic Importance: 0, Min: 0, Max: -1 Category: Candidate server names: Server pool name: ORCLPOOL Importance: 0, Min: 0, Max: 1 Category: hub Candidate server names:
As we already know that our instance is running under “ORCLPOOL” serverpool from database configuration. In the above output we can see that the Max value of the serverpool is 1 and we need to change it value, otherwise the relocation process will get failed as below.
$ srvctl relocate database -d ORCL -n prodrac102 -w 5 -v Online relocation failed, rolling back to original state PRCD-1222 : Online relocation of database "ORCL" failed but database was restored to its original state PRCR-1114 : Failed to relocate servers prodrac102 into server pool ora.ORCLPOOL CRS-2598: Server pool 'ora.ORCLPOOL' is already at its maximum size of '1'
In order to avoid the above error, we need to increase the max value of the serverpool as below.
$ srvctl modify srvpool -g ORCLPOOL -l 1 -u 3 -i 999
Once the max value is increased, verify the configuration now.
$ srvctl config srvpool Server pool name: Free Importance: 0, Min: 0, Max: -1 Category: Candidate server names: Server pool name: Generic Importance: 0, Min: 0, Max: -1 Category: Candidate server names: Server pool name: ORCLPOOL Importance: 999, Min: 1, Max: 3 Category: hub Candidate server names:
Now, we can start the relocation process.
$ srvctl relocate database -d ORCL -n prodrac102 -w 5 -v Configuration updated to two instances Instance ORCL_2 started Services relocated Waiting for up to 5 minutes for instance ORCL_1 to stop ... Instance ORCL_1 stopped Configuration updated to one instance
Now, verify the database configuration and on which node the instance is running.
$ srvctl config database -d ORCL Database unique name: ORCL Database name: ORCL Oracle home: /oradb/app/oracle/product/12.1.0.2/db_1 Oracle user: oracle Spfile: +DBWR_DATA/ORCL/PARAMETERFILE/spfile.278.985981865 Password file: +DBWR_DATA/ORCL/PASSWORD/pwdorcl.276.985981257 Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: ORCLPOOL Disk Groups: DBWR_FRA,DBWR_DATA Mount point paths: Services: ORCL.oracledbwr.com Type: RACOneNode Online relocation timeout: 30 Instance name prefix: ORCL Candidate servers: OSDBA group: dba OSOPER group: oper Database instances: Database is policy managed
$ srvctl status database -d ORCL Instance ORCL_2 is running on node prodrac102 Online relocation: INACTIVE
Now, we are sure that the instance has been relocated from Node 1 (prodrac101) to Node 2 (prodrac102).
Catch Me On:- Hariprasath Rajaram
Telegram:https://t.me/joinchat/I_f4DhGF_Zifr9YZvvMkRg
LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter: https://twitter.com/hariprasathdba