设置周期性自动执行备份脚本
首先有必要了解一下linux或者UNIX系统中的crontab命令,这个命令是用于设置周期性执行的指令。该命令从标准输入设备读取指令,并将其存放在"crontab"这个文件中,以供之后读取和执行。通常,crontab存储的指令被守护进程激活。crond是linux下的用来周期性地执行某项任务或等待某个事件的守护进程,与windows下的计划任务...
RMAN-06054: media recovery requesting unknown archived log for thread...
使用rman执行recover database 的时候出现RMAN-06054的错误提示:RMAN> recover database;Starting recover at 21-OCT-14using channel ORA_DISK_1starting media recoveryarchived log for thread 1 with sequence 1 is already on disk as file /u01/app/archivelog/dest2/1_1_861389770....
ORA-00322: log 3 of thread 1 is not current copy
使用rman进行recover database的时候出现ORA-00322的错误:RMAN> recover database;Starting recover at 21-OCT-14using channel ORA_DISK_1starting media recoveryarchived log for thread 1 with sequence 2 is already on disk as file /u01/app/archivelog/dest1/1_2_861389770.dbf...
RMAN-06403: could not obtain a fully authorized session
使用rman进行数据库恢复时出现如下错误:[oracle@localhost dbs]$ rman target / nocatalog; Recovery Manager: Release 11.2.0.1.0 - Production on Tue Oct 21 00:52:38 2014 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. connected to target database (n...
ORA-00845: MEMORY_TARGET not supported on this system
打开数据库发现如下错误:[oracle@localhost ~]$ sqlplus /nolog SQL*Plus: Release 11.2.0.1.0 Production on Tue Oct 21 00:21:56 2014 Copyright (c) 1982, 2009, Oracle. All rights reserved. @ 21-OCT-14>conn /as sysdba Connected to an idle instance. SYS@orcl2 21-...
ORA-01089: immediate shutdown in progress - no operations are permitted
今天shutdown immediate关数据库的时候出现ORA-01089: immediate shutdown in progress - no operations are permitted的错误。ps -ef|grep ora_发现oracle的各个后台进程仍然在运行着,说明数据库没有关闭成功。解决方法如下:先exit退出,重新登录:[oracle@localhost trace]$ sqlplus /nologSQL*Plus: Release 11....
ORA-00214
今天打开数据库的时候出现如下报错信息:SYS@orcl 05-SEP-14>startupORACLE instance started.Total System Global Area 849530880 bytesFixed Size 1339824 bytesVariable Size 587206224 bytesDat...
rman备份笔记
前几天听老邱的在线课程----rman备份,现在整理一下当时的笔记。rman备份原理1.rman要进行备份的数据库叫目标数据库。2.rman是一个客户端程序,需要建立到目标数据库的客户端连接,并在目标数据库上创建对应的服务器进程和session。rman输入的各个命令,从客户端传递到服务器,由服务器进程负责执行,rman只能使用专有服...
数据文件丢失的恢复(改变目录)
报错信息:SQL> startupORACLE instance started.Total System Global Area 849530880 bytesFixed Size 1339824 bytesVariable Size 562040400 bytesDatabase Buffers ...
参数文件控制文件和数据文件丢失的恢复
在做这个实验之前要保证数据库存在有效的备份。报错信息:SQL> startupORA-01078: failure in processing system parametersLRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl.ora' 由提示信息可知参数文件丢失,数据库无法nomount。于是启动rman在没有参...
oracle基于时间点的不完全恢复
下面我们做一个实验,演示如何对oracle进行基于时间点的不完全恢复(在实验之前请确保数据库具有有效备份):获取此时的时间并记录下来:SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;TO_CHAR(SYSDATE,'YY-------------------2014-08-23 00:47:49把hh用户下的h2删除:SQL> drop table h2;Ta...
oracle基于scn的不完全恢复
下面做一个实验,使用scn进行不完全恢复(做之前要确保数据库有有效备份):首先在hh用户下创建一张表h2,在表中插入数据:SQL> create table h2(id int);Table created.SQL> insert into h2 values(1);1 row created.SQL> commit;Commit complete.SQL> insert into h2 values(2);1 row created.SQL> sel...
使用_allow_resetlogs_corruption强制打开数据库
试想一下这种情况:你的数据库异常关闭了,且current日志组丢失了,更重要的是你的数据库没有备份,那么这种情况下有什么办法可以打开数据库呢?说到这,我们有必要来了解一下oracle的一个特殊的隐含参数:_allow_resetlogs_corruption这个参数如果设置成TRUE的话,那么oracle就可以强制打开数据库,忽略一致性等问题。...
丢失活动或当前日志组的恢复
我们知道current状态的日志组是oracle正在使用的日志组,也就是LGWR在写的日志组,如果这种状态的日志组丢失了,那么我们如何来恢复呢?这里要分成两种情况,一种是数据库正常关闭,一种是数据库异常关闭。如果数据库是正常关闭的,由于此时数据库已经完成了检查点,所有提交的事务都已经被写入到数据文件中,所以不存在...
丢失非活动日志组的恢复
报错信息:SQL> startupORACLE instance started.Total System Global Area 849530880 bytesFixed Size 1339824 bytesVariable Size 520097360 bytesDatabase Buffers ...
磁盘损坏导致数据文件丢失的恢复
如果磁盘损坏了,那么我们怎么将备份的数据文件恢复到新的位置呢?下面我们做个试验:报错信息:SQL> shutdown immediate;ORA-01116: error in opening database file 6ORA-01110: data file 6: '/u01/app/oracle/oradata/orcl/test01.dbf'ORA-27041: unable to open fileLinux Error: 2: No such file or directory...
数据文件丢失的恢复
报错信息:SQL> startupORACLE instance started.Total System Global Area 849530880 bytesFixed Size 1339824 bytesVariable Size 511708752 bytesDatabase Buffers ...
ORA-16014: log 1 sequence# 4 not archived, no available destinations
今天重新建了一个库,在执行alter system switch logfile;时一直夯在那里,于是查看警报日志文件,有如下信心:Thu Aug 21 19:25:30 2014Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_arc0_15710.trc:ORA-19504: failed to create file "/u01/app/archivelog/dest2/1_4_856205535.dbf"ORA-27040: ...
没有自动备份的情况下控制文件全部丢失的恢复
报错信息:SQL> startupORACLE instance started.Total System Global Area 849530880 bytesFixed Size 1339824 bytesVariable Size 515903056 bytesDatabase Buffers ...
控制文件全部丢失的恢复
报错信息:SQL> startupORACLE instance started.Total System Global Area 849530880 bytesFixed Size 1339824 bytesVariable Size 515903056 bytesDatabase Buffers ...