| Oracle Real Application Clusters Guard Concepts and Administration Guide Release 3.2.1 for Windows NT and Windows 2000 Part Number A95197-01 |
|
Oracle Real Application Clusters Guard provides a command-line interface as an alternative to using Oracle Real Application Clusters Guard Manager for managing resources in a cluster. For example, using the ORACGCMD command at the command prompt, you can take Oracle resources offline or bring them online. The ORACGCMD command is useful if you want to manage Oracle resources from batch programs or scripts.
The ORACGCMD command allows you to perform many of the same operations that you can perform with Oracle Real Application Clusters Guard Manager. To run the ORACGCMD command, specify the full path, beginning with the location where Oracle Real Application Clusters Guard Manager is installed:
<Oracle_Home>\fs\fsmgr\bin\oracgcmd.exe
If you do not use this path, the Windows operating system will not be able to locate the ORACGCMD command.
To use the ORACGCMD command, open a command prompt window and type the ORACGCMD command line using the following syntax:
ORACGCMD <action> <name> /CLUSTER=cluster_name [<qualifier>]
Oracle Real Application Clusters Guard supplies the ORACGCMD command, which you can use in scripts to do many of the same functions that you can do with Oracle Real Application Clusters Guard Manager. For example, you can use the ORACGCMD command to take cluster resources offline before you perform nightly backups, and then place the resources online again when the backups are complete.
You can execute the ORACGCMD command on any system where Oracle Real Application Clusters Guard Manager is installed. (The ORACGCMD software is a component of Oracle Real Application Clusters Guard Manager.)
When you execute certain ORACGCMD commands, you can specify the name of a log file to capture the results of the operation. The following table notes which commands can be logged.
Specifies the action that you want applied to the group, resource, or cluster. Use one of the actions described in the following table:
The action parameter must be the first argument to the ORACGCMD command.
The name of the resource, group, or Oracle Real Application Clusters database on which you want the ORACGCMD command to take action. For example, Sales1 is a valid name for a database instance resource.
This parameter must follow the action parameter. The name parameter is required for all ORACGCMD command actions except for the DUMPCLUSTER, VERIFYALLGROUPS, and VERIFYCLUSTER actions.
Specifies the name of the cluster on which the ORACGCMD command will execute.
This qualifier is required.
Specifies the location of the log file that a long-running operation creates when the DUMPCLUSTER, MOVEGROUP, VERIFYCLUSTER, VERIFYGROUP, VERIFYALLGROUPS, or VERIFYORAC, action is performed. If you do not specify the LOGFILE qualifier, the log file is written to the current output device, which is typically the system console.
This qualifier is optional.
Specifies the name of the node to which you want a group to be moved. Use this qualifier only when you specify the MOVEGROUP action.
Use this qualifier only when you specify the OFFLINERESOURCE or OFFLINEORAC action to take an Oracle Real Application Clusters database instance offline or an entire Oracle Real Application Clusters database offline (respectively). If you do not supply one of the offline-option modes from the following table, the database instance or instances will be taken offline in the immediate mode (the default):
Specifies the domain to which the user account (specified with the /USER qualifier) is located.
This qualifier is optional on all clients except Windows 2000 clients; however, if you enter a domain name, you must also enter a user name and a password.
Specifies the password for the account that is specified with the /USER qualifier.
This qualifier is optional on all clients except Windows 2000 clients; however, if you enter a password, you must also enter a user name and a domain name.
Specifies the user name for a domain account that has Administrator privileges on all cluster nodes.
This qualifier is optional on all clients except Windows 2000 clients; however, if you enter a user name, you must also enter a password and a domain name.
Correct usage:
ORACGCMD onlineorac sales /CLUSTER=ntclu-150 /USER=smith /PWD=smithpwd /DOMAIN=newengland
Incorrect usage:
ORACGCMD onlineorac sales/CLUSTER=ntclu-150/USER=smith/PWD=smithpwd/DOMAIN=newengland Invalid syntax: no cluster name. For help, type "OracgCmd ?"
The following command places online an Oracle Real Application Clusters database instance named Sales1:
ORACGCMD onlineresource Sales1 /CLUSTER=ntclu-160 /USER=smith /PWD=smithpwd /DOMAIN=newengland
The following command verifies all groups on the cluster NTCLU-150 and writes verify operation output to the log file C:\temp\verifygroups.log:
ORACGCMD verifyallgroups /CLUSTER=ntclu-150 /USER=smith /PWD=smithpwd /DOMAIN=ORANT /LOGFILE=c:\temp\verifygroups.log
The following command takes the Oracle Real Application Clusters database offline immediately:
ORACGCMD offlineorac sales /CLUSTER=NTCLU-150 /USER=smith /PWD=smithpwd /DOMAIN=ORANT /OFFLINE=immediate
The following script backs up a database called db.world. This example assumes the database is contained in a group called FS Group1 running on a cluster called NTCLU-150, on node NTCLU-151.
REM This script shows an example of performing a backup operation on an Oracle REM Real Applications database.
REM
REM 1. Take the database offline. ORACGCMD offlineorac sales /offline=immediate /cluster=NTCLU-150 REM 2. Begin the backup operation here. As an example, the following lines
REM copy files using the copy function on the operating system. copy e:\ofsdb\sales1\data\*.ora e:\backup\data copy e:\ofsdb\sales1\log\*.ora e:\backup\log copy e:\ofsdb\sales1\param\*.ora e:\backup\param copy e:\ofsdb\sales2\data\*.ora e:\backup\data copy e:\ofsdb\sales2\log\*.ora e:\backup\log copy e:\ofsdb\sales2\param\*.ora e:\backup\param REM 4. Place the database back online. ORACGCMD onlineorac sales /cluster=ntclu-150 REM The backup operation is complete.
|
|
![]() Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|