In this post there is two Nodes RAC implemented as below.
Nodes
oradb1.oracle.com
oradb2.oracle.com
Instances
racdb1
racdb2
Database
prod
Manually Control Oracle Clusterware Stack
Stop the Oracle Clusterware stack by using this command.
# crsctl stop crs
Start the Oracle Clusterware stack by using this command.
# crsctl start crs
This Command to disable oracle clusterware from being started in a subsequent reboot.
This command does not stop the current running Oracle Clusterware stack.
# crsctl disable crs
This command to enable Oracle Clusterware to be started in a subsequent reboot.
# crsctl enable crs
This command to check the health of Oracle Clusterware.
$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
This command shows you all the resources under Oracle Clusterware control.
$ crs_stat –t
Name Type Target State Host
--------------------------------------------------------------------------
ora....d1.inst application ONLINE ONLINE racdb1
ora....d2.inst application ONLINE ONLINE racdb2
ora.prod.db application ONLINE ONLINE racdb1
ora....SM1.asm application ONLINE ONLINE racdb1
ora....B1.lsnr application ONLINE ONLINE racdb1
ora....db1.gsd application ONLINE ONLINE racdb1
ora....db1.ons application ONLINE ONLINE racdb1
ora....db1.vip application ONLINE ONLINE racdb1
ora....SM2.asm application ONLINE ONLINE racdb2
ora....B2.lsnr application ONLINE ONLINE racdb2
ora....db2.gsd application ONLINE ONLINE racdb2
ora....db2.ons application ONLINE ONLINE racdb2
ora....db2.vip application ONLINE ONLINE racdb2
NOTE: You must run these commands as root.
Starting and Stopping RAC Instances
Syntax and Options
Use the srvctl start instance command with the following syntax:
srvctl start|stop instance -d -i [-o start_options]|[-o stop_options] [-c connect_str | -q]
Option Description
-d db_unique_name Unique name for the database.
-i inst_name_list Comma-delimited instance names.
-o start_options
-o stop_options Options for startup command (for example: open, mount, nomount, normal, transactional, immediate, abort).
Options for shutdown command (for example: normal, transactional, immediate, or abort)
-c connect_str Connect string (default: / as sysdba).
-q Prompt for user credentials connect string from standard input.
Examples:
$ srvctl start instance –d PROD –i RACDB1,RACDB2
$ srvctl stop instance –d PROD –i RACDB1,RACDB2
Starting and Stopping the listener using svrctl
Start listener
Starts the default Listener known as node_name, or the Listeners represented in a given list
of Listener names, that are registered with Oracle Clusterware on the given node.
Stop listener
Stops the default Listener known as node_name, or the Listeners represented in a given list
of Listener names, that are registered with Oracle Clusterware on the given node.
Syntax and Options
srvctl start|stop listener -n node_name [-l listener_name_list]
Example
srvctl start listener -n RACDB1
srvctl stop listener -n RACDB1
Starting and Stopping Services Using srvctl
srvctl Start/Stop service
Starts a service or multiple services on the specified instance. The srvctl start service command will fail if you
attempt to start a service on an instance if that service is already running on its maximum number of instances, that is,
its number of preferred instances.
Stops one or more services globally across the cluster database, or on the specified instance.
Syntax and Options
srvctl start service -d [-s service_name_list [-i ]] [-o ] [-c connect_str | -q]
srvctl stop service -d db_unique_name [-s service_name_list [-i inst_name]] [-c connect_str | -q] [-f]
Option Description
-d db_unique_name Unique name for the database
-s service_name_list Comma-delimited service names; the service name list is optional and if not provided,
the SRVCTL starts all of the database's services
-i inst_name Instance name
-o start_options Options to startup command (for example: open, mount, or nomount)
-c connect_str Connect string (default: / as sysdba)
-q Query connect string from standard input
-d db_unique_name Unique name for the database
-s service_name_list Comma-delimited service names; if you do not provide a service name list, then SRVCTL stops all
services on the database
-i inst_name Instance name
-c connect_str Connect string (default: / as sysdba)
-q Query connect string from standard input
-f force Force SRVCTL to stop the service; this causes SRVCTL to disconnect all of the sessions transactionally,
causing the sessions using the service to reconnect to another instance
Examples
Start a named service on all preferred instances:
$ srvctl start service –d PROD –s AP
Stop a service on selected instance:
$ srvctl start service –d PROD –s AP –i RACDB1,RACDB2
Stop a named service on all preferred instances:
$ srvctl stop service –d PROD –s AP
Starting and Stopping the database using srvctl
Stops a database, its instances, and its services.
Syntax and Options
Use the srvctl stop database command with the following syntax:
srvctl stop database -d db_unique_name [-o stop_options] [-c connect_str | -q]
Option Description
-d db_unique_name Unique name for the database
-o stop_options shutdown command options (for example: normal, transactional, immediate, or abort)
-c connect_str Connect string (default: / as sysdba)
-q Prompt for user credentials connect string from standard input
Example
An example of this command is:
srvctl stop database -d crm
$ srvctl start database –d PROD –o open
Note: The srvctl stop database command implicity does a srvctl stop services
(because services are dependent on database).However, a subsequent
srvctl start database requires an explicit srvctl start service.
Starting and Stopping nodeapps using srvctl
Starts node-level applications on a particular node.
Stops node-level applications on a particular node.
Syntax and Options
srvctl start|stop nodeapps -n node_name
The only option available for this command is -n to specify the node name.
Example
An example of this command is:
srvctl start nodeapps -n racdb1
srvctl stop nodeapps -n racdb1
srvctl status nodeapps –n racdb1
VIP is running on node: racdb1
GSD is running on node: racdb1
Listener is running on node: racdb1
ONS daemon is running on node: racdb1
srvctl status nodeapps –n racdb2
VIP is running on node: racdb2
GSD is running on node: racdb2
Listener is running on node: racdb2
ONS daemon is running on node: racdb2
Nodes
oradb1.oracle.com
oradb2.oracle.com
Instances
racdb1
racdb2
Database
prod
Manually Control Oracle Clusterware Stack
Stop the Oracle Clusterware stack by using this command.
# crsctl stop crs
Start the Oracle Clusterware stack by using this command.
# crsctl start crs
This Command to disable oracle clusterware from being started in a subsequent reboot.
This command does not stop the current running Oracle Clusterware stack.
# crsctl disable crs
This command to enable Oracle Clusterware to be started in a subsequent reboot.
# crsctl enable crs
This command to check the health of Oracle Clusterware.
$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
This command shows you all the resources under Oracle Clusterware control.
$ crs_stat –t
Name Type Target State Host
--------------------------------------------------------------------------
ora....d1.inst application ONLINE ONLINE racdb1
ora....d2.inst application ONLINE ONLINE racdb2
ora.prod.db application ONLINE ONLINE racdb1
ora....SM1.asm application ONLINE ONLINE racdb1
ora....B1.lsnr application ONLINE ONLINE racdb1
ora....db1.gsd application ONLINE ONLINE racdb1
ora....db1.ons application ONLINE ONLINE racdb1
ora....db1.vip application ONLINE ONLINE racdb1
ora....SM2.asm application ONLINE ONLINE racdb2
ora....B2.lsnr application ONLINE ONLINE racdb2
ora....db2.gsd application ONLINE ONLINE racdb2
ora....db2.ons application ONLINE ONLINE racdb2
ora....db2.vip application ONLINE ONLINE racdb2
NOTE: You must run these commands as root.
Starting and Stopping RAC Instances
Syntax and Options
Use the srvctl start instance command with the following syntax:
srvctl start|stop instance -d -i [-o start_options]|[-o stop_options] [-c connect_str | -q]
Option Description
-d db_unique_name Unique name for the database.
-i inst_name_list Comma-delimited instance names.
-o start_options
-o stop_options Options for startup command (for example: open, mount, nomount, normal, transactional, immediate, abort).
Options for shutdown command (for example: normal, transactional, immediate, or abort)
-c connect_str Connect string (default: / as sysdba).
-q Prompt for user credentials connect string from standard input.
Examples:
$ srvctl start instance –d PROD –i RACDB1,RACDB2
$ srvctl stop instance –d PROD –i RACDB1,RACDB2
Starting and Stopping the listener using svrctl
Start listener
Starts the default Listener known as node_name, or the Listeners represented in a given list
of Listener names, that are registered with Oracle Clusterware on the given node.
Stop listener
Stops the default Listener known as node_name, or the Listeners represented in a given list
of Listener names, that are registered with Oracle Clusterware on the given node.
Syntax and Options
srvctl start|stop listener -n node_name [-l listener_name_list]
Example
srvctl start listener -n RACDB1
srvctl stop listener -n RACDB1
Starting and Stopping Services Using srvctl
srvctl Start/Stop service
Starts a service or multiple services on the specified instance. The srvctl start service command will fail if you
attempt to start a service on an instance if that service is already running on its maximum number of instances, that is,
its number of preferred instances.
Stops one or more services globally across the cluster database, or on the specified instance.
Syntax and Options
srvctl start service -d [-s service_name_list [-i ]] [-o ] [-c connect_str | -q]
srvctl stop service -d db_unique_name [-s service_name_list [-i inst_name]] [-c connect_str | -q] [-f]
Option Description
-d db_unique_name Unique name for the database
-s service_name_list Comma-delimited service names; the service name list is optional and if not provided,
the SRVCTL starts all of the database's services
-i inst_name Instance name
-o start_options Options to startup command (for example: open, mount, or nomount)
-c connect_str Connect string (default: / as sysdba)
-q Query connect string from standard input
-d db_unique_name Unique name for the database
-s service_name_list Comma-delimited service names; if you do not provide a service name list, then SRVCTL stops all
services on the database
-i inst_name Instance name
-c connect_str Connect string (default: / as sysdba)
-q Query connect string from standard input
-f force Force SRVCTL to stop the service; this causes SRVCTL to disconnect all of the sessions transactionally,
causing the sessions using the service to reconnect to another instance
Examples
Start a named service on all preferred instances:
$ srvctl start service –d PROD –s AP
Stop a service on selected instance:
$ srvctl start service –d PROD –s AP –i RACDB1,RACDB2
Stop a named service on all preferred instances:
$ srvctl stop service –d PROD –s AP
Starting and Stopping the database using srvctl
Stops a database, its instances, and its services.
Syntax and Options
Use the srvctl stop database command with the following syntax:
srvctl stop database -d db_unique_name [-o stop_options] [-c connect_str | -q]
Option Description
-d db_unique_name Unique name for the database
-o stop_options shutdown command options (for example: normal, transactional, immediate, or abort)
-c connect_str Connect string (default: / as sysdba)
-q Prompt for user credentials connect string from standard input
Example
An example of this command is:
srvctl stop database -d crm
$ srvctl start database –d PROD –o open
Note: The srvctl stop database command implicity does a srvctl stop services
(because services are dependent on database).However, a subsequent
srvctl start database requires an explicit srvctl start service.
Starting and Stopping nodeapps using srvctl
Starts node-level applications on a particular node.
Stops node-level applications on a particular node.
Syntax and Options
srvctl start|stop nodeapps -n node_name
The only option available for this command is -n to specify the node name.
Example
An example of this command is:
srvctl start nodeapps -n racdb1
srvctl stop nodeapps -n racdb1
srvctl status nodeapps –n racdb1
VIP is running on node: racdb1
GSD is running on node: racdb1
Listener is running on node: racdb1
ONS daemon is running on node: racdb1
srvctl status nodeapps –n racdb2
VIP is running on node: racdb2
GSD is running on node: racdb2
Listener is running on node: racdb2
ONS daemon is running on node: racdb2
Comentarios
Publicar un comentario