WEB开发网
开发学院数据库Oracle Oracle备份的控制文件和新的数据文件 阅读

Oracle备份的控制文件和新的数据文件

 2007-05-12 12:25:20 来源:WEB开发网   
核心提示:我们可以想象,如果控制文件是从备份中恢复的,Oracle备份的控制文件和新的数据文件,那么数据库在open过程中又将如何呢?首先备份控制文件,打开数据库,增进检查点:[oracle@jumper eygle]$ cp control01.ctl control01.ctl.bak[oracle@jumper eygle

我们可以想象,如果控制文件是从备份中恢复的,那么数据库在open过程中又将如何呢?

首先备份控制文件,打开数据库,增进检查点:

[oracle@jumper eygle]$ cp control01.ctl control01.ctl.bak
[oracle@jumper eygle]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Aug 11 10:46:05 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 139531744 bytes
Fixed Size          452064 bytes
Variable Size       121634816 bytes
Database Buffers      16777216 bytes
Redo Buffers         667648 bytes
Database mounted.
Database opened.
SQL> alter system checkpoint;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production

然后恢复旧的控制文件,mount数据库,转储数据文件头:

[oracle@jumper eygle]$ mv control01.ctl control01.ctl.n
[oracle@jumper eygle]$ mv control01.ctl.bak control01.ctl
[oracle@jumper eygle]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Aug 11 10:46:50 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 139531744 bytes
Fixed Size          452064 bytes
Variable Size       121634816 bytes
Database Buffers      16777216 bytes
Redo Buffers         667648 bytes
Database mounted.
SQL> alter session set events 'immediate trace name file_hdrs level 10';
Session altered.
SQL> !

1 2  下一页

Tags:Oracle 备份 控制

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接