大家是否有这样的烦恼,想将公司项目变成自己的项目资源库。但是项目完全复制下来到自己机器上运行,发现无法访问远程数据库的错误,为了解决这一困扰,作者尝试了将远程数据库导入到本地数据库的操作,遇到了不小的麻烦,做下记录。
导入脚本:
--表空间 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
时间: 2024-10-14 12:41:29