Use crs_profile to manage RAC resource configuration files

Source: Internet
Author: User

Profile usually refers to the configuration file. crs_profile is the configuration file for managing the cluster. In systlele RAC, all CRS resources are stored on the OCR disk. OCR is more similar to Windows registry. We know that the Windows registry is composed of a tree-like node in the form of key-value, and the same is true for the resources in the cluster. You can export the entire Windows Registry, export branches, or import registry information. The combination of crs_register and crs_unregisterd for managing cluster resources is equivalent to a Regedit management tool similar to Windows. Then let's look at it.

 

1. crs_profile help information
Most of Oracle clusterware's cluster command line tools provide rich operation instructions. Enter crs_profile in the command line to provide help information.
Oracle @ bo2dbp: ~> Crs_profile
Usage: crs_profile-create resource_name-T Application
[-Dir directory_path] [-A action_script] [-B binary_pathname]
[-D description] [-H hosting_members] [-r required_resources]
[-L optional_resources] [-P placement_policy]
[-O as = auto_start, CI = check_interval, Ft = failure_threshold,
FI = failure_interval, Ra = restart_attempts, FD = failover_delay,
St = script_timeout, AP = active_placement, bt = rebalance,
Ut = uptime_threshold, rT = start_timeout, Pt = stop_timeout] [-F] [-q]

Crs_profile-create resource_name-I template_file [-Dir directory_path] [-F] [-q]

Crs_profile-delete resource_name [-Dir directory_path] [-q]

Crs_profile-print [resource_name [...] [-Dir directory_path] [-q]

Crs_profile-template resource_name [-Dir directory_path] [-O template_file]

Crs_profile-template-T application [-O template_file]

Crs_profile-update resource_name [-Dir directory_path] [option...] [-O option,...] [-q]

Crs_profile-validate resource_name [-Dir directory_path] [-q]

 

Ii. Use crs_profile to operate cluster resources

1. View resources in the current cluster # Use crs_stat to view the configuration information of the cluster containing srv. Oracle @ bo2dbp: ~> Crs_stat-p | grep srvname = ora. gobo4.gobo4 _ srv. gobo4a. srvname = ora. ora10g. hr_ora10g.ora10g1.srvdescription = ora. ora10g. hr_ora10g.ora10g1.srv # Use crs_stat to check whether the service of the cluster is in the online status. Oracle @ bo2dbp: ~> Crs_stat-T | grep srvora .... o4a. SRV application online bo2dbp ora .... 0g1. SRV application online bo2dbp 2. Use crs_profile to export the specified cluster resource information to the file Oracle @ bo2dbp: ~> Crs_profile-create ora. ora10g. hr_ora10g.ora10g1.srv-T application # export to the default path Oracle @ bo2dbp: ~> Crs_profile-create ora. ora10g. hr_ora10g.ora10g1.srv-T application-DIR/users/Oracle # export to the specified path Oracle @ bo2dbp: ~> Ls-hltr ora. ora10g. hr_ora10g.ora10g1.srv *-RW-r -- 1 Oracle oinstall 820 ora. ora10g. Quorum @ bo2dbp: ~> Ls-hltr $ ora_crs_home/CRS/public/ora. ora10g. hr_ora10g.ora10g1.srv * # default path-RW-r -- 1 Oracle oinstall 833/u01/Oracle/CRS/public/ora. ora10g. hr_ora10g.ora10g1.srv.cap3. view the information of the exported resource configuration file Oracle @ bo2dbp: ~> Crs_profile-print ora. ora10g. hr_ora10g.ora10g1.srv # print the content name of the default path when no path is specified = ora. ora10g. hr_ora10g.ora10g1.srvtype = applicationaction_script =/u01/Oracle/CRS/public/ora. ora10g. hr_ora10g.ora10g1.srv.scractive_placement = 0auto_start = restorecheck_interval = 60 description = ora. ora10g. hr_ora10g.ora10g1.srvfailover_delay = 0failure_interval = 0failure_threshold = 0hosting_members = optional_resources = placement = ba Export = restart_attempts = 1script_timeout = 60start_timeout = 0stop_timeout = timeout = bytes =/as hour = bytes = usr_ora_if = bytes = usr_ora_lang = bytes = usr_ora_opi = bytes usr_ora_preconnect = noneusr_ora_srv = usr_ora_start_ti Meout = 0usr_ora_stop_mode = immediateusr_ora_stop_timeout = 0usr_ora_vip = 4. Description of common sub-item in the resource configuration file parameter description parameter command (take create as an example) -------------- ----------------- ------------------------ name Resource Name crs_profile-create resource_name type resource type (application, generic) crs_profile-create resource_name-T... Action_script is used to manage the HA scheme script crs_profile-create resource_name-... Active_placement resource storage location/node crs_profile-create resource_name-o-AP... Auto_start resource self-starting crs_profile-create resource_name-o-... Check_interval resource monitoring interval crs_profile-create resource_name-o-ci... Failover_delay resource failover wait time crs_profile-create resource_name-o-FD... Failure_interval resource restart attempt interval crs_profile-create resource_name-o-fi... Failure_threshold resource restart attempts (up to 20) crs_profile-create resource_name-o-ft... Select crs_profile-create resource_name-H… as the primary node of hosting_members resource startup or failover... Placement resource start or failover node selection mode crs_profile-create resource_name-P required_resources the resource crs_profile-create resource_name-r restart_attempts resource on which the current resource is dependent -O-ra... Script_timeout: Wait for the return time of action_script results. crs_profile-create resource_name-o-ST... Usr_ora_vip VIP address crs_profile-create vip_name-T application-a $ ora_crs_home/bin/uservip-o oi = ..., OV = ..., On =... 5. Delete the exported resource configuration file Oracle @ bo2dbp: ~> Crs_profile-delete ora. ora10g. hr_ora10g.ora10g1.srv-DIR/users/oracleoracle @ bo2dbp: ~> Crs_profile-print ora. ora10g. hr_ora10g.ora10g1.srv-DIR/users/Oracle # When you view it again, the prompt that the configuration file does not exist CRS-0181: cannot access the resource profile 'ora. ora10g. hr_ora10g.ora10g1.srv '. 6. Update the item Oracle @ bo2dbp in the resource configuration file: ~> Crs_profile-update ora. ora10g. hr_ora10g.ora10g1.srv-O as = never # update the auto_start entry in the resource configuration file Oracle @ bo2dbp: ~> Crs_profile-print ora. ora10g. hr_ora10g.ora10g1.srvname = ora. ora10g. hr_ora10g.ora10g1.srvtype = applicationaction_script =/u01/Oracle/CRS/public/ora. ora10g. hr_ora10g.ora10g1.srv.scractive_placement = 0auto_start = never # at this time, this item has changed from the original restore to nevercheck_interval = 60 description = ora. ora10g. hr_ora10g.ora10g1.srvfailover_delay = 0failure_interval = 0failure_threshold = 0hosting_members = optional_resources = placement = Scripts = restart_attempts = 1script_timeout = 60start_timeout = 0stop_timeout = bytes =/as hour = bytes = usr_ora_if = bytes = usr_ora_lang = bytes = usr_ora_opi = bytes = usr_ora_preconnect = noneusr_ora_srv = usr_ora_start _ Timeout = 0usr_ora_stop_mode = immediateusr_ora_stop_timeout = 0usr_ora_vip = # The auto_start value can also be expressed as 0, 1, and 2, where 0 is equivalent to always and 1 is equivalent to restore, 2 is equivalent to never 7. verify the correctness of the resource configuration file Oracle @ bo2dbp: ~> Crs_profile-validate ora. ora10g. hr_ora10g.ora10g1.srv # change the auto_start value to 3oracle @ bo2dbp: ~> VI $ ora_crs_home/CRS/public/ora. ora10g. hr_ora10g.ora10g1.srv.caporacle @ bo2dbp: ~> Crs_profile-print ora. ora10g. hr_ora10g.ora10g1.srv | grep auto_startauto_start = 3 # an error occurs during the following verification: Oracle @ bo2dbp: ~> Crs_profile-validate ora. ora10g. hr_ora10g.ora10g1.srv error: auto_start invalid: 3 CRS-0180: resource '/u01/Oracle/CRS/public/ora. ora10g. hr_ora10g.ora10g1.srv.cap 'validation failed. # Use the update parameter again to update the configuration file Oracle @ bo2dbp: ~> Crs_profile-update ora. ora10g. hr_ora10g.ora10g1.srv-O as = 1oracle @ bo2dbp: ~> Crs_profile-print ora. ora10g. hr_ora10g.ora10g1.srv | grep auto_startauto_start = 1oracle @ bo2dbp: ~> Crs_profile-validate ora. ora10g. hr_ora10g.ora10g1.srv # Verification Successful here 8. Export the resource configuration template # export the specified resource template Oracle @ bo2dbp below: ~> Crs_profile-template ora. ora10g. hr_ora10g.ora10g1.srvoracle @ bo2dbp: ~> Ls-hltr * temp *-RW-r -- 1 Oracle oinstall 700 template. cap # You can see that the following template configuration file contains all the sub-items required for the specified resource. If some sub-items are not required, the value of the sub-item is null. Oracle @ bo2dbp: ~> More template. capname = type = applicationaction_script = active_placement = 0auto_start = 1check_interval = 60 description = login = optional_resources = placement = login = 1script_timeout = 60start_timeout = login = Login = usr_ora_check_timeout = 0usr_ora_connect_str =/As sysdbausr_ora _ DEBUG = 0usr_ora_disconnect = platform = usr_ora_if = platform = usr_ora_lang = platform = usr_ora_opi = platform = usr_ora_preconnect = platform = 0usr_ora_vip = # export all application resource configurations template Oracle @ bo2dbp: ~> Crs_profile-template-T application-O tmplate. caporacle @ bo2dbp: ~> Ls-hltr *. cap-RW-r -- 1 Oracle oinstall 700 template. cap-RW-r -- 1 Oracle oinstall 706 tmplate. cap # Author: Robinson # blog: http://blog.csdn.net/robinson_0612

Iii. Summary
Crs_profile is a tool used to manage resources in the OCR configuration file. You can export application and other resources for backup, update, and view after export.
You can use the crs_register tool to register the updated configuration file with OCR.

 

Iv. More references

For more information about Oracle RAC, see
Use crs_setperm to modify the resource owner and permissions of RAC.
Use crs_profile to manage RAC resource configuration files
RAC database startup and Shutdown
Oracle RAC services
Services in Oracle Database 10g
Migrate datbase from single instance to Oracle RAC
Connect Oracle RAC to a specified instance
Oracle RAC load balancing test (combined with server and client)
Oracle RAC server connection Load Balance)
Load Balance)
Non-Default port listening configuration in Oracle RAC (listener. ora tnsnames. ora)
Oracle RAC Listener Configuration (listener. ora tnsnames. ora)
Configure RAC load balancing and Failover
CRS-1006, CRS-0215 fault case
Installing Oracle 10g RAC Based on Linux (RHEL 5.5)
Use runcluvfy to verify the Oracle RAC installation environment

For more information about the basics and concepts of Oracle network configuration, see:
Configure dynamic service registration for non-default ports
Configure sqlnet. ora to restrict IP Access to Oracle
Configure and manage Oracle listener logs
Set the Oracle listener password (listener)
Configure the Oracle client to connect to the database

For more information about user-managed backup and recovery, see
Oracle cold backup
Oracle Hot Backup
Concept of Oracle backup recovery
Oracle instance recovery
Oracle recovery based on user management
System tablespace management and Backup Recovery
Sysaux tablespace management and recovery
Oracle backup control file recovery (unsing backup controlfile)

For information on RMAN backup recovery and management, see
RMAN overview and architecture
RMAN configuration, Monitoring and Management
Detailed description of RMAN backup
RMAN restoration and recovery
Create and use RMAN catalog
Create RMAN storage script based on catalog
Catalog-based RMAN backup and recovery
RMAN backup path confusion
Use RMAN for recovery from different machine backups (WIN platform)
Use RMAN to migrate a file system database to ASM
Linux RMAN backup shell script
Use RMAN to migrate the database to a different machine

For the Oracle architecture, see
Oracle tablespace and data files
Oracle Password File
Oracle parameter file
Oracle online redo log file)
Oracle Control File)
Oracle archiving logs
Oracle rollback and undo)
Oracle database instance startup and Shutdown Process
Automated Management of Oracle 10g SGA
Oracle instances and Oracle databases (Oracle Architecture)

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.