数据库备份
oracle dba要做到:
提前消除一些错误原因
增加平均失败时间(MTBF)the mean time between failure
建立高级别的硬件冗余
提高数据库的可用性(RAC and ORACLE STREAMS)
利用合理的初始化参数文件和可用的备份来减少平均恢复时间MTTR(the mean time to recover)
利用归档的redo log和Date guard standby databases来尽亮减少和消除提交的事务的损失
control files 包括所有的数据文件的列表和利用rman备份的信息
redo files是同步数据文件
CKPT和DBwn
the falsh recoery area是Oracle在10g中引入了闪回区(flash recovery area)的概念,用以简化和完善备份,但是闪回区同样需要精心规划和设置。
控制文件
空间文件是一个非常重要的文件,有控制文件的恢复比较的简单,但是没有控制文件的恢复是困难的需要高深的技术。
内容:
A control file contains the following entries:
? Database name and identifier 数据库名字和ID号
? Time stamp of database creation 数据库的时间戳
? Tablespace names 表空间的名字
? Names and locations of data files and redo log files 数据文件和重做日志文件位置和名字
? Current redo log file sequence number 当前的重做日志文件的序列号
? Checkpoint information 检查点的信息
? Begin and end of undo segments UNDO段的起始和中断
? Redo log archive information 重做日志归档信息
? Backup information 备份信息
When you add a new file to the database or relocate a file, an Oracle server process immediately
updates the information in the control file. Back up the control file after any structural
changes. The log writer (LGWR) process updates the control file with the current log sequence
number. CKPT updates the control file with the recent checkpoint information. When the database
is in ARCHIVELOG mode, the archiver (ARCn) processes update the control file with information
such as the archive log filename and log sequence number.
要对控制文件多重化
要对数据库进行多加控制文件
1)SQL>SHUTDOWN NORMAL
2) 复制control files
cp /u02/oradata/ord/control02.ctl /u04/oradate/ord/control04.ctl
3)修改初始化参数文件的内容
4)SQL>startup
利用spfile多重控制文件
1)SQL>ALTER SYSTEM SET CONTROL_FILES =
‘/ora01/oradata/MYDB/ctrlMYDB01.ctl’,
‘ /ora02/oradata/MYDB/ctrlMYDB02.ctl’,
‘ /ora03/oradata/MYDB/ctrlMYDB03.ctl’,
‘ /ora04/oradata/MYDB/ctrlMYDB04.ctl’ SCOPE=SPFILE;
2)SQL>SHUTDOWN NORMAL
3)cp复制控制文件
4)SQL>STARTUP
CHECKPOINT
During a checkpoint, CKPT updates the control file and the header of the datafiles to reflect the last successful transaction by recording the last system change number (SCN). The SCN, which is a number sequentially assigned to each transaction in the database, is also recorded in the control file against the datafile name that is taken offline or made read-only.
A checkpoint is an event that flushes the modified data from the buffer cache to the disk and updates the control file and datafiles.
提前检查点,可以减少MTTR
如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!
赞5
添加新评论0 条评论