Oracle11gRACVotedisk, OCR, and resource management

Source: Internet
Author: User
The maintenance of Oracle11gRac is a little more difficult than that of 10 Gb, and there are more commands. The following is one of the solutions used in the maintenance of 11grac Votedisk, OCR, and various resources.

Oracle 11g Rac maintenance is a little more difficult than 10g, and the command is also a little more, the following is the one used in the maintenance of 11g rac Votedisk, OCR and various resources

Question: Oracle 11g Rac is more difficult to maintain than 10g, and more commands are provided, this section summarizes the Votedisk, OCR, and some commands used for resource maintenance of 11g rac for future reference.

Recommended reading:

Oracle 11g rac ocr and db_unique_name Configuration

Reconfigure and uninstall Oracle 11GR2 Grid Infrastructure

Manage Votedisk files

Check the Votedisk status

$ Crsctl query css votedisk

Add a votedisk in the new location

$ Crsctl add css votedisk + data

Migrate to another disk group

$ Crsctl replace votedisk + database

If the votedisk is damaged and needs to be restored, you must first start Clusterware to the "exclusive" mode as the root user.

# Crsctl start crs-excl

Shut down and start the Clusterware service as a root user

# Crsctl stop crs [-f] ---- f stands for Force

# Crsctl start crs

Manage OCR files

Manual backup of OCR

# Ocrconfig-manualbackup

View the backup OCR File

# Ocrconfig-showbackup

View the content of the OCR backup file

# Ocrdump-backupfile backup_file_name

Restore the OCR backup file

# Ocrconfig-restore file_name

Create an OCR file in the disk group DATABASE as the root user

# Ocrconfig-add + database

Delete unnecessary OCR files

# Ocrconfig-delete + database

Migrate the OCR file from the disk group DATA to the disk group DATABASE

# Ocrconfig-replace + data-replacement + database

Manage various resources of a RAC cluster

For database instances, you can view the status, close the instance, and start the instance by using the following commands. You can use the-I option to specify one or more instances, or use the-n option to specify the node name.

$ Srvctl status instance-d prod-I prod1, prod2

Instance prod1 is running on node ora1

Instance prod2 is running on node ora2

$ Srvctl stop instance-d prod-I prod1, prod2

$ Srvctl start instance-d prod-I prod1, prod2

For databases, you can run the following command to view the database status, close the database, and start the database. In fact, when the database instance is closed, the database is also closed.

$ Srvctl status database-d prod

Instance PROD1 is running on node ora1

Instance PROD2 is running on node ora2

$ Srvctl stop database-d prod

$ Srvctl start database-d prod

When shutting down the database, you can specify NORMAL, TRANSACTIONAL, IMMEDIATE, and ABORT keywords using the-o option after the srvctl command.

When starting the database, you can also specify one of the keywords "OPEN", "MOUNT", and "NOMOUNT" through the-o option after the command.

$ Srvctl start database-d prod-o mount

$ Srvctl stop database-d prod-o immediate

You can use the following commands to start and close a Database Listener and use the-n option to specify one or more node names.

$ Srvctl status listener

$ Srvctl stop listener-n ora1

$ Srvctl start listener-n ora1, ora2

For an ASM instance, run the following command to view the status, start, and close the instance, and use the-n option to specify the node name, you can also use the-o option to specify OPEN, MOUNT, NOMOUNT, and NORMAL, TRANSACTIONAL, IMMEDIATE, and ABORT to start or close an instance. When all ASM instances are closed, the ASM disk is also closed.

$ Srvctl status asm-n ora1, ora2

$ Srvctl start asm-n ora1, ora2

$ Srvctl stop asm-n ora1, ora2-o abort

For an ASM disk group, run the following command to view the status, disable, and start the disk group. Use the-n option to specify a node. If Clusterware or the database is accessing files in the ASM disk group, the disk group cannot be closed. In the srvctl command, use the-f option to force the disk group to be closed.

$ Srvctl status diskgroup-g dg1-n ora1, ora2

$ Srvctl stop diskgroup-g dg1-n ora1, ora2-f

$ Srvctl start diskgroup-g dg1-n ora1, ora2

For VIP and SCAN, you can also run the srvctl command to check whether the status has been enabled or disabled. When these two types of resources are disabled, such IP addresses will disappear from the operating system. For SCAN, you must use the-I option in the command to specify its number. For VIP, you must use the-I option to specify its name.

$ Srvctl status scan-I 1

$ Srvctl status vip-I ora1-vip

Srvctl and its enable, disable, remove, and add clauses allow activation, prohibition, deletion, and addition of various resources. When a resource is disabled, it cannot start with RAC startup unless it is activated again. When a resource is deleted, it disappears from OCR. When adding a Database Listener, you must specify the port number used by the listener and the installation directory of the database software.

$ Srvctl enable listener-l LISTENER-n ora1

$ Srvctl disable listener-l LISTENER-n ora1

$ Srvctl remove listener-l LISTENER

$ Srvctl add listener-l LISTENER-p 1521-o/s01/app/oracle

Note: The above commands seem simple, but the 11g rac is prone to wrong commands because of the increase in parameters and the low degree of detail of each parameter. We hope that you should be especially careful when maintaining the production database to avoid unnecessary troubles.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.