oracle数据库导出并重新导入

斌斌 (给我写信) 原创博文(http://blog.csdn.net/binbinxyz),转载请注明出处

一、导出数据库

1、将数据库TEST完全导出,用户名scott密码tiger,导出到D:\testDB.dmp中:
exp scott/tiger@TEST file=d:\testDB.dmp
2、将数据库中的表emp导出:
exp scott/tiger@TEST file=d:\testDB.dmp tables=(emp)

二、导入数据库

1、导入一个完整数据库
imp scott/tiger@TEST file=d:\testDB.dmp full=y ignore=y
2、导入一个表emp
imp scott/tiger@TEST file=d:\testDB.dmp tables=(emp)

以上导入导出命令均在cmd窗口中执行即可。


附:
1、级联删除用户scott:
drop user scott cascade;
2、创建用户scott,密码tiger:
create user scott identified by tiger;
3、给scott赋予DBA权限:
grant dba to scott;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值