Friday, March 6, 2015

Online Relocation on Policy Manage Database on RAC OneNode Database



RAC One Node
Database Online Relocation on Policy Manage Database


1.       Check  instance is running on which node


[oracle@rac112 ~]$ ps -ef | grep pmon
oracle    5504     1  0 18:11 ?        00:00:04 asm_pmon_+ASM1
oracle    6383     1  0 18:22 ?        00:00:05 ora_pmon_orcl_1

2. Verify the configuration and status of RAC One Node database:

[oracle@rac113 dbs]$ srvctl status database -d orcl
Instance orcl_1 is running on node rac112
Online relocation: INACTIVE

[oracle@rac113 dbs]$ crsctl stat res -t
---------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
---------------------------------------------------------------------------
Local Resources
-------------------------------------------
ora.CCBDATA.dg
               ONLINE  ONLINE       rac112
               ONLINE  ONLINE       rac113
ora.DG_VOTE_NEW.dg
               ONLINE  ONLINE       rac112
               ONLINE  ONLINE       rac113
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac112
               ONLINE  ONLINE       rac113
ora.asm
               ONLINE  ONLINE       rac112
               ONLINE  ONLINE       rac113
ora.gsd
               OFFLINE OFFLINE      rac112
               OFFLINE OFFLINE      rac113
ora.net1.network
               ONLINE  ONLINE       rac112
               ONLINE  ONLINE       rac113
ora.ons
               ONLINE  ONLINE       rac112
               ONLINE  ONLINE       rac113
-------------------------------------------
Cluster Resources
-------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac112
ora.cvu
      1        ONLINE  ONLINE       rac112
ora.oc4j
      1        ONLINE  ONLINE       rac113
ora.orcl.db
      1        ONLINE  ONLINE       rac112
ora.orcl.orcl_s.svc
      1        ONLINE  ONLINE       rac112
ora.rac112.vip
      1        ONLINE  ONLINE       rac112
ora.rac113.vip
      1        ONLINE  ONLINE       rac113
ora.scan1.vip
      1        ONLINE  ONLINE       rac112


[oracle@rac113 dbs]$ srvctl config srvpool
Server pool name: Free
Importance: 0, Min: 0, Max: -1
Candidate server names:
Server pool name: Generic
Importance: 0, Min: 0, Max: -1
Candidate server names:
Server pool name: orcls
Importance: 999, Min: 1, Max: 3
Candidate server names:


[oracle@rac113 dbs]$ srvctl status database -d orcl
Instance orcl_1 is running on node rac112
Online relocation: INACTIVE

Database is running on Node : rac112

[oracle@rac112 ~]$ srvctl relocate database -d orcl -n rac113

PRCD-1222 : Online relocation of database "orcl" failed but database was restored to its original state
PRCR-1114 : Failed to relocate servers rac113 into server pool ora.orcls
CRS-2598: Server pool 'ora.orcls' is already at its maximum size of '1'

The reason which I got error while relocating database as I had configured max server to 1.  To get rid off I have to modify the upper limit in server pool (orcls).


[oracle@rac112 ~]$ srvctl modify srvpool -g orcls -l 1 -u 3 -i 999

oracle@rac112 ~]$ srvctl config srvpool
Server pool name: Free
Importance: 0, Min: 0, Max: -1
Candidate server names:
Server pool name: Generic
Importance: 0, Min: 0, Max: -1
Candidate server names:
Server pool name: orcls
Importance: 999, Min: 1, Max: 3
Candidate server names:


3. Online database relocation:

[oracle@rac112 ~]$ srvctl relocate database -d orcl -n rac113

srvctl relocate database -d orcl -n rac113 -v
Configuration updated to two instances
Instance orcl_2 started
Services relocated
Waiting for up to 30 minutes for instance orcl_1 to stop ...
Instance orcl_1 stopped
Configuration updated to one instance

4. Verify database status:


[oracle@rac113 dbs]$ srvctl status database -d orcl
Instance orcl_2 is running on node rac113
Online relocation: INACTIVE
  
[oracle@rac113 dbs]$ srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +CCBDATA/orcl/spfileorcl.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcls
Database instances:
Disk Groups: CCBDATA
Mount point paths:
Services: orcl_s
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: orcl
Candidate servers:
Database is policy managed


[oracle@rac112 ~]$ srvctl status service -d orcl -s orcl_s
Service orcl_s is running on nodes: rac113


Hope this will help… J


No comments:

Post a Comment