RAC Services – Command List

Key

-d Database Name
-i Instance Name
-s Service Name
-n Node Name
-r Preferred list
-a Available list
-p TAF (Transparent application failover policy)
-v Verbose

Full command list available here

### Check status of database and list services:

srvctl status database -d DB1 -v
select * from gv$active_services

DBA_SERVICES
ALL_SERVICES or V$SERVICES
V$ACTIVE_SERVICES
V$SERVICE_STATS
V$SERVICE_EVENTS
V$SERVICE_WAIT_CLASSES
V$SERV_MOD_ACT_STATS
V$SERVICE_METRICS
V$SERVICE_METRICS_HISTORY

### Setting services Dynamically:

alter system set service_names='DB4,DB5';

### Setting services Manually in pfile or spfile:

*.service_names='DB5_ONLINE,DB4_OFFLINE'

### Check which nodes are preferred or available for a service:

srvctl config service -d DB1 -s DB1_UK_REDDOT

### Checking status:

srvctl status service -d DB2 -s DBS_UK_PROPAGATE_SEARCH_CACHE_SERVICE3

### Showing config of all services:

srvctl config service -d DB2 -a

### Changing/setting preferred and available:

srvctl modify service -d DB2 -s DB2_UK_SEARCH -n -i DB21 DB22 DB23 -a DB24
srvctl modify service -d db_unique_name -s service_name -n -i pref_inst_list [-a avail_inst_list] [-f]

### Changing an available instance to a preferred:

srvctl modify service -d DB2 -s DB2_UK_SEARCH -i DB21 -r

### Moving a service member from one instance to another (move and change configuration):

srvctl modify service -d DB2 -s DB2_UK_SEARCH -i DB21 -t DB22

### Relocate service (not changing configuration):

srvctl relocate service -d DB2 -s DB2_OPERATIONS_SERVICE -i DB21 -t DB23

### Enabling service:

srvctl enable service -d DB2 -s DBS_UK_PROPAGATE_SEARCH_CACHE_SERVICE3

### Disabling service:

srvctl disable service -d DB2 -s DBS_UK_PROPAGATE_SEARCH_CACHE_SERVICE3

### Start service:

srvctl start service -d DB2 -i DB21 -s DBS_UK_PROPAGATE_SEARCH_CACHE_SERVICE3

### Stop service:

srvctl stop service -d DB2 -i DB21 -s DBS_UK_PROPAGATE_SEARCH_CACHE_SERVICE3

### Remove Service:

srvctl remove service -d DB2 -s DB2_UK_SEARCH -i DB25

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: