zoukankan      html  css  js  c++  java
  • Transporting Data Between Database

    image

    image

    The Export utility can provide a logical backup of:

    • Database objects
    • A tablespace
    • An entire database

    The Import utility is used to read a valid Export file for moving data into a database. Redo log history cannot be applied to objects that are imported from an export file, therefore data loss may occur, but can be minimized. The DBA can use the Export and Import utilites to complement normal operating system backups by using them to :

    • Create a historical archive of a database object or entire database; for example, when a schema is modified to support changing business requirements.
    • Save table definitions in a binary file. This may be useful for creating and maintaining a baseline of a given schema structure.
    • Move data from one Oracle database version to another, such as upgrading from Oracle8i to Oracle9i.

    Export (导出的文件, 只能 Import 这个工具读取)

    运行方法:

    • command-line entries
    • Interactive Export prompts (我们系统)
    • Parameter files
    • Oracle Enterprise Manage

    另外, 如果你想使用 Export, 你必须具有如下权限:

    CREATE SESSION, EXP_FULL_DATABASE

    image

    command-line 运行模式:

    操作系统提示符: exp hr/hr tables = (employees, departments) rows=y file=exp1.dmp   -- 注意, 这里不指定文件路径, 那么就是执行命令的当前目录, 也可以直接指定目录

                        exp hr/hr tables = ( employees, departments) rows=y file = ‘/u01/exp/exp1.dmp’

    导出hr 用户的所有object :

        exp system/manager owner=hr directy  -- 如果没有指定file, 那么默认的文件名是 expdat.dmp.

    导出 tablespace ts_employees 下的所有 objects, 并同时声称日志文件记录在 ts_employees.log 里

        exp system/manager transport_tablespace=y tablespaces=(ts_employees) log=ts_employees.log

    includes all definitions and data modified in the database since the last cumulative or complete export. 

        exp system/manager FULL=y INCTYPE=cumulative FILE=expcum1.dmp

    imageimage

    image

    parameter file:

    exp parfile=exp_param.txt

    其中 param.txt 为:

      USERID=hr/hr

      TABLES=(employees, departments)

      FILE=exp_one.dmp

      DIRECT=y

    image

    Import

    image

    image

    image

    command-line 运行方式:

    imp hr/hr tables=(employees, departments) rows=y file=exp1.dmp  -- 这样会首先创建这两个 table, 然后再进行插入

    imp system/manager FROMUSER=hr file=exp2.dmp

    imp system/manager transport_tablespace=y TABLESPACES=ts_employees

    imageimage

    image

    image

  • 相关阅读:
    RabbitMQ In JAVA 介绍及使用
    JSON Web Token 入门教程
    char* 与 char[] 的区别
    C++ namespace的用法
    启动其他APK的Activity方法 (转至http://www.cnblogs.com/lijunamneg/archive/2013/02/26/2934060.html)
    Android多任务切换与Activity启动模式SingleTask之间关系的分析
    对SingleTask和TaskAffinity的理解(转至 http://www.2cto.com/kf/201311/254450.html)
    正在运行的android程序,按home键之后退回到桌面,在次点击程序图标避免再次重新启动程序解决办法
    大牛的博客
    Androidpn 简单实现及分析
  • 原文地址:https://www.cnblogs.com/moveofgod/p/3606957.html
Copyright © 2011-2022 走看看