Subscribe to Posts by Email

Subscriber Count

    701

Disclaimer

All information is offered in good faith and in the hope that it may be of use for educational purpose and for Database community purpose, but is not guaranteed to be correct, up to date or suitable for any particular purpose. db.geeksinsight.com accepts no liability in respect of this information or its use. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content and if notify any such I am happy to remove. Product and company names mentioned in this website may be the trademarks of their respective owners and published here for informational purpose only. This is my personal blog. The views expressed on these pages are mine and learnt from other blogs and bloggers and to enhance and support the DBA community and this web blog does not represent the thoughts, intentions, plans or strategies of my current employer nor the Oracle and its affiliates or any other companies. And this website does not offer or take profit for providing these content and this is purely non-profit and for educational purpose only. If you see any issues with Content and copy write issues, I am happy to remove if you notify me. Contact Geek DBA Team, via geeksinsights@gmail.com

Pages

SRVCTL Command : For Service

Want to know new features in 12c, 18c, 19c, 20c ??? Follow this

http://db.geeksinsight.com/category/12c-database/

http://db.geeksinsight.com/category/18c-database/

http://db.geeksinsight.com/category/19c-database/

http://db.geeksinsight.com/category/20c-database/

Happy Learning

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