SQL> select * from test.t;
IDX CNAME
---------- ------------------------------
1 aaaa
2 bbbb
3 cccc
RMAN> backup database include current controlfile;
Starting backup at 23-JUL-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current controlfile in backupset
input datafile fno=00001 name=C:/ORACLE/ORADATA/ORCL/SYSTEM01.DBF
input datafile fno=00015 name=C:/ORACLE/ORADATA/ORCL/UNDOTBS.DBF
input datafile fno=00011 name=C:/ORACLE/ORADATA/ORCL/ORA_BACKUP.DBF
.
.
.
input datafile fno=00009 name=C:/ORACLE/ORADATA/AUT/USERS01.DBF
input datafile fno=00003 name=C:/ORACLE/ORADATA/ORCL/CWMLITE01.DBF
input datafile fno=00008 name=C:/ORACLE/ORADATA/ORCL/TOOLS01.DBF
channel ORA_DISK_1: starting piece 1 at 23-JUL-08
channel ORA_DISK_1: finished piece 1 at 23-JUL-08
piece handle=C:/ORACLE/ORA92/DATABASE/2OJM7631_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:06
Finished backup at 23-JUL-08
Starting Control File and SPFILE Autobackup at 23-JUL-08
piece handle=C:/ORACLE/ORA92/DATABASE/C-1186183048-20080723-07 comment=NONE
Finished Control File and SPFILE Autobackup at 23-JUL-08
RMAN> exit
Recovery Manager complete.
C:/>set oracle_sid=orcl
C:/>sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.1.0 - Production on Wed Jul 23 14:16:43 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> select * from test.t;
IDX CNAME
---------- ------------------------------
1 aaaa
2 bbbb
3 cccc
SQL> delete from test.t;
3 rows deleted.
SQL> commit;
Commit complete.
SQL> select * from test.t;
no rows selected
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
C:/>rman target /
Recovery Manager: Release 9.2.0.1.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: ORCL (DBID=1186183048)
RMAN> list backup;
using target database controlfile instead of recovery catalog
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
81 Full 660M DISK 00:01:06 23-JUL-08
BP Key: 81 Status: AVAILABLE Tag: TAG20080723T141457
Piece Name: C:/ORACLE/ORA92/DATABASE/2OJM7631_1_1
Controlfile Included: Ckp SCN: 2407868 Ckp time: 23-JUL-08
List of Datafiles in backup set 81
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 2407869 23-JUL-08 C:/ORACLE/ORADATA/ORCL/SYSTEM01.DBF
3 Full 2407869 23-JUL-08 C:/ORACLE/ORADATA/ORCL/CWMLITE01.DBF
4 Full 2407869 23-JUL-08 C:/ORACLE/ORADATA/ORCL/DRSYS01.DBF
.
.
.
11 Full 2407869 23-JUL-08 C:/ORACLE/ORADATA/ORCL/ORA_BACKUP.DBF
15 Full 2407869 23-JUL-08 C:/ORACLE/ORADATA/ORCL/UNDOTBS.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
82 Full 1M DISK 00:00:01 23-JUL-08
BP Key: 82 Status: AVAILABLE Tag:
Piece Name: C:/ORACLE/ORA92/DATABASE/C-1186183048-20080723-07
SPFILE Included: Modification time: 10-JUL-08
RMAN> shutdown immediate;
database closed
database dismounted
Oracle instance shut down
RMAN> startup mount;
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
RMAN> run{
2> allocate channel t1 type disk;
3> set until scn 2407869;
4> restore database;
5> recover database;
6> alter database open resetlogs;
7> release channel t1;
8> }
allocated channel: t1
channel t1: sid=11 devtype=DISK
executing command: SET until clause
Starting restore at 23-JUL-08
channel t1: starting datafile backupset restore
channel t1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to C:/ORACLE/ORADATA/ORCL/SYSTEM01.DBF
restoring datafile 00003 to C:/ORACLE/ORADATA/ORCL/CWMLITE01.DBF
restoring datafile 00004 to C:/ORACLE/ORADATA/ORCL/DRSYS01.DBF
restoring datafile 00005 to C:/ORACLE/ORADATA/ORCL/EXAMPLE01.DBF
restoring datafile 00006 to C:/ORACLE/ORADATA/ORCL/INDX01.DBF
restoring datafile 00007 to C:/ORACLE/ORADATA/ORCL/ODM01.DBF
restoring datafile 00008 to C:/ORACLE/ORADATA/ORCL/TOOLS01.DBF
restoring datafile 00009 to C:/ORACLE/ORADATA/AUT/USERS01.DBF
restoring datafile 00010 to C:/ORACLE/ORADATA/ORCL/XDB01.DBF
restoring datafile 00011 to C:/ORACLE/ORADATA/ORCL/ORA_BACKUP.DBF
restoring datafile 00015 to C:/ORACLE/ORADATA/ORCL/UNDOTBS.DBF
channel t1: restored backup piece 1
piece handle=C:/ORACLE/ORA92/DATABASE/2OJM7631_1_1 tag=TAG20080723T141457 params=NULL
channel t1: restore complete
Finished restore at 23-JUL-08
Starting recover at 23-JUL-08
starting media recovery
media recovery complete
Finished recover at 23-JUL-08
database opened
released channel: t1
RMAN> exit
Recovery Manager complete.
C:/>sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.1.0 - Production on Wed Jul 23 14:23:48 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> select * from test.t;
IDX CNAME
---------- ------------------------------
1 aaaa
2 bbbb
3 cccc
Oracle9i中RMAN实验(windows下)
最新推荐文章于 2025-08-09 13:59:05 发布