通過這個指令碼,可以看到資料檔案的資訊,找到恢復需要的日誌等等
col file# format 999
col status format 999
col error format a10
col tablespace_name format a10
col datafile format a40
col name format a30
set pagesize 200
set linesize 180
set pause off
set serveroutput on
set feedback on
set echo on
set numformat 999999999999999
column today new_val dt
select to_char( sysdate, 'yyyy-mm-dd-hh24-mi' ) today from dual;
spool d:\recovery_info_&dt.log
select group#,bytes,archived,first_change#,sequence#,status from v$log;
select file#, status,checkpoint_change#,last_change# from v$datafile;
select file#, recover, fuzzy, checkpoint_change# from v$datafile_header;
select group#,substr(member,1,60) from v$logfile;
select * from v$recover_file;
select checkpoint_change#,resetlogs_change#,controlfile_change# from v$database;
select distinct status from v$backup;
select hxfil filenumber,fhsta status,fhscn scn,fhrba_seq sequence from x$kcvfh;
select * from v$recovery_log;
select recid,sequence#,first_change#,next_change# from v$log_history;
select distinct (fuzzy) from v$datafile_header;
select file#, status, error, recover, tablespace_name, name
from v$datafile_header
where recover = 'yes' or (recover is null and error is not null);
select file#,status$,crscnbas from file$;
select name ,scnbas from ts$;
spool off
系統資料檔案和資訊
include 分別通過uid和使用者名稱獲取與指定使用者相關的passwd資訊 成功返回指標,出錯返回null struct passwd getpwuid uid t uid struct passwd getpwnam const char name passwd結構可以儲存 etc pass...
2 3 4 控制檔案與資料檔案頭資訊
資料庫mount階段 sql alter session set events immediate trace name file hdrs level 10 檢視trace檔案位置 sql select value from v diag info where name default trace...
系統資料檔案和資訊之組檔案
unix組檔案 posix.1稱其為組資料庫 包含了表6 3中所示的字段。這些字段包含在中所定義的group結構中。表6 3 etc group檔案中的字段 欄位gr mem是乙個指標陣列,其中每個指標各指向乙個屬於該組的使用者名稱。該陣列以空指標結尾。可以用下列兩個由posix.1定義的函式來檢視...