使用rman copy system表空间后,在sqlplus 中 建表 ,shutdown abort 关闭后 拷贝备份的数据文件覆盖。
发现此时数据库不需要recover 但刚刚创建的表查询不到,但可以drop 掉。
O:\>sqlplus "sys/pass as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Oct 27 15:55:50 2008
Copyright (c) 1982, 2006, Oracle.All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create table cj as select * from dualDisconnected from Oracle Database 10g
Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
O:\>
O:\>rman target sys/pass
Recovery Manager: Release 10.2.0.3.0 - Production on Mon Oct 27 15:56:06 2008
Copyright (c) 1982, 2005, Oracle.All rights reserved.
connected to target database: CJ (DBID=819428294)
RMAN> copy datafile 1 to 'F:\oracle\product\10.2.0\oradata\SYSTEM01.DBF';
Starting backup at 27-OCT-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=145 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00001 name=F:\ORACLE\PRODUCT\10.2.0\ORADATA\CJ\SYSTEM01.DBF
output filename=F:\ORACLE\PRODUCT\10.2.0\ORADATA\SYSTEM01.DBF tag=TAG20081027T15
5616 recid=18 stamp=669225396
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:26
Finished backup at 27-OCT-08
RMAN> exit
Recovery Manager complete.
O:\>sqlplus "sys/pass as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Oct 27 15:56:49 2008
Copyright (c) 1982, 2006, Oracle.All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create table aa as select * from dual;
Table created.
SQL> shutdown abort
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
O:\>copy F:\oracle\product\10.2.0\oradata\SYSTEM01.DBF F:\oracle\product\10.2.0\
oradata\CJ
Overwrite F:\oracle\product\10.2.0\oradata\CJ\SYSTEM01.DBF? (Yes/No/All): Y
1 file(s) copied.
O:\>sqlplus "sys/pass as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Oct 27 15:58:29 2008
Copyright (c) 1982, 2006, Oracle.All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area289406976 bytes
Fixed Size
1290184 bytes
Variable Size
234881080 bytes
Database Buffers 46137344 bytes
Redo Buffers
7098368 bytes
Database mounted.
Database opened.
SQL> select *From aa;
select *From aa
*
ERROR at line 1:
ORA-08103: object no longer exists
SQL>
SQL> drop table aa;
Table dropped.
SQL>
[ 本帖最后由 ignu 于 2008-10-27 16:20 编辑 ]
|