Using srvctl to Manage your 10g RAC Database
Oracle recommends that RAC databases be managed with srvctl, an Oracle-supplied tool that was first introduced with 9i RAC. The 10g version of srvctl is slightly different from the 9i implementation. In this article, we will look at how -- and why -- to manage your 10g databases with srvctl.
Let's begin with a brief overview of RAC architecture.
- A cluster is a set of 2 or more machines (nodes) that share or coordinate resources to perform. the same task.
- A RAC database is 2 or more instances running on a set of clustered nodes, with all instances accessing a shared set of database files.
- Depending on the O/S platform, a RAC database may be deployed on a cluster that uses vendor clusterware plus Oracle's own clusterware (Cluster Ready Services), or on a cluster that solely uses Oracle's own clusterware.
Thus, every RAC sits on a cluster that is running Cluster Ready Services. srvctl is the primary tool DBAs use to configure CRS for their RAC database and processes.
Cluster Ready Services, or CRS, is a new feature for 10g RAC. Essentially, it is Oracle's own clusterware. On most platforms, Oracle supports vendor clusterware; in these cases, CRS interoperates with the vendor clusterware, providing high availability support and service and workload management. On Linux and Windows clusters, CRS serves as the sole clusterware. In all cases, CRS provides a standard cluster interface that is consistent across all
platforms.
CRS consists of four processes (crsd, occsd, evmd, and evmlogger) and two disks: the Oracle Cluster Registry (OCR), and the voting disk.
CRS manages the following resources:
- The ASM instances on each node
- Databases
- The instances on each node
- Oracle Services on each node
- The cluster nodes themselves, including the following processes, or "nodeapps":
- VIP
- GSD
- The listener
- The ONS daemon
CRS stores information about these resources in the OCR. If the information in the OCR for one of these resources becomes damaged or inconsistent, then CRS is no longer able to manage that resource. Fortunately, the OCR automatically backs itself up regularly and frequently.
srvctl is the tool Oracle recommends that DBAs use to interact with CRS and the cluster registry. Oracle does provide several tools to interface with the cluster registry and CRS more directly, at a lower level, but these tools are deliberately undocumented and intended only for use by Oracle Support. srvctl, in contrast, is well documented and easy to use. Using other tools to modify the OCR or manage CRS without the assistance of Oracle Support runs the risk of damaging the OCR.
Even if you are experienced with 9i srvctl, it's worth taking a look at this section; 9i and 10g srvctl commands are slightly different.
srvctl must be run from the $ORACLE_HOME of the RAC you are administering. The basic format of a srvctl command is
srvctl
where command is one of
enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config
and the target, or object, can be a database, instance, service, ASM instance, or the nodeapps.
The srvctl commands are summarized in this table:
Command | Targets | Description |
---|---|---|
srvctl add srvctl modify srvctl remove |
database instance service nodeapps |
srvctl add / remove adds/removes target's configuration information to/from the OCR.
srvctl modify allows you to change some of target's configuration information in the OCR without wiping out the rest. |
srvctl relocate | service | Allows you to reallocate a service from one named instance to another named instance. |
srvctl config | database service nodeapps asm |
Lists configuration information for target from the OCR. |
srvctl disable srvctl enable |
database instance service asm |
srvctl disable disables target, meaning CRS will not consider it for automatic startup, failover, or restart. This option is useful to ensure an object that is down for maintenance is not accidentally automatically restarted.
srvctl enable reenables the specified object. |
srvctl getenv srvctl setenv srvctl unsetenv |
database instance service nodeapps |
srvctl getenv displays the environment variables stored in the OCR for target.
srvctl setenv allows these variables to be set, and unsetenv unsets them. |
srvctl start srvctl status srvctl stop |
database instance service nodeapps asm |
Start, stop, or display status (started or stopped) of target. |
As you can see, srvctl is a powerful utility with a lot of syntax to remember. Fortunately, there are only really two commands to memorize: srvctl -help displays a basic usage message, and srvctl -h displays full usage information for every possible srvctl command.
Example 1. Bring up the MYSID1 instance of the MYSID database.
[oracle@myserver oracle]$ srvctl start instance -d MYSID -i MYSID1
Example 2. Stop the MYSID database: all its instances and all its services, on all nodes.
[oracle@myserver oracle]$ srvctl stop database -d MYSID
Example 3. Stop the nodeapps on the myserver node. NB: Instances and services also stop.
[oracle@myserver oracle]$ srvctl stop nodeapps -n myserver
Example 4. Add the MYSID3 instance, which runs on the myserver node, to the MYSID
clustered database.
[oracle@myserver oracle]$ srvctl add instance -d MYSID -i MYSID3 -n myserver
Example 4. Add a new node, the mynewserver node, to a cluster.
[oracle@myserver oracle]$ srvctl add nodeapps -n mynewserver -o $ORACLE_HOME -A 149.181.201.1/255.255.255.0/eth1
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-659522/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 10G RAC: srvctl 命令總結
- oracle 10g rac srvctl 命令總結Oracle 10g
- Oracle 10g RAC中Srvctl基本用法Oracle 10g
- manage logical standby databaseDatabase
- 4.5.1.2 srvctl add databaseDatabase
- RAC加入新節點 - Add Node to Your Oracle RAC 10g Cluster on LinuxOracleLinux
- 12CR2 using create database command for create non-CDB rac databaseDatabase
- rac 命令 srvctl 報錯
- 【OCM】Oracle Database 10g: RAC for Administrators(一)OracleDatabase
- 【OCM】Oracle Database 10g: RAC for Administrators(二)OracleDatabase
- 【OCM】Oracle Database 10g: RAC for Administrators(三)OracleDatabase
- 【OCM】Oracle Database 10g: RAC for Administrators(四)OracleDatabase
- 【OCM】Oracle Database 10g: RAC for Administrators(五)OracleDatabase
- Using Supplied Packages to Manage Stored OutlinesPackage
- [RAC]ORACLE Database 10g RAC for Administrators學習筆記(五)OracleDatabase筆記
- [RAC]ORACLE Database 10g RAC for Administrators學習筆記(一)OracleDatabase筆記
- [RAC]ORACLE Database 10g RAC for Administrators學習筆記(二)OracleDatabase筆記
- [RAC]ORACLE Database 10g RAC for Administrators學習筆記(三)OracleDatabase筆記
- [RAC]ORACLE Database 10g RAC for Administrators學習筆記(四)OracleDatabase筆記
- oracle rac srvctl 幫助大全Oracle
- Create RAC Standby Database for RAC Primary DatabaseDatabase
- Using Oracle Database 11g Release 2 Result Cache in an Oracle RAC EnvironmentOracleDatabase
- 使用srvctl管理RAC資料庫資料庫
- RAC中的srvctl和crs命令
- Scan Your Truck Using Nexiq Adapter: Simplifying Your Diagnostic ProcessAPT
- Oracle Database 19c(19.9) RAC On RedHat 8.3 Using VirtualBox and MacBookOracleDatabaseRedhatMac
- Oracle Database 11g Release 2 RAC On Linux Using VMware Server 2OracleDatabaseLinuxServer
- Using Regular Expressions in Oracle DatabaseExpressOracleDatabase
- How to prevent blocking in your SQL Server databaseBloCSQLServerDatabase
- Using SQLite in your Windows 8 Metro style applicationsSQLiteWindowsAPP
- Oracle Database 12c Release 2 (12.2) RAC On Oracle Linux 7 Using VMwareOracleDatabaseLinux
- Oracle RAC 10g Installation on Oracle Enterprise Linux Using VMware ServerOracleLinuxServer
- oracle-rac--srvctl add scan_listenerOracle
- RAC常用開啟關閉命令 – SRVCTL用法
- RAC之srvctl 命令不能用的問題
- RAC: SRVCTL and VIPCA 命令報錯解決方法PCA
- Duplicate Database from ASM to Non- ASM Database Using RMANDatabaseASM
- DrawERD makes it easy to visualize your database structure.DatabaseStruct