Subscriber Count

    448

Subscribe2

Pages

Contact for Online learnings
* indicates required field
Thanks for the inquiry. You will be receiving a mail shortly with course details. If not please check the spam folder once and mark our mail as not a spam.

SRVCTL Command : For Service

SRVCTL for Service:

10g
To add a service

	Command: srvctl add service -d db_name -s service_name -r pref_insts [-a avail_insts] [-P TAF_policy]
	Command: srvctl add service -d db_name -s service_name -u {-r "new_pref_inst" | -a "new_avail_inst"}
	Example: srvctl add service -d RAC -s PRD -r RAC01,RAC02 -a RAC03,RAC04
	Example: srvctl add serv -d CRM -s CRM -r CRM1 -a CRM3 -P basic

To remove a service

	Command: srvctl remove service -d db_name -s service_name [-i inst_name] [-f]
	Example: srvctl remove serv -d rac -s sales
	Example: srvctl remove service -d rac -s sales -i rac01,rac02

To start a service

	Command: srvctl start service -d db_name [-s service_names [-i inst_name]] [-o start_options]
	Command: srvctl start service -d db_name -s service_names [-o open]
	Command: srvctl start service -d db_name -s service_names -o nomount
	srvctl start service -d db_name -s service_names -o mount
	srvctl start serv -d dwh -s dwh

To stop a service

	Command: srvctl stop service -d db_name [-s service_names [-i inst_name]] [-f]
	srvctl stop serv -d dwh -s dwh

To view the status of Service

	Command: srvctl status service -d db_name [-s service_names] [-f] [-v] [-S level]
	srvctl status service -d rac -s rac

TO enable the service at cluster startup

	Command: srvctl enable service -d db_name -s service_names [-i inst_name]
	srvctl enable service -d apps -s apps1

To disable the service at cluster startup

	Command: srvctl disable service -d db_name -s service_names [-i inst_name]
	Example: srvctl disable serv -d rac -s rac -i rac1

To view the config service

	Command: srvctl config service -d db_name [-s service_name] [-a] [-S level]
	Command: srvctl config service -d db_name -a -- -a shows TAF configuration
	Example: srvctl config service -d TEST -s test PREF:TST1 AVAIL:TST2

To modify the service

	Command: srvctl modify service -d db_name -s service_name -i old_inst_name -t new_inst_name [-f]
	Command: srvctl modify service -d db_name -s service_name -i avail_inst_name -r [-f]
	Command: srvctl modify service -d db_name -s service_name -n -i preferred_list [-a available_list] [-f]
	Command: srvctl modify service -d db_name -s service_name -i old_inst_name -a avail_inst -P TAF_policy
	Example: srvctl modify serv -d PROD -s DWH -n -i I1,I2,I3,I4 -a I5,I6

To relocate service

	Command: srvctl relocate service -d db_name -s service_name -i old_inst_name -t target_inst [-f]

To Get/set the environment for Service

	Command: srvctl getenv service -d db_name -s service_name -t name_list
	Command: srvctl setenv service -d db_name [-s service_name] {-t "name=val[,name=val,...]" | -T "name=val"}
	Command: srvctl unsetenv service -d db_name -s service_name -t name_list

11gR2

	Command: srvctl add service -d db_unique_name -s service_name
	-g server_pool [-c {UNIFORM|SINGLETON}] [-k network_number]
	[-l [PRIMARY|PHYSICAL_STANDBY|LOGICAL_STANDBY|SNAPSHOT_STANDBY]
	[-y {AUTOMATIC|MANUAL}] [-q {TRUE|FALSE}] [-j {SHORT|LONG}]
	[-B {NONE|SERVICE_TIME|THROUGHPUT}] [-e {NONE|SESSION|SELECT}]
	[-m {NONE|BASIC}] [-P {BASIC|NONE|PRECONNECT}] [-x {TRUE|FALSE}]
	[-z failover_retries] [-w failover_delay]

To add service with service goals
Example: srvctl add service -d rac -s rac1 -q TRUE -m BASIC -e SELECT -z 180 -w 5 -j LONG

To add service wih preconnect taf

	Command: srvctl add service -d db_unique_name -s service_name -u {-r preferred_list | -a available_list}
	Example: srvctl add serv -d rac -s report -r rac01,rac02 -a rac03 -P PRECONNECT

To start service

	Command: srvctl start service -d db_unique_name [-s "service_name_list" [-n node_name | -i instance_name]] [-o start_options]
	Example: srvctl start serv -d rac -s rac
	Example: srvctl start service -d rac -s rac -i rac2

To stop service

	srvctl stop service -d db_unique_name [-s "service_name_list"] [-n node_name | -i instance_name] [-f]
	srvctl stop service -d rac -s rac
	srvctl stop serv -d rac -s rac -i rac2

To view service

	srvctl status service -d db_unique_name [-s "service_name_list"] [-f] [-v]
	srvctl status service -d rac -s rac -v

To modify the service

	Command: srvctl modify service -d db_unique_name -s service_name
	[-c {UNIFORM|SINGLETON}] [-P {BASIC|PRECONNECT|NONE}]
	[-l {[PRIMARY]|[PHYSICAL_STANDBY]|[LOGICAL_STANDBY]|[SNAPSHOT_STANDBY]} [-q {TRUE|FALSE}] [-x {TRUE|FALSE}] [-j {SHORT|LONG}] [-B {NONE|SERVICE_TIME|THROUGHPUT}] [-e {NONE|SESSION|SELECT}] [-m {NONE|BASIC}] [-z failover_retries] [-w failover_delay] [-y {AUTOMATIC|MANUAL}]

	Command: srvctl modify service -d db_unique_name -s service_name -i old_instance_name -t new_instance_name [-f]
	Command: srvctl modify service -d db_unique_name -s service_name -i avail_inst_name -r [-f]
	Command: srvctl modify service -d db_unique_name -s service_name -n -i preferred_list [-a available_list] [-f]

	Example: srvctl modify service -d rac -s rac -i rac1 -t rac2
	Example: srvctl modify serv -d rac -s rac -i rac1 -r
	Example: srvctl modify service -d rac -s rac -n -i rac1 -a rac2

To relocate the service

	Command: srvctl relocate service -d db_unique_name -s service_name {-c source_node -n target_node|-i old_instance_name -t new_instance_name} [-f]
	Example: srvctl relocate service -d rac -s rac -i rac1 -t rac3