oracle exp imp命令的使用

检查内存空间,在命令行下执行如下命令:(注意大小写)
grep MemTotal /proc/meminfo
要检查交换空间,在命令行下执行如下命令:(注意大小写)
grep SwapTotal /proc/meminfo

使用oracle命令需要设置的一些环境变量(注意设置后请重新登录才能生效)
export ORACLE_SID=corpDB(数据库的SID)
export ORACLE_HOME=/u01/oracle/product/9.2.0.4
export PATH=$PATH:$ORACLE_HOME/bin

exp导出工具将数据库中数据备份压缩成一个二进制系统文件.可以在不同OS间迁移
它有三种模式:
a. 用户模式: 导出用户所有对象以及对象中的数据;
b. 表模式: 导出用户所有表或者指定的表;
c. 整个数据库: 导出数据库中所有对象。

非交互式的导出某些表(表模式)
exp dbusername/123456 file=/usr/backup/dbname_20090812.dmp tables=(accessanalyser,usermanagement) grants=y

imp dbusername/123456 file=/usr/backup/dbname_20090812.dmp full=y
用户模式
exp dbusername/123456 file=/usr/backup/dbname_20090812.dmp owner=dbusername INDEXES=y grants=y compress=N
USERID:username/password(数据库用户名、密码)
file:指定导入导出文件路径
tables:指定导出特定表
owner:指定数据库用户(这个特定用户决定了它拥有哪些对象)
INDEXES:索引是否导出
grants:授权是否导出
compress:是否压缩

exp命令的帮助使用
exp help=y

Export: Release 9.2.0.4.0 - Production on Thu Aug 13 11:00:13 2009

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

You can let Export prompt you for parameters by entering the EXP
command followed by your username/password:

Example: EXP SCOTT/TIGER

Or, you can control how Export runs by entering the EXP command followed
by various arguments. To specify parameters, you use keywords:

Format: EXP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
Example: EXP SCOTT/TIGER GRANTS=Y TABLES=(EMP,DEPT,MGR)
or TABLES=(T1:P1,T1:P2), if T1 is partitioned table

USERID must be the first parameter on the command line.

Keyword Description (Default) Keyword Description (Default)
--------------------------------------------------------------------------
USERID username/password FULL export entire file (N)
BUFFER size of data buffer OWNER list of owner usernames
FILE output files (EXPDAT.DMP) TABLES list of table names
COMPRESS import into one extent (Y) RECORDLENGTH length of IO record
GRANTS export grants (Y) INCTYPE incremental export type
INDEXES export indexes (Y) RECORD track incr. export (Y)
DIRECT direct path (N) TRIGGERS export triggers (Y)
LOG log file of screen output STATISTICS analyze objects (ESTIMATE)
ROWS export data rows (Y) PARFILE parameter filename
CONSISTENT cross-table consistency(N) CONSTRAINTS export constraints (Y)

OBJECT_CONSISTENT transaction set to read only during object export (N)
FEEDBACK display progress every x rows (0)
FILESIZE maximum size of each dump file
FLASHBACK_SCN SCN used to set session snapshot back to
FLASHBACK_TIME time used to get the SCN closest to the specified time
QUERY select clause used to export a subset of a table
RESUMABLE suspend when a space related error is encountered(N)
RESUMABLE_NAME text string used to identify resumable statement
RESUMABLE_TIMEOUT wait time for RESUMABLE
TTS_FULL_CHECK perform full or partial dependency check for TTS
VOLSIZE number of bytes to write to each tape volume
TABLESPACES list of tablespaces to export
TRANSPORT_TABLESPACE export transportable tablespace metadata (N)
TEMPLATE template name which invokes iAS mode export

Export terminated successfully without warnings.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值