{"id":1064,"date":"2020-10-31T11:33:38","date_gmt":"2020-10-31T10:33:38","guid":{"rendered":"http:\/\/rootfan.com\/?p=1064"},"modified":"2022-04-04T00:12:37","modified_gmt":"2022-04-03T22:12:37","slug":"cambiar-procesos-oracle-rac","status":"publish","type":"post","link":"https:\/\/rootfan.com\/es\/change-processes-oracle-rac\/","title":{"rendered":"C\u00f3mo Cambiar el Par\u00e1metro de Procesos en Oracle 19c RAC"},"content":{"rendered":"<p>En este post voy a mostrarte como cambiar el par\u00e1metro processes en una base de datos Oracle RAC.<\/p>\n\n\n\n<p>Puedes utilizar este mismo m\u00e9todo para cualquier par\u00e1metro RAC que requiera que las instancias se reinicien para que el cambio tenga efecto.<\/p>\n\n\n\n<p>En una situaci\u00f3n ideal, s\u00f3lo modificar\u00edas los par\u00e1metros del sistema y luego parar\u00edas y arrancar\u00edas cada instancia.<\/p>\n\n\n\n<p>Pero esto no funcion\u00f3 como esperaba porque algunos servicios s\u00f3lo estaban disponibles en un nodo y no en el otro, as\u00ed que tuve que reubicarlos y volver a intentarlo.<\/p>\n\n\n\n<p>Te mostrar\u00e9 todos los detalles en este post.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Puedes comprobar los l\u00edmites actuales del proceso Oracle con esta consulta<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\nSELECT INST_ID, RESOURCE_NAME, CURRENT_UTILIZATION, MAX_UTILIZATION, LIMIT_VALUE\nFROM GV$RESOURCE_LIMIT\nWHERE RESOURCE_NAME IN ( &#039;sessions&#039;, &#039;processes&#039;);\n\n   INST_ID RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION LIMIT_VALU\n---------- ------------------------------ ------------------- --------------- ----------\n         1 processes                                      120             250        700\n         1 sessions                                       128             255       1074\n         3 processes                                      699             700        700\n         3 sessions                                       708             711       1074\n<\/pre><\/div>\n\n\n<p>Primero conecto y compruebo los valores actuales.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\nset lines 200\ncolumn NAME format a40\ncolumn VALUE format a50\n\nselect INST_ID,NAME,VALUE from gv$parameter\nwhere NAME in (&#039;processes&#039;,&#039;sessions&#039;)\norder by 2,1;\n<\/pre><\/div>\n\n\n<p>Una vez que tenga los valores, quiero cambiar el par\u00e1metro procesos a 1500.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\nsqlplus \/ as sysdba\n\nalter system set processes=1500 scope=spfile sid=&#039;*&#039;;\n<\/pre><\/div>\n\n\n<p>As\u00ed que ahora lo ideal ser\u00eda tener que parar y reiniciar cada una de las 2 instancias RAC.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl stop instance -d XI002PRO -i XI002PRO1\nPRCD-1315 : failed to stop instances for database XI002PRO\nPRCR-1014 : Failed to stop resource ora.xi002pro.db\nPRCR-1065 : Failed to stop resource ora.xi002pro.db\nCRS-2974: unable to act on resource &#039;ora.xi002pro.db&#039; on server &#039;node1&#039; because that would require stopping or relocating resource &#039;ora.xi002pro.xi002pro_bkup1.svc&#039; but the appropriate force flag was not specified\n<\/pre><\/div>\n\n\n<p>As\u00ed que comprob\u00e9 todos los servicios de esa base de datos.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl status service -d XI002PRO\nService XI002PROPLUGSVC is running on instance(s) XI002PRO1\nService xi002pro_bkup1 is running on instance(s) XI002PRO1\nService xi002pro_bkup2 is running on instance(s) XI002PRO3\nService XI002PROSVC is running on instance(s) XI002PRO1\n<\/pre><\/div>\n\n\n<p>Se quejaba del servicio xi002pro_bkup1.<\/p>\n\n\n\n<p>Intent\u00e9 trasladar todos los servicios al nodo 3.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl relocate service -db XI002PRO -service XI002PROPLUGSVC -oldinst XI002PRO1 -newinst XI002PRO3\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl relocate service -db XI002PRO -service xi002pro_bkup1 -oldinst XI002PRO1 -newinst XI002PRO3\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl relocate service -db XI002PRO -service XI002PROSVC -oldinst XI002PRO1 -newinst XI002PRO3\n<\/pre><\/div>\n\n\n<p>Y luego volv\u00ed a intentarlo<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl stop instance -d XI002PRO -i XI002PRO1\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl start instance -d XI002PRO -i XI002PRO1\n<\/pre><\/div>\n\n\n<p>Esta vez funcion\u00f3.<\/p>\n\n\n\n<p>Ahora necesito reubicar los servicios de nuevo en el nodo 1.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl relocate service -db XI002PRO -service XI002PROPLUGSVC -oldinst XI002PRO3 -newinst XI002PRO1\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl relocate service -db XI002PRO -service xi002pro_bkup1 -oldinst XI002PRO3 -newinst XI002PRO1\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl relocate service -db XI002PRO -service XI002PROSVC -oldinst XI002PRO3 -newinst XI002PRO1\n<\/pre><\/div>\n\n\n<p>Todav\u00eda hay un servicio que estaba en el nodo 3 y que tengo que mover al nodo 1 para iniciar y detener la instancia.<\/p>\n\n\n\n<p>Pero tuve a otro problema.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl relocate service -db XI002PRO -service xi002pro_bkup2 -oldinst XI002PRO3 -newinst XI002PRO1\nPRCR-1106 : Failed to relocate resource ora.xi002pro.xi002pro_bkup2.svc from node xfpcon01db03 to node node1\nPRCR-1089 : Failed to relocate resource ora.xi002pro.xi002pro_bkup2.svc.\nCRS-2717: Server &#039;node1&#039; is not in any of the server pool(s) hosting resource &#039;ora.xi002pro.xi002pro_bkup2.svc&#039;\n<\/pre><\/div>\n\n\n<p>El problema es que este servicio xi002pro_bkup2 s\u00f3lo tiene preferencia en el nodo 3 y ni siquiera est\u00e1 disponible en el nodo 1, como puedes ver con esto.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl config service -db XI002PRO -service xi002pro_bkup2\nService name: xi002pro_bkup2\nServer pool:\nCardinality: 1\nDisconnect: false\nService role: PRIMARY\nManagement policy: AUTOMATIC\nDTP transaction: false\nAQ HA notifications: false\nGlobal: false\nCommit Outcome: false\nFailover type:\nFailover method:\nTAF failover retries:\nTAF failover delay:\nConnection Load Balancing Goal: LONG\nRuntime Load Balancing Goal: NONE\nTAF policy specification: NONE\nEdition:\nPluggable database name:\nMaximum lag time: ANY\nSQL Translation Profile:\nRetention: 86400 seconds\nReplay Initiation Time: 300 seconds\nSession State Consistency:\nGSM Flags: 0\nService is enabled\nPreferred instances: XI002PRO3\nAvailable instances:\n<\/pre><\/div>\n\n\n<p>As\u00ed que a\u00f1ad\u00ed este servicio como disponible en el nodo 1 y preferido en el nodo 3 y volv\u00ed a comprobarlo.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl modify service -db XI002PRO -service xi002pro_bkup2 -modifyconfig -preferred XI002PRO3 -available XI002PRO1\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl config service -db XI002PRO -service xi002pro_bkup2                                              \nService name: xi002pro_bkup2\nServer pool:\nCardinality: 1\nDisconnect: false\nService role: PRIMARY\nManagement policy: AUTOMATIC\nDTP transaction: false\nAQ HA notifications: false\nGlobal: false\nCommit Outcome: false\nFailover type:\nFailover method:\nTAF failover retries:\nTAF failover delay:\nConnection Load Balancing Goal: LONG\nRuntime Load Balancing Goal: NONE\nTAF policy specification: NONE\nEdition:\nPluggable database name:\nMaximum lag time: ANY\nSQL Translation Profile:\nRetention: 86400 seconds\nReplay Initiation Time: 300 seconds\nSession State Consistency:\nGSM Flags: 0\nService is enabled\nPreferred instances: XI002PRO3\nAvailable instances: XI002PRO1\n<\/pre><\/div>\n\n\n<p>Como se muestra arriba, ahora el servicio es preferente en el nodo 3 y est\u00e1 disponible en el nodo 1.<\/p>\n\n\n\n<p>As\u00ed que ahora puedo trasladar el servicio al nodo 1.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl relocate service -db XI002PRO -service xi002pro_bkup2 -oldinst XI002PRO3 -newinst XI002PRO1\n<\/pre><\/div>\n\n\n<p>Y luego puedo parar e iniciar la instancia en el nodo 3.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl stop instance -d XI002PRO -i XI002PRO3\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl start instance -d XI002PRO -i XI002PRO3\n<\/pre><\/div>\n\n\n<p>Ahora vuelvo a trasladar el servicio al nodo 3.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl relocate service -db XI002PRO -service xi002pro_bkup2 -oldinst XI002PRO1 -newinst XI002PRO3\n<\/pre><\/div>\n\n\n<p>Y compruebo de nuevo los servicios c\u00f3mo est\u00e1n distribuidos en cada nodo para ver si vuelven a estar como los ten\u00eda al principio.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n&#x5B;oracle@node1:XI002PRO1 ~]$ srvctl status service -d XI002PRO\nService XI002PROPLUGSVC is running on instance(s) XI002PRO1\nService xi002pro_bkup1 is running on instance(s) XI002PRO1\nService xi002pro_bkup2 is running on instance(s) XI002PRO3\nService XI002PROSVC is running on instance(s) XI002PRO1\n<\/pre><\/div>\n\n\n<p>Ahora valido que se ha aplicado el cambio en el par\u00e1metro procesos.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\nsqlplus \/ as sysdba\n\nset lines 200\ncolumn NAME format a40\ncolumn VALUE format a50\n\nselect INST_ID,NAME,VALUE from gv$parameter\nwhere NAME in (&#039;processes&#039;,&#039;sessions&#039;)\norder by 2,1;\n\n   INST_ID NAME                                     VALUE\n---------- ---------------------------------------- --------------------------------------------------\n         1 processes                                1500\n         3 processes                                1500\n         1 sessions                                 2272\n         3 sessions                                 2272\n<\/pre><\/div>\n\n\n<p>As\u00ed que todo parece ir bien.<\/p>\n\n\n\n<p>Por supuesto, si haces una preparaci\u00f3n antes de realizar la parada y arranque de cada instancia, podr\u00edas haber evitado todo esto durante la intervenci\u00f3n.<\/p>\n\n\n\n<p>Espero que te haya sido \u00fatil.<\/p>","protected":false},"excerpt":{"rendered":"<p>En este post voy a mostrarte como cambiar el par\u00e1metro processes en una base de datos Oracle RAC. Puedes usar este mismo m\u00e9todo para cualquier par\u00e1metro RAC que requiera que las instancias sean reiniciadas para que el cambio tenga efecto. En una situaci\u00f3n ideal, usted acaba de alterar el sistema los par\u00e1metros y luego ... <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/rootfan.com\/es\/change-processes-oracle-rac\/\" class=\"more-link\">Seguir leyendo<span class=\"screen-reader-text\"> \"C\u00f3mo Cambiar el Par\u00e1metro de Procesos en Oracle 19c RAC\"<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":2923,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_focus_keyword":"How to Change Processes Parameter in Oracle 19c RAC","rank_math_title":"","rank_math_description":"Change processes parameter in Oracle 19c RAC effortlessly. Optimize your database performance with this step-by-step tutorial.","rank_math_robots":"","rank_math_og_title":"","rank_math_og_description":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[31],"tags":[61,54,62],"class_list":["post-1064","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oracle","tag-processes","tag-rac","tag-srvctl"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/rootfan.com\/wp-content\/uploads\/pexels-photo-2531709.jpeg?fit=1862%2C1300&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/posts\/1064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/comments?post=1064"}],"version-history":[{"count":14,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/posts\/1064\/revisions"}],"predecessor-version":[{"id":1581,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/posts\/1064\/revisions\/1581"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/media\/2923"}],"wp:attachment":[{"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/media?parent=1064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/categories?post=1064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/tags?post=1064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}