- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
9#
发表于 2012-2-6 15:44:37
执行以下脚本, 并贴出输出- select * from DBA_DB_LINKS
- spool results01.txt
- set echo on feedback on time on timing on pagesize 100 linesize 80 numwidth 13
- show user
- alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS';
- select * from v$version;
- select to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS') as current_date from dual;
- column name format a30
- column value format a49
- select name, value from v$parameter where isdefault='FALSE' order by 1;
- column parameter format a30
- column value format a49
- select * from v$nls_parameters order by parameter;
- column name format a10
- select dbid, name,
- to_char(created, 'DD-MON-YYYY HH24:MI:SS') created,
- open_mode, log_mode,
- to_char(checkpoint_change#, '999999999999999') as checkpoint_change#,
- controlfile_type,
- to_char(controlfile_change#, '999999999999999') as controlfile_change#,
- to_char(controlfile_time, 'DD-MON-YYYY HH24:MI:SS') controlfile_time,
- to_char(resetlogs_change#, '999999999999999') as resetlogs_change#,
- to_char(resetlogs_time, 'DD-MON-YYYY HH24:MI:SS') resetlogs_time
- from v$database;
- select * from v$instance;
- archive log list;
- select * from v$thread order by thread#;
- select * from v$log order by first_change#;
- column member format a45
- select * from v$logfile;
- column name format a79
- select '#' || ts.name || '#' as tablespace_name, ts.ts#,
- '#' || df.name || '#' as filename, df.file#, df.status, df.enabled, df.creation_change#,
- to_char(df.creation_time, 'DD-MON-YYYY HH24:MI:SS') as creation_time,
- to_char(df.checkpoint_change#, '999999999999999') as checkpoint_change#,
- to_char(df.checkpoint_time, 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time,
- to_char(df.offline_change#, '999999999999999') as offline_change#,
- to_char(df.online_change#, '999999999999999') as online_change#,
- to_char(df.online_time, 'DD-MON-YYYY HH24:MI:SS') as online_time,
- to_char(df.unrecoverable_change#, '999999999999999') as online_change#,
- to_char(df.unrecoverable_time, 'DD-MON-YYYY HH24:MI:SS') as online_time,
- to_char(df.bytes, '9,999,999,999,990') as bytes, block_size
- from v$datafile df, v$tablespace ts
- where ts.ts# = df.ts#
- and ( df.status <> 'ONLINE'
- or df.checkpoint_change# <> (select checkpoint_change# from v$database) );
- select '#' || ts.name || '#' as tablespace_name, ts.ts#,
- '#' || dh.name || '#' as filename, dh.file#, dh.status, dh.error, dh.
- fuzzy, dh.creation_change#,
- to_char(dh.creation_time, 'DD-MON-YYYY HH24:MI:SS') as creation_time,
- to_char(dh.checkpoint_change#, '999999999999999') as checkpoint_change#,
- to_char(dh.checkpoint_time, 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time,
- to_char(dh.resetlogs_change#, '999999999999999') as resetlogs_change#,
- to_char(dh.resetlogs_time, 'DD-MON-YYYY HH24:MI:SS') as resetlogs_time,
- to_char(dh.bytes, '9,999,999,999,990') as bytes
- from v$datafile_header dh, v$tablespace ts
- where ts.ts# = dh.ts#
- and ( dh.status <> 'ONLINE'
- or dh.checkpoint_change# <> (select checkpoint_change# from v$database) );
- select * from v$tempfile;
- select HXFIL File_num,substr(HXFNM,1,60) file_name, FHTNM tablespace_name,
- FHTYP type, HXERR validity,
- FHSCN SCN, FHTIM SCN_Time, FHSTA status,
- FHTHR Thread, FHRBA_SEQ Sequence
- from X$KCVFH
- --where HXERR > 0
- order by HXERR, FHSTA, FHSCN, HXFIL;
- column error format a15
- select error, fuzzy, status, checkpoint_change#,
- to_char(checkpoint_time, 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time,
- count(*)
- from v$datafile_header
- group by error, fuzzy, status, checkpoint_change#, checkpoint_time
- order by checkpoint_change#, checkpoint_time;
- select * from V$INSTANCE_RECOVERY;
- select * from v$recover_file order by change#;
- select * from dba_tablespaces where status <> 'ONLINE';
- SELECT * FROM database_properties order by property_name;
- select *
- from X$KCCLH, (select min(checkpoint_change#) df_min_scn,
- min(checkpoint_change#) df_max_scn
- from v$datafile_header
- where status='ONLINE') df
- where LHLOS in (select first_change# from v$log)
- or df.df_min_scn between LHLOS and LHNXS
- or df.df_max_scn between LHLOS and LHNXS;
复制代码 |
|