`
YY_MM_DD
  • 浏览: 16091 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Oracle 冷备份

阅读更多

SQL> select count(*) from tiny.ftest;

  COUNT(*)
----------
       200

--------------我在这个时间点冷备份了我的数据文件(时间点1)

SQL> insert  into tiny.ftest select rownum from dual connect by rownum<=100;

已创建100行。

SQL> commit;

提交完成。

SQL> select count(*) from tiny.ftest;

  COUNT(*)
----------
       300

SQL> alter tablespace tiny offline;

表空间已更改。

---------我在这个时间点删除了数据文件

SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup mount;
ORACLE 例程已经启动。

Total System Global Area  192937984 bytes
Fixed Size                  1248044 bytes
Variable Size             138413268 bytes
Database Buffers           50331648 bytes
Redo Buffers                2945024 bytes
数据库装载完毕。
---------我把上面的备份的数据文件拷贝过来

SQL> recover datafile 'E:\oracle\product\10.2.0\oradata\myorcl\tiny01.dbf';
完成介质恢复。
SQL> alter database open;

数据库已更改。

SQL> alter tablespace tiny online;

表空间已更改。

SQL> select count(*) from tiny.ftest;

  COUNT(*)
----------
       300

SQL>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics