Srvctl add service in Oracle 11g

The *srvctl add service* adds a database service to the Oracle Restart configuration. Creates the database service if it does not exist. This method of creating a service is preferred over using the DBMS_SERVICE PL/SQL package.

11.1 Add srvctl add service -d db_unique_name -s service_name -r preferred_list [-a available_list] [-P TAF_policy]

The TAF policy (NONE, BASIC, or PRECONNECT). If you choose PRECONNECT, it creates a service_Preconnect.

Update srvctl add service -d db_unique_name -s service_name -u [-r new_preferred_inst | -a new_available_inst]

Reference: http://docs.oracle.com/cd/B28359_01/rac.111/b28254/srvctladmin.htm#i1008562

Sample: srvctl add service -d PMDW -s PMDW_APEX -r PMDW3 -a PMDW1,PMDW2 -P BASIC

begin dbms_service.modify_service (    SERVICE_NAME => 'PMDW_APEX',     GOAL => DBMS_SERVICE.GOAL_SERVICE_TIME,     aq_ha_notifications => TRUE,     FAILOVER_METHOD => 'BASIC',     FAILOVER_TYPE => 'SELECT',     FAILOVER_RETRIES => 20,     FAILOVER_DELAY => 15,     CLB_GOAL => DBMS_SERVICE.CLB_GOAL_SHORT ); end; /

srvctl add service -d PMDW -s PMDW_APEX -u -r PMDW3 -a PMDW1,PMDW2

11.2 srvctl add service -d db_unique_name -s service_name [-l [PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]] [-y {AUTOMATIC | MANUAL}] [-e {NONE | SESSION | SELECT}] [-m {NONE | BASIC}] [-w integer] [-z integer] [-j {SHORT | LONG}] [-B {SERVICE_TIME | THROUGHPUT | NONE}] [-q {TRUE | FALSE}] -t edition_name

http://docs.oracle.com/cd/E11882_01/server.112/e25494/restart005.htm#i1008562

srvctl add service -d PMDW -s PMDW_APEX -r PMDW1 -a PMDW2,PMDW3 -e SELECT -m BASIC -z 20 -w 15 -j SHORT -B SERVICE_TIME

srvctl start service -d PMDW -s PMDW_APEX

SELECT * FROM dba_services;