글수 57
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@edrsr4p1 ~]$ cd /backup2
[oracle@edrsr4p1 backup2]$ more fileCopy.sh
cp /u01/app/oracle/oradata/ORCL/datafile/aa.tmp /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_475fkgj8_.dbf /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_475fgwyz_.dbf /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_475fgwxx_.dbf /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_48f1wz1m_.tmp /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_475fgx9t_.dbf /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_47zzb3n8_.dbf /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_48hq1ght_.dbf /backup2
[oracle@edrsr4p1 backup2]$
[oracle@edrsr4p1 backup2]$ ./fileCopy.sh
[oracle@edrsr4p1 backup2]$ ls
aa.tmp o1_mf_system_475fgwxx_.dbf
fileCopy.sh o1_mf_temp_48f1wz1m_.tmp
fileList.txt o1_mf_undotbs1_475fgx9t_.dbf
o1_mf_example_475fkgj8_.dbf o1_mf_users_47zzb3n8_.dbf
o1_mf_sysaux_475fgwyz_.dbf o1_mf_users_48hq1ght_.dbf
[oracle@edrsr4p1 backup2]$
[oracle@edrsr4p1 backup2]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 24 13:16:29 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 159383552 bytes
Fixed Size 1218268 bytes
Variable Size 88082724 bytes
Database Buffers 67108864 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> host date
Thu Jul 24 13:13:50 KST 2008
SQL> drop table scott.emp;
Table dropped.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@edrsr4p1 ~]$ cp /backup2/* /u01/app/oracle/oradata/ORCL/datafile/
[oracle@edrsr4p1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 24 13:16:29 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 159383552 bytes
Fixed Size 1218268 bytes
Variable Size 88082724 bytes
Database Buffers 67108864 bytes
Redo Buffers 2973696 bytes
Database mounted.
SQL> alter session set nls_date_format='yyyy-mm-dd:hh24:mi:ss';
Session altered.
SQL> recover database until time '2008-07-24:13:13:50';
Media recovery complete.
SQL> alter database open resetlogs;
Database altered.
SQL> select count(*) from scott.emp;
COUNT(*)
----------
14
SQL>
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@edrsr4p1 ~]$ cd /backup2
[oracle@edrsr4p1 backup2]$ more fileCopy.sh
cp /u01/app/oracle/oradata/ORCL/datafile/aa.tmp /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_475fkgj8_.dbf /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_475fgwyz_.dbf /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_475fgwxx_.dbf /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_48f1wz1m_.tmp /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_475fgx9t_.dbf /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_47zzb3n8_.dbf /backup2
cp /u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_48hq1ght_.dbf /backup2
[oracle@edrsr4p1 backup2]$
[oracle@edrsr4p1 backup2]$ ./fileCopy.sh
[oracle@edrsr4p1 backup2]$ ls
aa.tmp o1_mf_system_475fgwxx_.dbf
fileCopy.sh o1_mf_temp_48f1wz1m_.tmp
fileList.txt o1_mf_undotbs1_475fgx9t_.dbf
o1_mf_example_475fkgj8_.dbf o1_mf_users_47zzb3n8_.dbf
o1_mf_sysaux_475fgwyz_.dbf o1_mf_users_48hq1ght_.dbf
[oracle@edrsr4p1 backup2]$
[oracle@edrsr4p1 backup2]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 24 13:16:29 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 159383552 bytes
Fixed Size 1218268 bytes
Variable Size 88082724 bytes
Database Buffers 67108864 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> host date
Thu Jul 24 13:13:50 KST 2008
SQL> drop table scott.emp;
Table dropped.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@edrsr4p1 ~]$ cp /backup2/* /u01/app/oracle/oradata/ORCL/datafile/
[oracle@edrsr4p1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 24 13:16:29 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 159383552 bytes
Fixed Size 1218268 bytes
Variable Size 88082724 bytes
Database Buffers 67108864 bytes
Redo Buffers 2973696 bytes
Database mounted.
SQL> alter session set nls_date_format='yyyy-mm-dd:hh24:mi:ss';
Session altered.
SQL> recover database until time '2008-07-24:13:13:50';
Media recovery complete.
SQL> alter database open resetlogs;
Database altered.
SQL> select count(*) from scott.emp;
COUNT(*)
----------
14
SQL>


