Crs_register/crs_unregister registration and removal of RAC services -- zhuanzai

Source: Internet
Author: User

The crs_register command registers resources to CRS. This method usually combines crs_stat-P or crs_profile to create a configuration file first. Crs_register also provides the CRS update function. This article describes the usage of crs_register and crs_unregister.

Before using crs_register, you can use crs_profile to create a resource configuration file. By default, if the path of the configuration file is not specified, the newly created resource configuration file is located in the $ ora_crs_home/CRS/Public path and ends with the. Cap suffix. For crs_profile usage, see use crs_profile to manage RAC resource configuration files.

[Python]View plaincopyprint?
  1. 1. crs_register and crs_unregister usage
  2. [Email protected]: ~> Crs_register
  3. Usage: crs_register resource_name [-Dir directory_path] [...] [-u] [-F] [-q]
  4. Crs_register resource_name-update [option...] [-O option,...]-Q
  5. [Email protected]: ~> Crs_unregister
  6. Usage: crs_unregister resource_name [...] [-q]
  7. 2. view the services currently running on the local machine
  8. [Email protected]: ~> ./Crs_stat.sh
  9. Resource Name target State
  10. -------------------------
  11. Ora. gobo4.gobo4a. Inst online on bo2dbp
  12. Ora. gobo4.gobo4b. Inst online on bo2dbs
  13. Ora. gobo4.gobo4 _ srv. gobo4a. SRV online on bo2dbp
  14. Ora. gobo4.gobo4 _ srv. CS online on bo2dbp
  15. Ora. gobo4.db online on bo2dbs
  16. Ora. bo2dbp. asm1.asm online on bo2dbp
  17. Ora. bo2dbp. listener_bo2dbp.lsnr online on bo2dbp
  18. Ora. bo2dbp. listener_ora10g_bo2dbp.lsnr online on bo2dbp
  19. Ora. bo2dbp. GSD online on bo2dbp
  20. Ora. bo2dbp. ONS online on bo2dbp
  21. Ora. bo2dbp. VIP online on bo2dbp
  22. Ora. bo2dbs. asm2.asm online on bo2dbs
  23. Ora. bo2dbs. listener_bo2dbs.lsnr online on bo2dbs
  24. Ora. bo2dbs. listener_ora10g_bo2dbs.lsnr online on bo2dbs
  25. Ora. bo2dbs. GSD online on bo2dbs
  26. Ora. bo2dbs. ONS online on bo2dbs
  27. Ora. bo2dbs. VIP online on bo2dbs
  28. Ora. ora10g. DB online on bo2dbs
  29. Ora. ora10g. hr_ora10g.cs online on bo2dbp
  30. Ora. ora10g. hr_ora10g.ora10g1.srv online on bo2dbp
  31. Ora. ora10g. ora10g1. Inst online on bo2dbp
  32. Ora. ora10g. ora10g2. Inst online on bo2dbs
  33. 3. Use crs_stat-P to list resource details
  34. # Detailed information about service hr_ora10g is listed below
  35. # You can directly Save the following content as a configuration file (manual operation), equivalent to using crs_profile
  36. [Email protected]: ~> Crs_stat-P ora. ora10g. hr_ora10g.ora10g1.srv
  37. Name = ora. ora10g. hr_ora10g.ora10g1.srv
  38. Type = Application
  39. Action_script =/u01/Oracle/DB/bin/racgwrap
  40. Active_placement = 0
  41. Auto_start = restore
  42. Check_interval = 0
  43. Description = CRS application for service member
  44. Failover_delay = 0
  45. Failure_interval = 0
  46. Failure_threshold = 0
  47. Hosting_members = bo2dbp bo2dbs
  48. Optional_resources = ora. ora10g. ora10g2. Inst
  49. Placement = restricted
  50. Required_resources =
  51. Restart_attempts = 0
  52. Script_timeout = 600
  53. Start_timeout = 0
  54. Stop_timeout = 0
  55. Uptime_threshold = 7d
  56. Usr_ora_alert_name =
  57. Usr_ora_check_timeout = 0
  58. Usr_ora_connect_str =/As sysdba
  59. Usr_ora_debug = 0
  60. Usr_ora_disconnect = false
  61. Usr_ora_flags =
  62. Usr_ora_if =
  63. Usr_ora_inst_not_shutdown =
  64. Usr_ora_lang =
  65. Usr_ora_netmask =
  66. Usr_ora_open_mode =
  67. Usr_ora_opi = false
  68. Usr_ora_pfile =
  69. Usr_ora_preconnect = none
  70. Usr_ora_srv =
  71. Usr_ora_start_timeout = 0
  72. Usr_ora_stop_mode = immediate
  73. Usr_ora_stop_timeout = 0
  74. Usr_ora_vip =
  75. 4. Use the crs_profile command to create a resource configuration file
  76. [Email protected]: ~> Crs_profile-create ora. ora10g. hr_ora10g.ora10g1.srv-T Application
  77. [Email protected]: ~> CD/u01/Oracle/CRS
  78. [Email protected]:/u01/Oracle/CRS> ls
  79. Admin auth demo init lib log mesg profile public Script Template trace
  80. [Email protected]:/u01/Oracle/CRS> Cd public
  81. # It is located at $ ora_crs_home/CRS/public by default. You can see the full name of the included resource and end with the CAP suffix.
  82. [Email protected]:/u01/Oracle/CRS/Public> ls
  83. Action_scr.scr ora. ora10g. hr_ora10g.ora10g1.srv.cap
  84. # View the generated resource configuration file
  85. [Email protected]:/u01/Oracle/CRS/Public> More ora. ora10g. hr_ora10g.ora10g1.srv.cap
  86. Name = ora. ora10g. hr_ora10g.ora10g1.srv
  87. Type = Application
  88. # Note: The content output by action_script is different from that output by using crs_stat-P.
  89. Action_script =/u01/Oracle/CRS/public/ora. ora10g. hr_ora10g.ora10g1.srv.scr
  90. Active_placement = 0
  91. Auto_start = restore
  92. Check_interval = 60
  93. Description = ora. ora10g. hr_ora10g.ora10g1.srv
  94. Failover_delay = 0
  95. Failure_interval = 0
  96. Failure_threshold = 0
  97. Hosting_members =
  98. Optional_resources =
  99. Placement = balanced
  100. Required_resources =
  101. Restart_attempts = 1
  102. Script_timeout = 60
  103. Start_timeout = 0
  104. Stop_timeout = 0
  105. Uptime_threshold = 7d
  106. Usr_ora_alert_name =
  107. Usr_ora_check_timeout = 0
  108. Usr_ora_connect_str =/As sysdba
  109. Usr_ora_debug = 0
  110. Usr_ora_disconnect = false
  111. Usr_ora_flags =
  112. Usr_ora_if =
  113. Usr_ora_inst_not_shutdown =
  114. Usr_ora_lang =
  115. Usr_ora_netmask =
  116. Usr_ora_open_mode =
  117. Usr_ora_opi = false
  118. Usr_ora_pfile =
  119. Usr_ora_preconnect = none
  120. Usr_ora_srv =
  121. Usr_ora_start_timeout = 0
  122. Usr_ora_stop_mode = immediate
  123. Usr_ora_stop_timeout = 0
  124. Usr_ora_vip =
  125. # If the root account is used, the generated file will be located in $ ora_crs_home/CRS/Profile
  126. # Files generated by non-root users are located in $ ora_crs_home/CRS/Public
  127. 5. Use crs_unregister to remove resources
  128. [Email protected]: ~> Crs_unregister ora. ora10g. hr_ora10g.ora10g1.srv
  129. CRS-0214: cocould not unregister resource 'ora. ora10g. hr_ora10g.ora10g1.srv '. # The system prompts that the resource cannot be removed because the current resource is start
  130. # Stop the resource
  131. [Email protected]: ~> Crs_stop ora. ora10g. hr_ora10g.ora10g1.srv
  132. Attempting to stop 'ora. ora10g. hr_ora10g.ora10g1.srv 'on member 'bo2dbp'
  133. Stop of 'ora. ora10g. hr_ora10g.ora10g1.srv 'on member 'bo2dbp' succeeded.
  134. # The resource is successfully removed again.
  135. [Email protected]: ~> Crs_unregister ora. ora10g. hr_ora10g.ora10g1.srv
  136. # The following crs_stat cannot be used to view the removed resource.
  137. [Email protected]: ~> Crs_stat ora. ora10g. hr_ora10g.ora10g1.srv
  138. CRS-0210: cocould not find resource 'ora. ora10g. hr_ora10g.ora10g1.srv '.
  139. 6. Use crs_register to register resources to CRS
  140. [Email protected]: ~> Crs_register ora. ora10g. hr_ora10g.ora10g1.srv
  141. Action Script '/u01/Oracle/CRS/public/ora. ora10g. hr_ora10g.ora10g1.srv.scr' does not exist! # The submitted script file does not exist.
  142. CRS-0213: cocould not register resource 'ora. ora10g. hr_ora10g.ora10g1.srv '.
  143. # Use the previously viewed script path to replace the content of action_script in the current everywhere File
  144. [Email protected]: ~> VI/u01/Oracle/CRS/public/ora. ora10g. hr_ora10g.ora10g1.srv.cap
  145. # The resource is successfully registered again.
  146. [Email protected]: ~> Crs_register ora. ora10g. hr_ora10g.ora10g1.srv
  147. # The following uses crs_stat to view the newly registered resource. Its State is offline.
  148. [Email protected]: ~> Crs_stat ora. ora10g. hr_ora10g.ora10g1.srv
  149. Name = ora. ora10g. hr_ora10g.ora10g1.srv
  150. Type = Application
  151. Target = offline
  152. State = offline
  153. # Author: Robinson
  154. # Blog: http://blog.csdn.net/robinson_0612
  155. # Use crs_start to start the resource
  156. [Email protected]: ~> Crs_start ora. ora10g. hr_ora10g.ora10g1.srv
  157. Attempting to start 'ora. ora10g. hr_ora10g.ora10g1.srv 'on member 'bo2dbp'
  158. Start of 'ora. ora10g. hr_ora10g.ora10g1.srv 'on member 'bo2dbp' succeeded.
  159. # When checking again, both target and state are online
  160. [Email protected]: ~> Crs_stat ora. ora10g. hr_ora10g.ora10g1.srv
  161. Name = ora. ora10g. hr_ora10g.ora10g1.srv
  162. Type = Application
  163. Target = online
  164. State = online on bo2dbp ---> reprinted on: http://blog.csdn.net/leshami/article/details/8239031

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.