{"id":1337,"date":"2017-07-06T22:52:13","date_gmt":"2017-07-07T01:52:13","guid":{"rendered":"https:\/\/zmsolution.laraclaud.com.br\/?p=1337"},"modified":"2017-07-06T23:37:16","modified_gmt":"2017-07-07T02:37:16","slug":"ora-00701-object-necessary-for-warmstarting-database-cannot-be-altered","status":"publish","type":"post","link":"http:\/\/zmsolution.com\/ora-00701-object-necessary-for-warmstarting-database-cannot-be-altered\/","title":{"rendered":"ORA-00701: object necessary for warmstarting database cannot be altered"},"content":{"rendered":"

Um Probleminha bem legal, Uma Base sem archivelog com um bloco corrompido o que fazer?<\/p>\n

Bem se fosse uma tabela qualquer apenas isolar\u00edamos o bloco com o\u00a0dbms_repair<\/strong>.<\/p>\n

Mais se esse objeto corrompido fosse a\u00a0tabela obj$<\/strong>\u00a0do esquema sys?<\/strong><\/p>\n

Se fossemos utilizar o\u00a0dbms_repair\u00a0<\/strong>daria:<\/p>\n

ERROR at line 1:<\/p>\n

ORA-00701: object necessary for warmstarting database cannot be altered<\/p>\n

ORA-06512: at “SYS.DBMS_REPAIR”, line 419<\/p>\n

ORA-06512: at line 1<\/p>\n

Mais como isolar esse bloco e deixar o acesso a essa tabela funcionando corretamente?<\/p>\n

SQL*Plus: Release 10.2.0.4.0 – Production on Wed Feb 12 16:45:11 2014<\/p>\n

Copyright (c) 1982, 2007, Oracle. \u00a0All Rights Reserved.<\/p>\n

Connected to:<\/p>\n

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production<\/p>\n

With the Partitioning, Real Application Clusters, OLAP, Data Mining<\/p>\n

and Real Application Testing options<\/p>\n

SQL> select \/*+full(obj$)*\/ count(*) from obj$;<\/p>\n

select \/*+full(obj$)*\/ count(*) from obj$<\/p>\n

*<\/p>\n

ERROR at line 1:<\/p>\n

ORA-01578: ORACLE data block corrupted (file # 1, block #\u00a087367)<\/p>\n

ORA-01110: +DG15\/unihm\/datafile\/system.456.831649887′<\/p>\n

SQL> exec dbms_repair.skip_corrupt_blocks(‘SYS’,’OBJ$’);<\/p>\n

BEGIN dbms_repair.skip_corrupt_blocks(‘SYS’,’OBJ$’); END;<\/p>\n

*<\/p>\n

ERROR at line 1:<\/p>\n

ORA-00701: object necessary for warmstarting database cannot be altered<\/p>\n

ORA-06512: at “SYS.DBMS_REPAIR”, line 419<\/p>\n

ORA-06512: at line 1<\/p>\n

SQL> set pages 100<\/p>\n

SQL> SELECT * FROM BOOTSTRAP$ WHERE SQL_TEXT LIKE ‘%OBJ$%’;<\/p>\n

LINE# \u00a0 \u00a0 \u00a0 OBJ#<\/p>\n

———- ———-<\/p>\n

SQL_TEXT<\/p>\n

——————————————————————————–<\/p>\n

18 \u00a0 \u00a0 \u00a090724<\/p>\n

CREATE TABLE OBJ$(“OBJ#” NUMBER NOT NULL,”DATAOBJ#” NUMBER,”OWNER#” NUMBER NOT N<\/p>\n

ULL,”NAME” VARCHAR2(30) NOT NULL,”NAMESPACE” NUMBER NOT NULL,”SUBNAME” VARCHAR2(<\/p>\n

30),”TYPE#” NUMBER NOT NULL,”CTIME” DATE NOT NULL,”MTIME” DATE NOT NULL,”STIME”<\/p>\n

DATE NOT NULL,”STATUS” NUMBER NOT NULL,”REMOTEOWNER” VARCHAR2(30),”LINKNAME” VAR<\/p>\n

CHAR2(128),”FLAGS” NUMBER,”OID$” RAW(16),”SPARE1″ NUMBER,”SPARE2″ NUMBER,”SPARE3<\/p>\n

” NUMBER,”SPARE4″ VARCHAR2(1000),”SPARE5″ VARCHAR2(1000),”SPARE6″ DATE) PCTFREE<\/p>\n

10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE ( \u00a0INITIAL 16384 NEXT 106496 MINEX<\/p>\n

TENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 90724 EXTENTS (FILE 1 BLOCK 94<\/p>\n

505))<\/p>\n

Edite o arquivo pfile e adicione o evento<\/strong><\/p>\n

event=”10231 trace name context forever, level 10″<\/p>\n

SQL> startup pfile=’\/tmp\/pfile_new’ force<\/p>\n

ORACLE instance started.<\/p>\n

Total System Global Area \u00a0622149632 bytes<\/p>\n

Fixed Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a02230912 bytes<\/p>\n

Variable Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 398460288 bytes<\/p>\n

Database Buffers \u00a0 \u00a0 \u00a0 \u00a0 \u00a0213909504 bytes<\/p>\n

Redo Buffers \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a07548928 bytes<\/p>\n

Database mounted.<\/p>\n

Database opened.<\/p>\n

SQL> select \/*+full(obj$)*\/ count(*) from obj$;<\/p>\n

COUNT(*)<\/p>\n

———-<\/p>\n

74503<\/p>\n

Espero ter ajudado, Ate a pr\u00f3xima!<\/p>\n","protected":false},"excerpt":{"rendered":"

Um Probleminha bem legal, Uma Base sem archivelog com um bloco corrompido o que fazer? Bem se fosse uma tabela qualquer apenas isolar\u00edamos o bloco com o\u00a0dbms_repair. Mais se esse objeto corrompido fosse a\u00a0tabela obj$\u00a0do esquema sys? Se fossemos utilizar o\u00a0dbms_repair\u00a0daria: ERROR at line 1: ORA-00701: object necessary for warmstarting database cannot be altered ORA-06512: at “SYS.DBMS_REPAIR”, line 419 ORA-06512: at line 1 Mais como isolar esse bloco e deixar o acesso a essa tabela[…]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[21],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/posts\/1337"}],"collection":[{"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/comments?post=1337"}],"version-history":[{"count":0,"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/posts\/1337\/revisions"}],"wp:attachment":[{"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/media?parent=1337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/categories?post=1337"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/tags?post=1337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}