您的位置:首页 > 博客中心 > 数据库 >

Oracle 导出远程库dmp文件-->导入到本地oracle数据库中,实现远程数据库的复制和移植.

时间:2022-03-14 16:28

大家是否有这样的烦恼,想将公司项目变成自己的项目资源库。但是项目完全复制下来到自己机器上运行,发现无法访问远程数据库的错误,为了解决这一困扰,作者尝试了将远程数据库导入到本地数据库的操作,遇到了不小的麻烦,做下记录。

导入脚本:

--表空间
CREATE TABLESPACE EC
DATAFILE ‘d:\tablespace\ec.dbf‘ size 3000M
         EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;     
--2.建用户
create user jelly identified by tiger 
default tablespace EC;
 
--3.赋权
grant connect,resource to jelly;
grant create any sequence to jelly;
grant create any table to jelly;
grant delete any table to jelly;
grant insert any table to jelly;
grant select any table to jelly;
grant unlimited tablespace to jelly;
grant execute any procedure to jelly;
grant update any table to jelly;
grant create any view to jelly;

 

--导入方式: 
imp scott/tiger@orcl file=d:\ec.dmp fromuser=‘ecuser‘ touser=‘jelly‘ ignore=y  

 

--删除用户及用户对象
drop user jelly cascade;
--删除表空间
DROP TABLESPACE EC INCLUDING CONTENTS AND DATAFILES;

 

 

 

http://blog.csdn.net/starnight_cbj/article/details/6792364

热门排行

今日推荐

热门手游