ITPub博客

首页 > 数据库 > Oracle > exp/imp导出导入数据

exp/imp导出导入数据

原创 Oracle 作者:jelephant 时间:2014-04-10 14:22:46 0 删除 编辑
1、导出语句
exp usernmae/password file=’/location/back.dmp’ log=’/location/back.log’ owner=’SH’ direct=y

2、赋权语句
select ‘grant ‘ || privilege ||’ to sh;’ from session_privs;
select ‘grant ‘ || role ||’ to sh;’ from session_roles;

3、导入语句
imp username/password file=’/location/back.dmp’ log=’/location/back.log’ Fromuser=’SH’ touser=’SH’

4、验证语句
SELECT object_type,count(*) from dba_objects where owner=’SH’ group by object_type;
select tablespace_name,sum(bytes/1024/1024) from dba_segments where owner=’SH’ group by tablespace_name;

5、生成统计信息
dbms_stast.gather_schema_stats('SH');

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29337971/viewspace-1139424/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 11gRAC之GRID
请登录后发表评论 登录
全部评论

注册时间:2013-12-07

  • 博文量
    143
  • 访问量
    631290