zoukankan      html  css  js  c++  java
  • Oracle Tablespace Transportation

    前提:进行表空间传输需要用户有SYSDBA的系统权限,被移动的表空间是自包含的表空间,不应有依赖于表空间外部对象的对象存在。确定是否自包含可使用系统包DBMS_TTS中的TRANSPORT_SET_CHECK过程进行检查

    例如要对表空间OLTP进行传输,

    SQL> exec dbms_tts.transport_set_check('OLTP',true,true);

    PL/SQL procedure successfully completed.

    SQL> select * from transport_set_violations;

    no rows selected

    如果有违返自包含,则会在表TRANSPORT_TABLESPACE_SET_VIOLATIONS视图,如果没有则里面没有数据。no rows selected shows the oltp tablespace is not self-contained.

    第一步:表空间变为只读

    将源数据库中移动表空间设为只读状态

    SQL> alter tablespace oltp read only;

    第二步:源数据库进行导出操作

    $expdp userid=system/oracle directory=my_test dumpfile=oltp.dump transport_tablespaces='oltp'

    第三步:把dump文件和表空间的数据库文件scp到目标主机上

    第四步:目的数据库进行导入

    $impdp  userid=system/oracle directory=my_test dumpfile=oltp.dump transport_datafiles='u01/app/oracle/oradata/OMS/oltp01.dbf'

    第五步:将源、目的数据库的表空间状态由只读改为可读写

    ALTERTABLESPACE OLTPREAD WRITE

  • 相关阅读:
    神奇的flex布局
    reset、revert、rebase
    Vue.filter过滤器
    moment.js时间格式化总结
    Vue之组件大全
    过滤器filter
    Vue之animate
    Vue之axios
    Mac OS系统上测试PHP代码前的准备工作 | 使用XAMPP搭建Apache服务器的步骤
    Python中的标识符、关键字、变量、语句、注释、模块
  • 原文地址:https://www.cnblogs.com/snake-hand/p/3148442.html
Copyright © 2011-2022 走看看