oracle dblink 连接gp,dblink 丢失 - Oracle数据库管理 - Oracle数据库数据恢复、性能优化来问问AskMaclean - ParnassusData诗檀软件旗下网...

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;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值