srvctl stop listener: command syntax and example
Stops the specified Listener or Listeners.
Syntax:
srvctl stop listener -n node_name [-l listener_name_list]
Example:
An example of this command is:
srvctl stop listener -n node01
srvctl modify nodeapps: command syntax and example
Modifies the configuration for a node application.Applies a new Oracle home or virtual IP address to nodeapps.
Syntax:
srvctl modify nodeapps -n node_name [-o oracle_home] [-A new_vip_address]
-n node_name
-o oracle_home
-A new_vip_address
The node level VIP address (name|ip/netmask[/if1[|if2|...]]).
Example
An example of this command is:
srvctl modify nodeapps -n node01 -A 100.200.300.40/255.255.255.0/eth0
srvctl modify service: command syntax and example
Modifies the configuration for a named service.
Syntax:
srvctl modify service -d db_unique_name -s service_name -n -i pref_inst_list [-a avail_inst_list] [-f]
srvctl modify service -d db_unique_name -s service_name -i old_inst_name -t new_inst_name [-f]
srvctl modify service -d db_unique_name -s service_name -n -i pref_inst_list [-a avail_inst_list] [-f]
-f : Disconnect all sessions during stop or relocate service operations.
Example:
An example of moving a service member from one instance to another is:
srvctl modify service -d mndb -s mndb_sales -i mndb1 -t node01
An example of changing an available instance to a preferred instance is:
srvctl modify service -d mndb -s mndb_sales -i mndb1 -r
To change the status of multiple instances, you can use the srvctl modify service command to list which instances are to be the preferred and which are to be the available instances for a service as follows:
srvctl modify service -d db_unique_name -s service_name -n -i pref_inst_list [-a avail_inst_list] [-f]
An example of this command to exchange a preferred and available instance is:
srvctl modify service -d mndb -s mndb_sales -n -i mndb1 -a mndb2
srvctl modify database syntax and example
The srvctl modify database command is used to modify a database configurations in the OCR (Oracle cluster registry).
The OCR is the repository used by the CRS (cluster readu services) processes to run a database in RAC environment.
Syntax:
srvctl modify database -d db_unique_name [-n db_name] [-o oracle_home] [-m domain_name]
[-p spfile] [-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY}] [-s start_options] [-y {AUTOMATIC | MANUAL}]
-d database name (unique name)
-n db_name: database name if different from unique name
-o oracle_home:Oracle home
-m domain_name: Domain name of the database
-p spfile: server parameter file
-r role [PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY]: Role of the database
-s start_options:Startup options for the database.
-y Management policy for the database, either automatic or manual.
-h
Example:
srvctl modify database -d mndb -r logical_standby
This command makes the database mndb a LOGICAL_STANDBY database.
srvctl modify database -d mndb -r physical_standby
This command makes the database mndb a PHYSICAL_STANDBY database.
srvctl add commands syntax and example
The srvctl add commands can be used to add a database, instance, service, nodeapps and asm configurations in the OCR (Oracle cluster registry). The OCR is the repository used by the CRS (cluster readu services) processes to run a database in RAC environment.
So the following operation can be performed
srvctl add database
srvctl add instance
srvctl add service
srvctl add nodeapps
srvctl add asm
SRVCTL ADD DATABASE
This command should be used to add a database configuration to the clustered database configuration.
Sintax:
srvctl add database -d db_name -o oracle_home
-d is database name
-o is oracle home
Example:
srvctl add database -d mndb -o /u01/app/oracle/product/11.1.0/db_1
This example adds a database named mndb and specifies that oracle home is in
/u01/app/oracle/product/11.1.0/db_1
SRVCTL ADD INSTANCE
This command should be used to add an instance configuration to the clustered database configuration.
Syntax:
srvctl add instance -d db_name -i instance_name -n node_name
-d is database name
-i name of the instance
-n name of the node where the instance should normally run
Example:
srvctl add instance -d mndb -i mndb1 -n node01
The above example will add an instance called mndb1 to the node node01. The instance will be based on the database called mndb.
SRVCTL ADD SERVICE
This command should be used to add service configuration to the clustered database configuration.
Syntax:
srvctl add service -d db_unique_name -s service_name -r preferred_list [-a available_list] [-P TAF_policy]
-d db_unique_name (the unique database name)
-s service_name (a name to the service that you are adding)
-r preferred list, a list of preferred instance where the service should run
-a available list on instances. The list will be used when no preffered instance is available
-P TAF (transparent application failover) polic (e.g NONE, BASIC, or PRECONNECT).
Example:
srvctl add service -d mndb -s mndb_sales -r mndb1 -a mndb2
srvctl add service -d mndb -s mndb_sales -r mndb1 -a mndb2 -P Preconnect
SRVCTL ADD NODEAPPS
This command should be used to add nodeapps configuration to the clustered database configuration.
Syntax:
srvctl add nodeapps -n node_name -o oracle_home -A addr_str
-n node name
-o oracle home location
-A address string
VIP (virtual ip) address (name|ip/netmask[/if1[|if2|...]]).
Example:
srvctl add nodeapps -n node01 -o /u01/app/oracle/product/11.1.0/db_1 -A 132.12.23.40/255.255.255.0
SRVCTL ADD ASM
This command should be used to add asm configuration to the clustered database configuration.
Adds a record for an ASM instance to the specified node.
Syntax:
srvctl add asm -n node_name -i asm_instance_name -o oracle_home
-n node name
-i asm instance name
-o oracle home (e.g. /u01/app/oracle/product/11.1.0/db_1)
Example:
srvctl add asm -n node01 -i asm01 -o /u01/app/oracle/product/11.1.0/db_1
Recent Comments