Sie sind auf Seite 1von 4

Diagnostic Scenario

sqlplus / as sysdba
select object_id from dba_objects where owner='SCOTT' and
object_name='TABJMW';
create table scott.tabjmw(c number) tablespace users;
variable obj number;
begin
select object_id into :obj from dba_objects where
owner='SCOTT' and object_name='TABJMW';
end;
/
print obj;
update tab$ set cols=1001 where obj#=:obj;
commit;
Use EM to trigger a health check on the data dictionary.
On the Advisor Central page, click the Checkers tab.
On the Checker tabbed page, click Dictionary Integrity Check.
On the Run Dictionary Integrity Check page, specify a Run Name DictCheck
and click O!.
"ack to the Advisor Central Checkers page, you should see a Confirmation
message indicating that your check ran successfully.
#elect your DictCheck run and click Details
$his takes you to the Run Details %indings tabbed page, &here you can see some
Data Corruption. In particular, you should see the follo&ing finding '#()
dictionary health check invalid column number * on ob+ect $A", failed.-
.ou should see a ne& critical alert /Data %ailure0 for the previously detected
corruption in the Alerts section of the 1ome page.
How would you get a report about the previous finding using SQL!lus
sqlplus / as sysdba
set long 100000
select dbms_hm.get_run_report('DictCheck') rom dual!
%lush your shared pool and buffer cache first, and then e2it and reconnect as the SYS
user. %rom a #()34lus session connected as the SYS user, e2ecute the follo&ing
statement select * from scott.tabjmw;
sqlplus / as sysdba
alter system lush shared_pool!
alter system lush buer_cache!
e"it
sqlplus / as sysdba
select # rom scott.tab$m%!
"ack to your ter#inal window$ locate your incident and your health check report in
%D&.
cd &'()C*+_,)-+/diag/rdbms/orcl/orcl
cd incident
ls
cd ../..
cd hm
ls
Use %D&'( to locate your incident and proble# infor#ation
& adrci
set homepath diag/rdbms/orcl/orcl
sho% homes
sho% incidents
sho% problem
Use Enterprise Manager to package your proble# )uickly
%rom the 4roblem Details page, click (uick 4ackage in the Investigate and
Resolve section.
select No in front of the '#end to Oracle #upport- entry.
Use %D&'( to deter#ine the list of e*isting packages
adrci
set homepath diag/rdbms/orcl/orcl
query ips_package
+i* the issue
After analy5ing the problem, you kno& that the number of columns for TABJMW is
&rong in TAB$. %i2 the issue by updating TAB$ and close your problem.
sqlplus / as sysdba
variable obj number;
begin
select object_id into :obj from dba_objects where
owner='SCOTT' and object_name='TABJMW';
end;
/
print obj;
update tab$ set cols=1 where obj#=:obj;
commit;
Use Enterprise Manager to close your incident.
&epairing "lock 'orruption
run this script to create and corrupt a tablespace
.6block7corrupt.sh
block_corrupt. sh
select * from bc.departments
select * from bc.regions
$ rman target / nocatalog
backup tablespace tbsbc;
list ailure detail!
sqlplus sys/oracle as sysdba
select ailure_id. time_detected. description. impacts
rom /&0(_1)0*2(+ %here impacts like '3,C3'!
&epairing "lock 'orruption
RMAN> ad4ise ailure all!
SQL> select # rom /&0(_(+5)0(!
RMAN> repair ailure!
sqlplus sys/oracle as sysdba
SQL> select # rom bc.regions!

Das könnte Ihnen auch gefallen