Disclaimer

Wednesday 22 September 2021

adding Service in RAC

 

[oracle@rac3 ~]$ ps -ef | grep smon

grid      23492      1  0 Sep21 ?        00:00:00 asm_smon_+ASM1

root      23550      1  1 Sep21 ?        00:09:48 /u02/app/12.2.0/grid/bin/osysmond.bin

oracle    27678      1  0 11:39 ?        00:00:00 ora_smon_ORCL11

oracle    33464   8499  0 12:19 pts/0    00:00:00 grep --color=auto smon

Note : You can run below command to find the service, please check highlighted by yellow color 

[oracle@rac3 ~]$ srvctl config database -db ORCL
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/12.2.0.1/db_1
Oracle user: oracle
Spfile: +DATA/ORCL/PARAMETERFILE/spfile.278.1032138917
Password file: +DATA/ORCL/PASSWORD/pwdorcl.275.1083900573
Domain: samik.com
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA,ARCH
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oinstall
Database instances: ORCL11,ORCL12
Configured nodes: rac3,rac4
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed

Note: If service is not configured then you won't get any output from below SRVCTL command

[oracle@rac3 ~]$
[oracle@rac3 ~]$ srvctl status service -d ORCL
[oracle@rac3 ~]$





Add the service using below command

[oracle@rac3 ~]$
[oracle@rac3 ~]$ srvctl add service -s SRV_GOLD -d ORCL -r ORCL11,ORCL12
[oracle@rac3 ~]$


Check the status of the service

[oracle@rac3 ~]$ srvctl status service -d ORCL -s SRV_GOLD
Service SRV_GOLD is not running.
[oracle@rac3 ~]$
[oracle@rac3 ~]$



Crosscheck the service configuration 

[oracle@rac3 ~]$
[oracle@rac3 ~]$ srvctl config service -s SRV_GOLD -d ORCL
Service name: SRV_GOLD
Server pool:
Cardinality: 2
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Global: false
Commit Outcome: false
Failover type:
Failover method:
TAF failover retries:
TAF failover delay:
Failover restore: NONE
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Edition:
Pluggable database name:
Maximum lag time: ANY
SQL Translation Profile:
Retention: 86400 seconds
Replay Initiation Time: 300 seconds
Drain timeout:
Stop option:
Session State Consistency: DYNAMIC
GSM Flags: 0
Service is enabled
Preferred instances: ORCL11,ORCL12
Available instances:
CSS critical: no

Now we are starting service and check the status 

[oracle@rac3 ~]$
[oracle@rac3 ~]$ srvctl start service -d ORCL -s SRV_GOLD
[oracle@rac3 ~]$


[oracle@rac3 ~]$ srvctl status service -d ORCL -s SRV_GOLD
Service SRV_GOLD is running on instance(s) ORCL11,ORCL12





No comments:

Post a Comment

100 Oracle DBA Interview Questions and Answers

  Here are 100 tricky interview questions tailored for a Senior Oracle DBA role. These questions span a wide range of topics, including perf...