1 – Verificar serviços usados atualmente.
SQL> select inst_id,name from gv$services order by inst_id,name;
INST_ID NAME
---------- ------------------------------
1 SME
1 SMP
1 SYS$BACKGROUND
1 SYS$USERS
1 smc
1 smg
1 smge
2 SME
2 SMP
2 SYS$BACKGROUND
2 SYS$USERS
2 smc
2 smg
2 smge
SQL2 – Verificar status do banco.
[grid@srv-01 ~]$ srvctl status database -d prod
Instance prod_1 is running on node srv-01
Instance prod_2 is running on node srv-02
ShellScript3 – Adicionar o service.
# srvctl add service -d db_name -s service_name -r pref_insts
[oracle@srv-01 ~]$ srvctl add service -d prod -s smuc1 -r prod_1,prod_2
[oracle@srv-01 ~]$ srvctl add service -d prod -s smso -r prod_1,prod_2
ShellScript4 – Iniciar serviços criados.
[grid@srv-01 ~]$ srvctl start service -s smuc1 -d prod
[grid@srv-01 ~]$ srvctl start service -s smso -d prod
ShellScript5 – Verificar serviços adicionados.
[grid@srv-01 ~]$ srvctl status service -d prod
Service smc is running on instance(s) prod_1,prod_2
Service sme is running on instance(s) prod_1,prod_2
Service smg is running on instance(s) prod_1,prod_2
Service smge is running on instance(s) prod_1,prod_2
Service smp is running on instance(s) prod_1,prod_2
Service smso is running on instance(s) prod_1,prod_2 <======================= Novo serviço
Service smuc1 is running on instance(s) prod_1,prod_2 <======================= Novo serviço
ShellScript6- Status dos serviços
[grid@srv-01 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRS.dg
ONLINE ONLINE srv-01 STABLE
ONLINE ONLINE srv-02 STABLE
ora.DATA.dg
ONLINE ONLINE srv-01 STABLE
ONLINE ONLINE srv-02 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE srv-01 STABLE
ONLINE ONLINE srv-02 STABLE
ora.RECO.dg
ONLINE ONLINE srv-01 STABLE
ONLINE ONLINE srv-02 STABLE
ora.asm
ONLINE ONLINE srv-01 Started,STABLE
ONLINE ONLINE srv-02 Started,STABLE
ora.net1.network
ONLINE ONLINE srv-01 STABLE
ONLINE ONLINE srv-02 STABLE
ora.ons
ONLINE ONLINE srv-01 STABLE
ONLINE ONLINE srv-02 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE srv-02 STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE srv-01 STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE srv-01 STABLE
ora.MGMTLSNR
1 ONLINE ONLINE srv-01 STABLE
ora.cvu
1 ONLINE ONLINE srv-01 STABLE
ora.prod.db
1 ONLINE ONLINE srv-01 Open,STABLE
2 ONLINE ONLINE srv-02 Open,STABLE
ora.prod.smc.svc
1 ONLINE ONLINE srv-01 STABLE
2 ONLINE ONLINE srv-02 STABLE
ora.prod.sme.svc
1 ONLINE ONLINE srv-02 STABLE
2 ONLINE ONLINE srv-01 STABLE
ora.prod.smg.svc
1 ONLINE ONLINE srv-01 STABLE
2 ONLINE ONLINE srv-02 STABLE
ora.prod.smge.svc
1 ONLINE ONLINE srv-01 STABLE
2 ONLINE ONLINE srv-02 STABLE
ora.prod.smp.svc
1 ONLINE ONLINE srv-01 STABLE
2 ONLINE ONLINE srv-02 STABLE
ora.prod.smso.svc <======================= Novo serviço
1 ONLINE ONLINE srv-01 STABLE <======================= Novo serviço
2 ONLINE ONLINE srv-02 STABLE <======================= Novo serviço
ora.prod.smuc1.svc <======================= Novo serviço
1 ONLINE ONLINE srv-01 STABLE <======================= Novo serviço
2 ONLINE ONLINE srv-02 STABLE <======================= Novo serviço
ora.prod.svc_prod.svc
1 ONLINE ONLINE srv-01 STABLE
2 ONLINE ONLINE srv-02 STABLE
ora.mgmtdb
1 ONLINE ONLINE srv-01 Open,STABLE
ora.oc4j
1 ONLINE ONLINE srv-01 STABLE
ora.scan1.vip
1 ONLINE ONLINE srv-02 STABLE
ora.scan2.vip
1 ONLINE ONLINE srv-01 STABLE
ora.scan3.vip
1 ONLINE ONLINE srv-01 STABLE
ora.srv-01.vip
1 ONLINE ONLINE srv-01 STABLE
ora.srv-02.vip
1 ONLINE ONLINE srv-02 STABLE
--------------------------------------------------------------------------------
ShellScriptSQL> select inst_id,name from gv$services order by inst_id,name;
INST_ID NAME
---------- ------------------------------
1 smso <======================= Novo serviço
1 smuc1 <======================= Novo serviço
2 smso <======================= Novo serviço
2 smuc1 <======================= Novo serviço
SQL