|
How to manage Oracle RAC Environment !!!!! |
Sunday, November 30, 2008 |
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.
Manage the ASM
Starting and Stopping asm using srvctl Starts an ASM instance Syntax and Options srvctl start asm -n node_name [-i asm_inst_name] [-o start_options] [-c connect_str | -q] Stops an ASM instance. Syntax and Options Use the srvctl stop asm command with the following syntax: srvctl stop asm -n node_name [-i inst_name] [-o stop_options] [-c connect_str | -q]
Option Description -n node_name Node name -i inst_name ASM instance name. -o start_options -o stop_options Options to startup command, for example open, mount, or nomount. Options for shutdown command, for example, normal, transactional, immediate, or abort. -c connect_string Connect string where the default is forward slash (/). -q Query connect string from standard input. -h Display help.
Examples Status an ASM instance on the specified node: $ srvctl status asm -n oradb1 ASM instance +ASM1 is running on node oradb1.
$ srvctl status asm -n oradb2 ASM instance +ASM2 is running on node oradb2. Start an ASM instance on the specified node: $ srvctl start asm -n ORADB1
Stop an ASM instance on the specified node:
$ srvctl stop asm –n ORADB1 –o immediate
An example to start all ASM instances on a node is:
$ srvctl start asm -n ORADB2
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 |
posted by Jaswinder Singh @ 1:12 AM |
|
3 Comments: |
-
This course offers students an introduction to the general features and capabilities of Oracle Database 10g Release 2 for Oracle Real Application Clusters (RAC). Students learn how to install and administer OracleClusterware, Real Application Clusters, and Automatic Storage Management. Students also learn how to administer their Database in a Real Application Clusters environment using Enterprise Manager Grid Control. Increase your efficiency by learning how to configure and use database services as well as the Load Balancing Advisory in a RAC environment. Learn how to add and remove nodes in clusters and how to patch both Oracle Clusterware and Real Application Clusters software in a rolling fashion.
-
hi friend, change the comment settings, as comments published after your approval. else you will get spam comments as above. dashboard-->settings-->comment-->change the settings.
-
I have been visiting various blogs for my term papers writing research. I have found your blog to be quite useful. Keep updating your blog with valuable information... Regards
|
|
<< Home |
|
|
|
|
|
This course offers students an introduction to the general features and capabilities of Oracle Database 10g Release 2 for Oracle Real Application Clusters (RAC). Students learn how to install and administer OracleClusterware, Real Application Clusters, and Automatic Storage Management. Students also learn how to administer their Database in a Real Application Clusters environment using Enterprise Manager Grid Control. Increase your efficiency by learning how to configure and use database services as well as the Load Balancing Advisory in a RAC environment. Learn how to add and remove nodes in clusters and how to patch both Oracle Clusterware and Real Application Clusters software in a rolling fashion.