oracle通过plsql代码倒库

时间:2017-08-24 14:38:43   收藏:0   阅读:277

用dba用户登录plsql,执行

第一步,建立表空间

CREATE SMALLFILE
    TABLESPACE "ASSETS"
    LOGGING
    DATAFILE
    ‘E:\ORACLE\PRODUCT\10.2.0\ORADATA\SDZC0216\ASSETS1.ora‘ SIZE
    500M AUTOEXTEND
    ON NEXT  10M MAXSIZE UNLIMITED,
    ‘E:\ORACLE\PRODUCT\10.2.0\ORADATA\SDZC0216\ASSETS2.ora‘ SIZE
    500M AUTOEXTEND
    ON NEXT  10M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT  AUTO;

其中ASSETS为表空间名字,‘E:\ORACLE\PRODUCT\10.2.0\ORADATA\SDZC0216\ASSETS1.ora‘为路径,如果要建多个表空间文件,记得后边顺序+1

ASSETS1.ora    ASSETS2.ora  ASSETS3.ora.............

第二步,建立用户

Create user 用户名
Default tablespace 表空间名字
Identified by 用户密码;

第三步,赋权限
grant dba to 用户名;
grant select any table to 用户名;
grant execute any procedure to 用户名;
grant create table to 用户名;

第四步,导入库

用    新建用户 (敲黑板,划重点)  登录plsql,选择工具——导入表

 

ps:如果出错了(比如表空间不足等),想重新弄,执行下边语句

drop user 用户名 cascade;(dba用户登录执行)

 

原文:http://www.cnblogs.com/wxcmfz/p/7422746.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!