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 初学 目录
mongodb 初学 索引 啦啦啦 MongoDB 教程 NoSQL 简介 MongoDB 简介 Windows 平台安装 MongoDB Linux平台安装MongoDB mongodb 在 Ubu ...
- spring mvc处理方法返回方式
Model: package org.springframework.ui; import java.util.Collection; import java.util.Map; public int ...
- CentOS-6.4 安装 Memcached
1.准备文件 cd /usr/src 最新版下载地址 :http://code.google.com/p/memcached/downloads/list wget http://memcached. ...
- 不作死就不会死,微软强行插入NO-IP
微软啊微软,你这是何苦来着. 事情经过大致是这样的,微软向美国法院提出起诉No-IP名下22个常用的子域名被恶意软件的作者滥用,要求法官裁定由微软接管No-IP名下的这22个子域名,以便其可以过滤恶意 ...
- 如何构建日均千万PV Web站点 (三) Sharding
其实国内许多大型网站为了应对日益复杂的业务场景,通过使用分而治之的手段将整个网站业务分成不同的产品线,比如说国内那些大型购物交易网站它们都将自己的网站首页.商铺.订单.买家.卖家等拆分不同的产品线,分 ...
- N76E003的学习之路(ADC简单小例程篇)
N76E003内嵌12位逐次逼近寄存器型(SAR)的模拟数字转换器(ADC).模数转换模块负责将管脚上的模拟信号转换为12位二进制数据.N76E003支持8通道单端输入模式.内部带隙电压(band-g ...
- 操作系统定期定时执行python脚本
1. Windows 控制面板 --> 管理工具 -->任务计划程序 --> 创建任务 接下来就是设置执行的时机以及脚本路径等 1>>常规 设置任务名称描述,以及是否执行 ...
- 查看linux系统类型、版本、位数
如何查看LINUX操作系统是多少位的 方法1: 查看linux是不是64位的命令! file /sbin/init 结果会出来 xx bit 方法二: # getconf LONG_BIT32getc ...
- 【LeetCode OJ】Search Insert Position
题目:Given a sorted array and a target value, return the index if the target is found. If not, return ...
- c++学习笔记——个单词转换的map程序详解
实现功能:给定一个string,将它转换为另一个string.程序输入是两个文件,第一个文件保存转换规则,第二个文件为将要进行转换的文本. IDE:Windows7+VS2013 #include & ...