以下脚本可以用于收集介质恢复诊断信息(recovery_info.sql):
--- begin [recovery_info.sql] ---define spoolfile = &1spool &spoolfilealter session set nls_date_format = 'YYYY-MM-DD HH24:MI:SS';alter session set timed_statistics = true;alter session set max_dump_file_size = UNLIMITED;set feedback onset term onset wrap onset trimspool onset pagesize 1000set linesize 100set numwidth 10select to_char(sysdate) start_time from dual;column host_name format a20 truselect instance_name, host_name, version, status, startup_time from v$instance;set echo onselect * from v$database;select * from v$controlfile;select * from v$tablespace;select * from v$datafile;select * from v$datafile_header;select * from v$tempfile;select * from v$thread;select * from v$log;select * from v$logfile;select * from v$archived_log;alter session set events 'immediate trace name file_hdrs level 3';alter session set events 'immediate trace name redohdr level 3';set echo offPrompt;Prompt Output file name is:;define spoolfilePrompt;Prompt ALERT.LOG and TRACE FILES are located in:;column host_name format a12 trucolumn name format a20 trucolumn value format a60 truselect distinct i.host_name, p.name, p.value from v$instance i, v$parameter p where p.name like '%_dump_dest'   and p.name != 'core_dump_dest';select to_char(sysdate) end_time from dual;spool offexit--- end [recovery_info.sql] ---