{"id":1976,"date":"2021-01-22T00:10:29","date_gmt":"2021-01-22T00:10:29","guid":{"rendered":"https:\/\/swiv.com.br\/configuring-automatic-restart-of-an-oracle-database-single-instance\/"},"modified":"2026-05-27T20:02:53","modified_gmt":"2026-05-27T19:02:53","slug":"configuring-automatic-restart-of-an-oracle-database-single-instance","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/01\/22\/configuring-automatic-restart-of-an-oracle-database-single-instance\/","title":{"rendered":"Configuring Automatic Restart of an Oracle Database (Single instance)"},"content":{"rendered":"\n<p>Neste artigo vou simular o acr\u00e9scimo de um banco Oracle no recurso do HAS (High Availability Service)\/Oracle Restart. No exemplo abaixo, vemos que n\u00e3o temos banco configurado:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;grid@oel7 ~]$ crsctl stat res -t\n--------------------------------------------------------------------------------\nName           Target  State        Server                   State details\n--------------------------------------------------------------------------------\nLocal Resources\n--------------------------------------------------------------------------------\nora.DG_DATA.dg\n               ONLINE  ONLINE       oel7                     STABLE\nora.DG_FRA.dg\n               ONLINE  ONLINE       oel7                     STABLE\nora.DG_GRID.dg\n               ONLINE  ONLINE       oel7                     STABLE\nora.DG_RECO.dg\n               ONLINE  ONLINE       oel7                     STABLE\nora.LISTENER.lsnr\n               ONLINE  ONLINE       oel7                     STABLE\nora.asm\n               ONLINE  ONLINE       oel7                     Started,STABLE\nora.ons\n               OFFLINE OFFLINE      oel7                     STABLE\n--------------------------------------------------------------------------------\nCluster Resources\n--------------------------------------------------------------------------------\nora.cssd\n      1        ONLINE  ONLINE       oel7                     STABLE\nora.diskmon\n      1        OFFLINE OFFLINE                               STABLE\nora.evmd\n      1        ONLINE  ONLINE       oel7                     STABLE\n--------------------------------------------------------------------------------\n&#x5B;grid@oel7 ~]$\n<\/pre><\/div>\n\n\n<p>Com o usu\u00e1rio que pertence \u00e0 inst\u00e2ncia do database, basta usar o utilit\u00e1rio srvctl conforme exemplo abaixo, populando com os dados necess\u00e1rios em cada par\u00e2metro:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ srvctl add database -db cortex -oraclehome \/oracle\/19.3.0\/product -domain localdomain -spfile +DG_DATA\/CORTEX\/PARAMETERFILE\/spfile.265.1039034301 -role PRIMARY -startoption OPEN -dbname cortex -policy AUTOMATIC -diskgroup &quot;DG_DATA,DG_FRA,DG_RECO&quot;\n&#x5B;oracle@oel7 ~]$\n<\/pre><\/div>\n\n\n<p>Realizando o start do banco de dados e checando o seu status:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ srvctl start database -db cortex\n&#x5B;oracle@oel7 ~]$ srvctl status database -db cortex\nDatabase is running.\n&#x5B;oracle@oel7 ~]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 19.0.0.0.0 - Production on Tue Jan 5 22:52:45 2021\nVersion 19.3.0.0.0\n \nCopyright (c) 1982, 2019, Oracle.  All rights reserved.\n \n \nConnected to:\nOracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production\nVersion 19.3.0.0.0\n \nSQL&gt; select instance_name,status from v$instance;\n \nINSTANCE_NAME    STATUS\n---------------- ------------\ncortex           OPEN\n \nSQL&gt;\n<\/pre><\/div>\n\n\n<p>Ao consultar novamente os servi\u00e7os do Oracle Restart, agora conseguimos ver que o database est\u00e1 sendo listado:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ su - grid\nPassword:\nLast login: Tue Jan  5 22:37:05 -03 2021 on pts\/0\n&#x5B;grid@oel7 ~]$ crsctl stat res -t\n--------------------------------------------------------------------------------\nName           Target  State        Server                   State details\n--------------------------------------------------------------------------------\nLocal Resources\n--------------------------------------------------------------------------------\nora.DG_DATA.dg\n               ONLINE  ONLINE       oel7                     STABLE\nora.DG_FRA.dg\n               ONLINE  ONLINE       oel7                     STABLE\nora.DG_GRID.dg\n               ONLINE  ONLINE       oel7                     STABLE\nora.DG_RECO.dg\n               ONLINE  ONLINE       oel7                     STABLE\nora.LISTENER.lsnr\n               ONLINE  ONLINE       oel7                     STABLE\nora.asm\n               ONLINE  ONLINE       oel7                     Started,STABLE\nora.ons\n               OFFLINE OFFLINE      oel7                     STABLE\n--------------------------------------------------------------------------------\nCluster Resources\n--------------------------------------------------------------------------------\nora.cortex.db\n      1        ONLINE  ONLINE       oel7                     Open,HOME=\/oracle\/19\n                                                             .3.0\/product,STABLE\nora.cssd\n      1        ONLINE  ONLINE       oel7                     STABLE\nora.diskmon\n      1        OFFLINE OFFLINE                               STABLE\nora.evmd\n      1        ONLINE  ONLINE       oel7                     STABLE\n--------------------------------------------------------------------------------\n&#x5B;grid@oel7 ~]$\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Neste artigo vou simular o acr\u00e9scimo de um banco Oracle no recurso do HAS (High Availability Service)\/Oracle Restart. No exemplo abaixo, vemos que n\u00e3o temos banco configurado: Com o usu\u00e1rio que pertence \u00e0 inst\u00e2ncia do database, basta usar o utilit\u00e1rio srvctl conforme exemplo abaixo, populando com os dados necess\u00e1rios em cada par\u00e2metro: Realizando o start [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[19],"class_list":["post-1976","post","type-post","status-publish","format-standard","hentry","category-administration","tag-oracle-database"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/1976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=1976"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/1976\/revisions"}],"predecessor-version":[{"id":9273,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/1976\/revisions\/9273"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=1976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=1976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=1976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}