首页 >> 中药大全

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

中药大全  2021年09月06日  浏览:3 次

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

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

[oracle@jumper eygle]$ cp l k

[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 bytes

Fixed Size 452064 bytes

Variable Size bytes

Database Buffers 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 l l.n

[oracle@jumper eygle]$ mv k l

碳交易市场的建立给相关企业带来的影响不容忽视。业内预计 [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 bytes

Fixed Size 452064 bytes

Variable Size bytes

Database Buffers bytes

Redo Buffers 667648 bytes

Database mounted.

SQL alter session set events \'immediate trace name file_hdrs level 10\';

Session altered.

SQL !

我们看控制文件的信息(选择一个文件):

DATA FILE #4:

(name #4) /opt/oracle/oradata/eygle/f

creation size=0 block size=8192 status=0xe head=4 tail=4 dup=1

tablespace 4, index=4 krfil=4 prev_file=0

unrecoverable scn: 0x0000. 01/01/1988 00:00:00

Checkpoint cnt:61 scn: 0x0000.002acb1e 08/11/2006 10:44:38

Stop scn: 0x0000.002acb1e 08/11/2006 10:44:38

Creation Checkpointed at scn: 0x0000.d 06/06/2006 09:41:54再看数据文件头信息:

FILE HEADER:

Software vsn==0x, Compatibility Vsn==0x

Db ID==0x53e79778, Db Name=\'EYGLE\'

Activation ID=0=0x0

Control Seq=989=0x3dd, File size=1280=0x500

File Number=4, Blksiz=8192, File Type=3 DATA

Tablespace #4 - EYGLE rel_fn:4

Creation at scn: 0x0000.d 06/06/2006 09:41:54

Backup taken at scn: 0x0000. 01/01/1988 00:00:00 thread:0

reset logs count:0x232bee1f scn: 0x0000.0007c781 recovered at 08/11/2006 10:11:26

status:0x0 root dba:0x chkpt cnt: 64 ctl cnt:63

begin-hot-backup file size: 0

Checkpointed at scn: 0x0000.002acb98 08/11/2006 10:46:24我们注意到数据文件的chkpt cnt: 64 要大约控制文件的Checkpoint cnt:61,也就是说控制文件是旧的。

此时尝试打开数据库就会出现如下错误:

[oracle@jumper udump]$ sqlplus \"/ as sysdba\"

SQL*Plus: Release 9.2.0.4.0 - Production on Fri Aug 11 10:51:20 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production

With the Partitioning option

JServer Release 9.2.0.4.0 - Production

SQL alter database open;

alter database open

*

ERROR at line 1:

ORA-01122: database file 1 failed verification check

ORA-01110: data file 1: \'/opt/oracle/oradata/eygle/f\'

ORA-01207: file is more recent than controlfile - old controlfile

Oracle告诉我们,控制文件是旧的。此时我们可以通过重建控制文件或者从旧的数据备份开始恢复。

查看本文来源

长沙前列腺炎治疗费用多少钱
必奇蒙脱石散妈咪爱思密达哪个好
成都哪里有不孕不育医院
友情链接