设为首页 加入收藏

TOP

大数据备份和恢复应用案例--通过分区表备份和恢复数据(四)
2014-11-23 17:32:14 来源: 作者: 【 】 浏览:156
Tags:数据备份 恢复 应用 案例 通过 分区表 备份 数据
able altered. 17:49:02 SCOTT@ prod >select segment_name,tablespace_name from user_segments 17:49:35 2 where segment_name in ('T1_TMP','T1_TMP_INDX'); SEGMENT_NAME TABLESPACE_NAME --------------------------------------------------------------------------------- ------------------------------ T1_TMP TBS1 T1_TMP_INDX TBS1_INDX 17:50:44 SYS@ prod >exec dbms_tts.transport_set_check('TBS1',true); PL/SQL procedure successfully completed. 17:51:59 SYS@ prod >select * from transport_set_violations; no rows selected 已经符合自包含条件 [oracle@RH6 data]$ expdp system/oracle directory=tbs_dir dumpfile=p1.dmp transport_tablespaces=tbs1,tbs1_indx logfile=p1.log Export: Release 11.2.0.1.0 - Production on Tue Nov 18 17:52:55 2014 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Starting "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01": system/******** directory=tbs_dir dumpfile=p1.dmp transport_tablespaces=tbs1,tbs1_indx logfile=p1.log Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK Processing object type TRANSPORTABLE_EXPORT/TABLE Processing object type TRANSPORTABLE_EXPORT/INDEX Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK Master table "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYSTEM.SYS_EXPORT_TRANSPORTABLE_01 is: /home/oracle/data/p1.dmp ****************************************************************************** Datafiles required for transportable tablespace TBS1: /dsk1/oradata/prod/tbs1.dbf Datafiles required for transportable tablespace TBS1_INDX: /dsk1/oradata/prod/tbs1_indx.dbf Job "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 17:54:17 表空间导出成功! 17:56:16 SYS@ prod >select file_name,tablespace_name from dba_data_files where tablespace_name in ('TBS1','TBS1_INDX'); FILE_NAME TABLESPACE_NAME -------------------------------------------------- ------------------------------ /dsk1/oradata/prod/tbs1.dbf TBS1 /dsk1/oradata/prod/tbs1_indx.dbf TBS1_INDX [oracle@RH6 ~]$ cp /dsk1/oradata/prod/tbs1* /home/oracle/data [oracle@RH6 ~]$ ls -lh /home/oracle/data total 21M -rw-r----- 1 oracle oinstall 92K Nov 18 17:54 p1.dmp -rw-r--r-- 1 oracle oinstall 1.4K Nov 18 17:54 p1.log -rw-r----- 1 oracle oinstall 11M Nov 18 17:57 tbs1.dbf -rw-r----- 1 oracle oinstall 11M Nov 18 17:57 tbs1_indx.dbf 然后再将表空间的数据文件进行备份,由于表空间传输,只是导出了metadata,所以数据量非常小,速度非常快。 3、数据恢复 17:58:29 SYS@ prod >drop tablespace tbs1 including contents and datafiles; Tablespace dropped. 17:58:55 SYS@ prod >drop tablespace tbs1_indx including contents and datafiles; Tablespace dropped. 17:59:12 SYS@ prod >col segment_name for a20 17:59:42 SYS@ prod >col partition_name for a10 17:59:49 SYS@ prod >col tablespace_name for a10 17:59:59 SYS@ prod >select segment_name,partition_name,tablespace_name from dba_segments 18:00:32 2 where segment_name in ('T1','T1_INDX') order by 2
首页 上一页 1 2 3 4 5 下一页 尾页 4/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Splunk会议回顾:大数据的关键是机.. 下一篇XMPP协议实现即时通讯底层书写(..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: