您的位置:首页 > 数据库 > Oracle

oracle数据库导出并重新导入

2013-08-20 21:48 295 查看

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

一、导出数据库

1、将数据库TEST完全导出,用户名scott密码tiger,导出到D:\testDB.dmp中:

exp scott/tiger@TEST file=d:\testDB.dmp full=y

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)


附:

1、级联删除用户scott:

drop user scott cascade;

2、创建用户scott,密码tiger:

create user scott identified by tiger;

3、给scott赋予DBA权限:

grant dba to scott;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: