Oracle备份恢复之逻辑备份
exp
交互模式:导出scott用户下的emp表。
[oracle@localhost ~]$ exp
Export: Release 10.2.0.1.0 - Production on Thu Nov 27 12:27:45 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Username: scott
Password:
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Enter array fetch buffer size: 4096 >
Export file: expdat.dmp > /u01/oracle/text.dmp
(2)U(sers), or (3)T(ables): (2)U > T
Export table data (yes/no): yes >
Compress extents (yes/no): yes >
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
About to export specified tables via Conventional Path ...
Table(T) or Partition(T:P) to be exported: (RETURN to quit) > emp
. . exporting table EMP 14 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
Table(T) or Partition(T:P) to be exported: (RETURN to quit) >
Export terminated successfully with warnings.
命令行模式:导出scott用户下的emp表。导出多张表需要用,或空格分隔开。
[oracle@localhost ~]$ exp scott/tiger file=/u01/oracle/test1.dmp tables=emp
Export: Release 10.2.0.1.0 - Production on Thu Nov 27 12:33:33 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 14 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.
按照方案的形式把scott用户下的数据全部导出。
[oracle@localhost ~]$ exp scott/tiger file=/u01/oracle/test9.dmp owner=scott
Export: Release 10.2.0.1.0 - Production on Thu Nov 27 12:37:02 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user SCOTT
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user SCOTT
About to export SCOTT's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export SCOTT's tables via Conventional Path ...
. . exporting table BONUS 0 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table DEPT 4 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table EMP 14 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table SALGRADE 5 rows exported
EXP-00091: Exporting questionable statistics.
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully with warnings.
用sys用户导出scott用户下所有数据。
[oracle@localhost ~]$ exp \'sys/tiger as sysdba\' file=/u01/oracle/test8.dmp owner=scott
Export: Release 10.2.0.1.0 - Production on Thu Nov 27 12:42:11 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user SCOTT
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user SCOTT
About to export SCOTT's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export SCOTT's tables via Conventional Path ...
. . exporting table BONUS 0 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table DEPT 4 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table EMP 14 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table SALGRADE 5 rows exported
EXP-00091: Exporting questionable statistics.
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully with warnings.
如果到处文件过大,可以指定多个导出文件。
>exp scott/tiger file=/u01/oracle/test1.dmp,/u01/oracle/test2.dmp filesize=1g tables=emp dept log=/u01/oracle/20141128.log
[oracle@localhost ~]$ exp scott/tiger file=/u01/oracle/test1.dmp,/u01/oracle/test2.dmp filesize=1g tables=emp dept log=/u01/oracle/20141128.log
Export: Release 10.2.0.1.0 - Production on Thu Nov 27 12:51:18 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 14 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table DEPT 4 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.
使用具备dba权限的用户进行全库导出。
exp \'sys/tiger@orcl as sysdba\' file=/u01/oracle/full.dmp,/u01/oracle/fulll.dmp filesize=100m full=y
参数文件导出:
[oracle@localhost oracle]$ vi p1
[oracle@localhost oracle]$ exp parfile p1
[oracle@localhost oracle]$ vi p1
userid=scott/tiger
file=/u01/oracle/pfile.dmp
tables=emp
[oracle@localhost oracle]$ exp parfile=p1
query参数导出符合的数据:
userid=scott/tiger
file=/u01/dddd.dmp
tables=emp
query='where deptno in (10,20)'
imp
表不存在导入方式:imp scott/tiger file=/u01/oracle/scott.dmp tables=emp,dept
表存在的导入方式:imp scott/tiger file=/u01/scott.dmp tables=emp ignore=y
imp scott/tiger file=/u01/oracle/scott.dmp fromuser=v7hqs touser=v7hqs log=2014
将scott用户emp表导入s1用户:
imp system/tiger fromuser=scott touser=s1 file=/u01/oracle/scott.dmp tables=emp
Oracle备份恢复之逻辑备份的更多相关文章
- ORACLE数据库的备份分为物理备份和逻辑备份两种。
物理备份是将实际组成数据库的操作系统文件从一处拷贝到另一处的备份过程,通常是从磁盘到磁带.可以使用 Oracle 的恢复管理器(Recovery Manager,RMAN)或操作系统命令进行数据库的物 ...
- Oracle备份与恢复介绍(物理备份与逻辑备份) 分类: Oracle 2015-07-27 22:59 15人阅读 评论(0) 收藏
算是挺全的了,有命令有真相 原文链接:http://blog.chinaunix.net/uid-354915-id-3525989.html 一.Oracle备份方式分类: Oracle有两类备份方 ...
- Oracle备份恢复之无备份情况下恢复undo表空间
UNDO表空间存储着DML操作数据块的前镜像数据,在数据回滚,一致性读,闪回操作,实例恢复的时候都可能用到UNDO表空间中的数据.如果在生产过程中丢失或破坏了UNDO表空间,可能导致某些事务无法回滚, ...
- Oracle备份恢复之数据库备份、还原、恢复理论
备份 冷备:关闭数据库并进行数据库物理文件的拷贝过程. 热备:数据库处于open阶段时的备份,通过指令将数据库文件头锁定,然后进行物理系统拷贝,然后通过指令解冻数据文件头,解冻后通过日志文件和undo ...
- Oracle备份恢复之rman备份oracle数据库
备份需求和rman备份 oracle数据库的备份相关问答: 1)备份时数据库处于何种状态? 备份时数据库处于OPEN状态,这样数据库可以正常工作. 2)备份的数据备份在什么地方? 备份在本地磁盘. 3 ...
- MySQL数据备份之逻辑备份工具mysqldump
#前言:我们知道对数据进行备份很重要,出现非正常操作可以进行对数据进行恢复,下面我们就来使用一下mysql数据库自带的一个逻辑备份工具mysqldump 1.简单概述 #mysqldump:mysql ...
- 说明Oracle数据库逻辑备份和物理备份的方式。
说明Oracle数据库逻辑备份和物理备份的方式. 解答:Oracle备份包括逻辑备份和物理备份. 1).逻辑备份 数据库的逻辑备份包含读一个数据库记录集和将记录集写入文件. a.输出(Export)输 ...
- 用数据泵技术实现逻辑备份Oracle 11g R2 数据泵技术详解(expdp impdp)
用数据泵技术实现逻辑备份 from:https://blog.csdn.net/weixin_41078837/article/details/80618916 逻辑备份概述 逻辑备份时创建数据库对象 ...
- oracle中的冷热备份
oracle有四种备份方法:冷备份.热备份.RMAN备份.逻辑备份. 其中冷备份和热备份都是用操作系统命令对oracle文件直接进行拷贝, 不同的是冷备份是把数据库关闭后再备份,备份过程中也要关闭数据 ...
随机推荐
- MongoDB(六)-- 集群搭建
一.集群介绍 sharding通过将数据集分布于多个也称作分片(shard)的节点上来降低单节点的访问压力.每个分片都是一个独立的数据库,所有的分片组合起来构成一个逻辑上的完整意义的数据库.因此,分片 ...
- 第1章 Ansible 简介
1. Ansible 优点 (1) 易读的语法:Ansible使用playbook作为配置管理脚本,playbook是基于YAML开发的,是一种易于读写的数据格式(2) 远程主机无须安装任何依赖:被A ...
- Unity Animation需要Inspector右键打开Debug模式,然后勾选Legacy,最后再Inspector右键打开Normal
- AESDK开发之UI消息响应
UI创建: 在该入口下 case PF_Cmd_PARAMS_SETUP: //.... break; 必须在末尾指定UI数目,UI数目一般是枚举,如果和枚举长度不一致也会报错.所以最好是直接修改枚举 ...
- C++程序中调用其他exe可执行文件方法
在编程过程中有个需求,点击某个按钮需要弹出系统的声音控制面板.在网上查了下代码中调用其他exe程序或者打开其他文件的方法. 自己借鉴网上的文章稍微总结下,加深下印象,也给方便自己用. 在代码中调用其他 ...
- PHP 中文字符串截取
$str = "abcdef啊啊吧啊"; function my_sub($str, $st ,$len){ $ret = ""; for( $st; $len ...
- C# - 获取类中属性的名称
用反射控制的,不过获取属性名称的方法,用方法形式获取的,不知道消耗大不大 using System; using System.Collections.Generic; using System.Li ...
- thinkphp5.0 输入变量
可以通过Request对象完成全局输入变量的检测.获取和安全过滤,支持包括$_GET.$_POST.$_REQUEST.$_SERVER.$_SESSION.$_COOKIE.$_ENV等系统变量,以 ...
- <转>ML 相关算法参考
转自 国内外网站如果你想搜索比较新颖的机器学习资料或是文章,可以到以下网站中搜索,里面不仅包括了机器学习的内容,还有许多其它相关领域内容,如数据科学和云计算等.InfoWord:http://www. ...
- 【MATLAB】评价二值分割结果的函数
根据PASCAL challenges的标准:intersection-over-union score,所写的matlab评价程序,处理二值图像. 其思想即分割结果与Ground Trueth的交集 ...