################################################################
# M A N A G E   O R A C L E  R A C   D A T A B A S E   U S I N G   SRVCLT
################################################################


#########################
# Display the Current Policy
#########################

--The following command display the current status of the database
srvctl config database -d <db_name>  -a

##################################
# Change the Current Policy to Another Policy
##################################

--Use the following SRVCTL command to change the policy
srvctl modify database -d <db_name>  -y policy_name


################################################################
# Other SRVCTL and SERVICES Management
################################################################

##Ho to obtain the Statuses of Services with SRVCTL
--The following command returns the status of the service running on the database:
srvctl status service -d <db_name> -s <service_name>


##How to Start and Stop Services with SRVCTL
--Enter the following SRVCTL syntax from the command line:
srvctl start service -d database_unique_name [-s service_name_list] [-i inst_name]
[-o start_options]
srvctl stop service -d database_unique_name -s service_name_list [-i inst_name]
[-o start_options]


### Remove and Add Database and Instance to the CRS
srvctl remove database -d <db_name>
srvctl add database -d <db_name>  -o $ORACLE_HOME
srvctl add instance -d <db_name>  -i <instance_name> -n <hostname>

##Add service to a database with preferred instance  RAC01
srvctl add service -d <db_name>  -s <service_name> -r RAC1 -a RAC2, RAC3


##Enabling and Disabling Services with SRVCTL
--Use the following SRVCTL syntax from the command line to enable and disable services:
srvctl enable service -d <db_name>  -s <service_name>  [-i inst_name]
srvctl disable service -d <db_name>  -s <service_name>  [-i inst_name]


## How to relocate service from instance 1 to instance 3:
srvctl relocate service -d <db_name>  -s <service_name> -i instance1 -t instace3

--Stop/Sart Listener
 srvctl stop listener -n <hostname>  [-l listener_name]
 
 --Stop/Start Instance
 srvctl start instance -d <db_name>  -i <instance_name>
 
 

 

   
 
  Site Map