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文件直接进行拷贝, 不同的是冷备份是把数据库关闭后再备份,备份过程中也要关闭数据 ...
随机推荐
- bat批处理设置静态、动态、ping、查看网络配置
@echo off :startIP set /p source=S or D or C or P or E: echo source:%source% if /i "%source%&qu ...
- my-small.ini、my-medium.ini、my-large.ini、my-huge.ini文件的作用
安装完mysql之后或者是下载的免安装版解压之后,默认是没有my.ini文件的.但是,有几个类似的文件,如my-small.ini.my-medium.ini.my-large.ini.my-huge ...
- flexbox常用布局左右固定,中间自适应
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name ...
- commons-beanutils的使用
commons-beanutils是通过内省来完成的. 需要两个包: commons-beanutils-1.8.3.jar commons-logging-1.1.1.jar JavaBean类: ...
- mac 卸载idea
卸载MAC中的IDEA Intellij 首先在应用里面右键移动到垃圾桶 然后使用命令行: cd Users/xxx/Library/ 上面的xxx对应你的用户名,然后输入 rm -rf Logs/I ...
- 32位win7+vs2008编译mysql 5.6.22源码并安装
以下这部分安装说明是来自http://www.2cto.com/database/201407/316681.html的win7+vs2010源码编译mysql,文章最后会说明用vs2008编译遇见的 ...
- Web负载均衡与分布式架构
参考帖子: Web负载均衡的几种实现方式 大型网站架构系列:负载均衡详解(上) DNS 原理入门 解决nginx负载均衡的session共享问题 什么是消息队列 Java应用架构的演化之路 Java ...
- Nginx/LVS/HAProxy负载均衡软件的优缺点
一般对负载均衡的使用是随着网站规模的提升根据不同的阶段来使用不同的技术.具体的应用需求还得具体分析,如果是中小型的Web应用,比如日PV小于1000万,用Nginx就完全可以了:如果机器不少,可以用D ...
- linux添加静态路由
1.使用route命令,查看本机路由直接输入route回车即可.route 命令参数: add 增加路由 del 删除路由 -net 设置到某个网段的路由 -host 设置到 ...
- linux 文件编码问题
iconv -f UTF- -t gb18030 file_input -o file_output 上述命令不一定有用. 大概了解下文件编码,和vim里面的编码情况. 1 字符编码基础知识 字符编码 ...