Sunday, July 17, 2011

Oracle 11g Release 2: SRVCTL commands PART 1 [Database]

SRVCTL commands

Check the Current Version of SRVCTL utility
  • srvctl -V 

For Database:

To Add Database
  • srvctl add database -d bhavik_test -o /db/oracle/app/oracle/product/11.2/
To Remove Database
  • srvctl remove database -d bhavik_test
To Start Database with different option
  • srvctl start database -d bhavik_test -o nomount
  • srvctl start database -d bhavik_test -o mount
  • srvctl start db -d bhavik_test
  • srvctl start database -d bhavik_test -o open
To Stop Database with different option
  • srvctl stop database -d bhavik_test -o transactional
  • srvctl stop database -d bhavik_test -o immediate
  • srvctl stop database -d bhavik_test -o abort
  • srvctl stop db -d bhavik_test -o immediate
To check the status of the database
  • srvctl status database -d bhavik_test -v service_name
  • srvctl status database -d bhavik_test
To enable and disable database 
  • srvctl enable database -d bhavik_test
  • srvctl disable db -d bhavik_test

To configure databasee option
  • srvctl config database -d bhavik_test
To modify database settings
  • srvctl modify database -d bhavik_test -r logical_standby
  • srvctl modify db -d bhavik_test -p /db/oracle/oradata/bhavik_test/spfilebhavik_test.ora -- moves p file
  • srvctl modify database –d bhavik_test –o /db/oracle/app/oracle/product/11.2/ –s open
To get/set/unset the environment settings 
  • srvctl getenv database -d bhavik_test
  • srvctl setenv database –d bhavik_test –t “TNS_ADMIN=/db/oracle/app/oracle/product/11.2/asm/network/admin”
  • srvctl setenv db -d bhavik_test -t LANG=en
  • srvctl unsetenv database -d bhavik_test -t CLASSPATH
Hope my post will help you and just keep watching there is some more options related to instance, service, etc will be coming soon in part 2

No comments:

Post a Comment

How can I remove a URL on my website from the Google Index?

To remove a specific URL (for example, the page of your own website from Google’s index, there are two ...