%CB%D5%C7%E0+%C3%C0%BF%D5+%B5%DA%B6%FE%BC%BE %C2%D7%C0%ED%A1%A1film %B1%AC%C8%E9%C3%C0%C9%D9%C5%AE%21%21%C6%DF%9E%81%A4%E6%A4%A6%A4%EA+%28Yuuri+Nanase 0

Litteratur Hotgirlsfilm P Private%20Movies%20Virgin%20Dreams%20%D6%F7%D1%DD Zx2 It Store Demandmetric Hot Girls Film oracle snapcf_.f/ SNAPSHOT CONTROLFILE 什么作用? | ANBOB

Litteratur Hotgirlsfilm P Private%20Movies%20Virgin%20Dreams%20%D6%F7%D1%DD Zx2 It Store Demandmetric Hot Girls Film

Store searchsearch Litteratur Demandmetric Zx2 searchsearch Demandmetric Demandmetric search Private%20Movies%20Virgin%20Dreams%20%D6%F7%D1%DD Private%20Movies%20Virgin%20Dreams%20%D6%F7%D1%DD rx Hotgirlsfilm a Litteratur 7search%8% Hotgirlsfilm sesearchrc Hotgirlsfilm B%C2%D7%C0%ED%A1%A1filmLitt Store rsearchtusearch Chinese+women+seek+men+personals+classifieds+friends+language+exchange5% Demandmetric D Litteratur 9 Hotgirlsfilm 6Psearchiaa Hotgirlsfilm esearch20 Hotgirlsfilm oi Demandmetric s%00 Demandmetric i Zx2 g Private%20Movies%20Virgin%20Dreams%20%D6%F7%D1%DD n20D Zx2 e Demandmetric msearch%2 Private%20Movies%20Virgin%20Dreams%20%D6%F7%D1%DD %D6%F%D1searchDsearch Hotgirlsfilm sesearchr Litteratur ht DRoccos%2EPower%2ESlave%28%D0%B0%B6%F1%CC%EC%CA%B9%D0%C2%C6%AC%3A%C7%E9%C9%AB%B4%F3%B5%DB%C2%DE%BF%C6%D3%EB%BA%C0%C8%E9%C3%C0%C5%AEKLK%3A%D0%D4%C5%AB%C1%A5%29ma2d Hotgirlsfilm esearchr Store c Zx2 %10 Litteratur o Hotgirlsfilm i Zx2 s Demandmetric 2 Litteratur Vsearchr Litteratur i% Hotgirlsfilm 0searchrsearcha Litteratur s Demandmetric 22% Hotgirlsfilm 6 Private%20Movies%20Virgin%20Dreams%20%D6%F7%D1%DD F%a1% Hotgirlsfilm D Zx2 Private%20Movies%20Virgin%20Dreams%20%D6%F7%D1%DD L Zx2 tsearche Zx2 at Demandmetric rsearch Zx2 Lsearchtea Store ur Hotgirlsfilm Hotgirlsfilm Psearchivt Hotgirlsfilm % Demandmetric 0ov Demandmetric e Store %2V Store rsearchi%search0 Private%20Movies%20Virgin%20Dreams%20%D6%F7%D1%DD rsearcha%A1%B6+%BF%D6%B2%C0%BE%DE%C4%F1%C9%E4%BE%AB%CD%F5+Vol%2E3%A1%B7+视频ssearch2search%6 Litteratur F Zx2 %search1% Litteratur Dsearch

结论是:
1.SNAPSHOT CONTROLFILE 不能直接copy成control file,如果数据库已经shutdown
2.可以通过rman,将SNAPSHOT CONTROLFILE 恢复成控制文件
3.如果数据库没有shutdown,可以直接copy SNAPSHOT CONTROLFILE 成控制文件,但仍需要恢复(因为他是旧的)

下面是我的测试步骤:
—————————————
查看snapshot controlfile的备份设置:
RMAN> SHOW SNAPSHOT CONTROLFILE NAME;

RMAN configuration parameters are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/u01/ora9a/product/9.2/dbs/snapcf_tt9a.f’; # default

RMAN>

下面模拟控制文件丢失的恢复
$ ls
control01.ctl cwmlite01.dbf indx01.dbf redo02.log temp01.dbf users01.dbf
control02.ctl drsys01.dbf odm01.dbf redo03.log tools01.dbf xdb01.dbf
control03.ctl example01.dbf redo01.log system01.dbf undotbs01.dbf
$ rm cont* –删除控制文件
$ ls
cwmlite01.dbf example01.dbf odm01.dbf redo02.log system01.dbf tools01.dbf users01.dbf
drsys01.dbf indx01.dbf redo01.log redo03.log temp01.dbf undotbs01.dbf xdb01.dbf
$
在控制文件被删除后,数据库还能正常操作:
SQL> insert into test(no) values(4);

1 row created.

SQL> commit;

Commit complete.

SQL> alter system switch logfile;

System altered.

SQL> alter system checkpoint;

System altered.

SQL> /

System altered.

SQL>
SQL> select no,to_char(vdate,’yyyy-mm-dd hh24:mi:ss’) from test;

NO TO_CHAR(VDATE,’YYYY-MM-DDHH24:MI:SS’)
———- ———————————————————
1 2009-02-24 10:16:09
2 2009-02-24 10:25:30
3 2009-02-24 10:26:56
4 2009-02-24 10:30:59

SQL>
重新启动数据库:
SQL> connect /as sysdba
Connected.
SQL> shutdown immediate
ORA-00210: cannot open the specified controlfile
ORA-00202: controlfile: ‘/u01/ora9a/oradata/tt9a/control01.ctl’
ORA-27041: unable to open file
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
没有了控制文件了,shutdown immediate出错
SQL>
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 320569400 bytes
Fixed Size 741432 bytes
Variable Size 285212672 bytes
Database Buffers 33554432 bytes
Redo Buffers 1060864 bytes
ORA-00205: error in identifying controlfile, check alert log for more info

SQL>
没有控制文件,数据库不能mount,现在把SNAPSHOT CONTROLFILE copy到对应目录
$ cp /u01/ora9a/product/9.2/dbs/snapcf_tt9a.f /u01/ora9a/oradata/tt9a/control01.ctl
$ cp /u01/ora9a/oradata/tt9a/control01.ctl /u01/ora9a/oradata/tt9a/control0t.ctl
$ cp /u01/ora9a/oradata/tt9a/control01.ctl /u01/ora9a/oradata/tt9a/control03.ctl
$ ls -lrt /u01/ora9a/oradata/tt9a/contr*
-rw-r—– 1 ora9a dba 1531904 Feb 24 10:36 /u01/ora9a/oradata/tt9a/control01.ctl
-rw-r—– 1 ora9a dba 1531904 Feb 24 10:36 /u01/ora9a/oradata/tt9a/control0t.ctl
-rw-r—– 1 ora9a dba 1531904 Feb 24 10:36 /u01/ora9a/oradata/tt9a/control03.ctl
$
SQL> startup
ORACLE instance started.

Total System Global Area 320569400 bytes
Fixed Size 741432 bytes
Variable Size 285212672 bytes
Database Buffers 33554432 bytes
Redo Buffers 1060864 bytes
ORA-00205: error in identifying controlfile, check alert log for more info
照样不能mount数据库
—————————————-
尝试用rman恢复控制文件:
$ rman target /

Recovery Manager: Release 9.2.0.1.0 – 64bit Production

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

connected to target database (not started)

RMAN> startup nomount;

Oracle instance started

Total System Global Area 320569400 bytes

Fixed Size 741432 bytes
Variable Size 285212672 bytes
Database Buffers 33554432 bytes
Redo Buffers 1060864 bytes

RMAN> restore controlfile from ‘/u01/ora9a/product/9.2/dbs/snapcf_tt9a.f’;

Starting restore at 24-FEB-09

using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=13 devtype=DISK
channel ORA_DISK_1: copied controlfile copy
replicating controlfile
input filename=/u01/ora9a/oradata/tt9a/control01.ctl
output filename=/u01/ora9a/oradata/tt9a/control02.ctl
output filename=/u01/ora9a/oradata/tt9a/control03.ctl
Finished restore at 24-FEB-09

RMAN> alter database mount;

database mounted

RMAN>
ok,用rman可以进行恢复,让数据mount起来
恢复数据库
RMAN> recover database;

Starting recover at 24-FEB-09
using channel ORA_DISK_1

starting media recovery

archive log thread 1 sequence 1 is already on disk as file /u01/ora9a/oradata/tt9a/redo01.log
archive log thread 1 sequence 2 is already on disk as file /u01/ora9a/oradata/tt9a/redo02.log
archive log thread 1 sequence 3 is already on disk as file /u01/ora9a/oradata/tt9a/redo03.log
archive log filename=/u01/ora9a/oradata/tt9a/redo01.log thread=1 sequence=0
archive log filename=/u01/ora9a/oradata/tt9a/redo02.log thread=1 sequence=2
archive log filename=/u01/ora9a/oradata/tt9a/redo03.log thread=1 sequence=3
media recovery complete
Finished recover at 24-FEB-09

RMAN> alter database open;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 02/24/2009 10:47:36
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

RMAN> alter database open resetlogs;

database opened

RMAN>
查看先前insert的数据:
SQL> select no,to_char(vdate,’yyyy-mm-dd hh24:mi:ss’) from test;

NO TO_CHAR(VDATE,’YYYY-MM-DDHH24:MI:SS’)
———- ———————————————————
1 2009-02-24 10:16:09
2 2009-02-24 10:25:30
3 2009-02-24 10:26:56
4 2009-02-24 10:30:59

SQL>
数据仍在,恢复成功!

=============================
下面仍是在数据库正常运行情况下,将控制文件删除,仍测试直接copy SNAPSHOT CONTROLFILE 的恢复方式:
SQL> insert into test(no) values(5);

1 row created.

SQL> commit;

Commit complete.

SQL>
SQL> !
$ pwd
/u01/ora9a/oradata/tt9a
$ ls
control01.ctl control0t.ctl example01.dbf redo01.log system01.dbf undotbs01.dbf
control02.ctl cwmlite01.dbf indx01.dbf redo02.log temp01.dbf users01.dbf
control03.ctl drsys01.dbf odm01.dbf redo03.log tools01.dbf xdb01.dbf
$ rm contr*
$ ls
cwmlite01.dbf example01.dbf odm01.dbf redo02.log system01.dbf tools01.dbf users01.dbf
drsys01.dbf indx01.dbf redo01.log redo03.log temp01.dbf undotbs01.dbf xdb01.dbf
$
$ exit

SQL> select * from v$controlfile;

STATUS
———————
NAME
——————————————————————————–

/u01/ora9a/oradata/tt9a/control01.ctl
/u01/ora9a/oradata/tt9a/control02.ctl
/u01/ora9a/oradata/tt9a/control03.ctl
SQL> select dbid from v$database;
select dbid from v$database
*
ERROR at line 1:
ORA-00210: cannot open the specified controlfile
ORA-00202: controlfile: ‘/u01/ora9a/oradata/tt9a/control01.ctl’
ORA-27041: unable to open file
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3

SQL>
没有控制文件,查询失败
现在将SNAPSHOT CONTROLFILE copy到对应目录,尝试直接恢复成控制文件:
SQL> !
$ pwd
/u01/ora9a/oradata/tt9a
$ cp /u01/ora9a/product/9.2/dbs/snapcf_tt9a.f control01.ctl
$ cp control01.ctl control02.ctl
$ cp control01.ctl control03.ctl
$ ls -lrt cont*
-rw-r—– 1 ora9a dba 1531904 Feb 24 10:55 control01.ctl
-rw-r—– 1 ora9a dba 1531904 Feb 24 10:55 control02.ctl
-rw-r—– 1 ora9a dba 1531904 Feb 24 10:55 control03.ctl
$
注意,此时不要起停数据库,否则这样恢复的控制文件仍不可用
尝试查询control file信息
SQL> select dbid from v$database;

DBID
———-
3459515476

SQL>
ok,成功
查询数据文件头信息
SQL> select CHECKPOINT_CHANGE# from v$datafile_header;
select CHECKPOINT_CHANGE# from v$datafile_header
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [2170], [], [], [], [], [], [], []

SQL>
失败
现在重新启动数据库,看看是否可以到mount状态:
SQL> shutdown immediate
ORA-00600: internal error code, arguments: [kccchb_1], [356], [353], [0], [353], [0], [], []
SQL> shutdown abort;
ORACLE instance shut down.
SQL>
SQL> startup
ORACLE instance started.

Total System Global Area 320569400 bytes
Fixed Size 741432 bytes
Variable Size 285212672 bytes
Database Buffers 33554432 bytes
Redo Buffers 1060864 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL>
ok,此时数据库可以mount起来了

SQL>
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: ‘/u01/ora9a/oradata/tt9a/system01.dbf’
提示需要恢复
SQL> recover database using backup controlfile;
ORA-00279: change 349227 generated at 02/24/2009 10:49:58 needed for thread 1
ORA-00289: suggestion : /u01/arch/1_1.dbf
ORA-00280: change 349227 for thread 1 is in sequence #1
Specify log: {}
AUTO
ORA-00328: archived log ends at change 347581, need later change 349227
ORA-00334: archived log: ‘/u01/arch/1_1.dbf’
SQL> recover database using backup controlfile;
ORA-00279: change 349227 generated at 02/24/2009 10:49:58 needed for thread 1
ORA-00289: suggestion : /u01/arch/1_1.dbf
ORA-00280: change 349227 for thread 1 is in sequence #1 gLitteratur Hotgirlsfilm P Private%20Movies%20Virgin%20Dreams%20%D6%F7%D1%DD Zx2 It Store Demandmetric Hot Girls Film oracle snapcf_.f/ SNAPSHOT CONTROLFILE 什么作用? | ANBOBi g Red%20Hot%20Fetish%20Collection%20Vol.87%20%20 A 1 vLitteratur Hotgirlsfilm P Private%20Movies%20Virgin%20Dreams%20%D6%F7%D1%DD Zx2 It Store Demandmetric Hot Girls Film oracle snapcf_.f/ SNAPSHOT CONTROLFILE 什么作用? | ANBOBb Red%20Hot%20Fetish%20Collection%20Vol.87%20%20 1 WWW+SEXY+JAPANESE+GIRLS+.COM 0