How to check database recovery status ORA-1195

本文详细阐述了在使用Oracle9i数据库时遇到ORA-1195错误时的排查步骤及解决方法,包括如何检查数据库状态、确定是否需要进行介质恢复、通过SQL*Plus运行关键查询并上传生成的日志文件,最终实现数据库恢复。

DBA Notes: 2012/01/20

Cheng Li

(Database: Oracle 9i, OS: AIX)

 

How to check database recovery status ORA-1195

 

Following is the meaning of the error message

Error: ORA 1195 
Text: online backup of file needs more recovery to be consistent 
-------------------------------------------------------------------------------
Cause: An incomplete recovery session was started, but an insufficient number 
of redo logs were applied to make the file consistent.
The reported file is an online backup that must be recovered to the 
time the backup ended.
Action: Either apply more redo logs until the file is consistent or restore 
the file from an older backup and repeat the recovery.
For more information about online backup, see the index entry "online 
backups" in the ..
So looks like it needs your Current redo log
Please try the following :-

SQL>Select * from v$log;

Find the group which is current

SQL>Select * from v$Logfile ;

FInd the member name associated with the Current group

SQL>Recover database using backup controlfile until cancel ;

Now when prompted for recovery Enter the Member name for the Current Group and hit enter

If it gives you a Message 
LOG APPLIED and media recovery complete
Then try the open resetlogs

if it still fails upload
In order to get a complete picture of the database as it relates to restore/recovery, please run the following queries via SQL*Plus as sys or a sysdba user. Upload the generated spool file, query1.txt, via this service request. The instance only need be mounted. You may cut / paste the following output including the comments into SQL*Plus: 

-- Start of queries 

column first_change# format 9999999999999999
column checkpoint_change# format 9999999999999999
column resetlogs_change# format 9999999999999999
set pagesize 100 linesize 132 echo on 

spool recover_status 

alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS'; 

select sysdate from dual; 


select file#, status, fuzzy, checkpoint_time, checkpoint_change#, 
resetlogs_change#, resetlogs_time from v$datafile_header; 


select status, checkpoint_change#, 
to_char(checkpoint_time, 'DD-MON-YYYY HH24:MI:SS') 
as checkpoint_time, count(*) from v$datafile_header
group by status, checkpoint_change#, checkpoint_time
order by status, checkpoint_change#, checkpoint_time; 

select * from v$backup; 

select * from v$recover_file; 

select * from v$log; 

select * from v$logfile; 



select HXFIL File#, HXFNM, FHTYP Type, HXERR Validity, 
FHSCN SCN, FHSTA status, FHRBA_SEQ Sequence from X$KCVFH; 

select fhsta, count(*) from x$kcvfh group by fhsta order by fhsta; 

select a.FECPC, b.FHCCC, a.FENUM from X$KCCFE a, X$KCVFH b where b.HXFIL= a. FENUM and a.FECPC < b.FHCCC;

select fhrba_seq, count(*) from x$kcvfh group by fhrba_seq order by fhrba_seq; 


-- Check the checkpoint_change number of the controlfile for one thing. 
-- Often helpful in determining up to what point the recovery must be taken,
-- what time this controlfile was last updated, etc. 

select dbid, name, 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-RRRR HH24:MI:SS') controlfile_time, 
resetlogs_change#, resetlogs_time, prior_resetlogs_change#, prior_resetlogs_time 
from v$database; 
spool off
Upload the spool file


Reference:

V$RECOVER_FILE

This view displays the status of files needing media recovery.

Column

Datatype

Description

FILE#

NUMBER

File identifier number

ONLINE

VARCHAR2(7)

This column is obsolete and maintained for backward compatibility. The value of this column is always equal to the value in ONLINE_STATUS.

ONLINE_STATUS

VARCHAR2(7)

Online status (ONLINE, OFFLINE)

ERROR

VARCHAR2(18)

Why the file needs to be recovered: NULL if reason unknown, or OFFLINE NORMAL if recovery not needed

CHANGE#

NUMBER

SCN where recovery must start

TIME

DATE

Time of SCN when recovery must start

http://web.njit.edu/info/oracle/DOC/backup.102/b14191/osbackup007.htm#BRADV204

http://docs.oracle.com/cd/B28359_01/server.111/b28310/start005.htm

 

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26136400/viewspace-715138/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26136400/viewspace-715138/

【顶级EI完美复现】电力系统碳排放流的计算方法【IEEE 14节点】(Matlab代码实现)内容概要:本文介绍了名为《【顶级EI完美复现】电力系统碳排放流的计算方法【IEEE 14节点】(Matlab代码实现)》的技术文档,核心内容是基于IEEE 14节点电力系统模型,利用Matlab实现碳排放流的精确计算方法。该方法通过建立电力系统中各节点的功率流动与碳排放之间的映射关系,实现对电能传输过程中碳足迹的追踪与量化分析,属于电力系统低碳调度与碳流管理领域的关键技术。文中强调“顶级EI完美复现”,表明其算法和仿真结果具有较高的学术严谨性和可重复性,适用于科研验证与教学演示。; 适合人群:电力系统、能源与动力工程、电气工程及其自动化等相关专业的研究生、科研人员以及从事电力系统低碳化、碳排放核算工作的技术人员。; 使用场景及目标:①用于电力系统碳排放流理论的学习与仿真验证;②支撑含新能源接入的电力系统低碳调度、碳交易、绿色电力溯源等课题的研究;③为撰写高水平学术论文(如EI/SCI期刊)提供可靠的代码基础和技术参考。; 阅读建议:读者应具备电力系统分析、Matlab编程的基础知识,建议结合电力系统潮流计算、节点导纳矩阵等前置知识进行学习,并通过调整系统参数和运行方式,深入理解碳排放流的分布规律与影响因素。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值