数据库创建表空间+用户+授权

--导入测试数据库
--connect sys/password as sysdba
---删除表空间
drop tablespace pt6 INCLUDING CONTENTS;
drop tablespace br INCLUDING CONTENTS;
drop tablespace cbb INCLUDING CONTENTS;

create tablespace pt6 datafile '&1\pt6.dbf' size 100m autoextend on next 10m;
create tablespace br datafile '&1\br.dbf' size 100m autoextend on next 10m;
create tablespace cbb datafile '&1\cbb.dbf' size 100m autoextend on next 10m;


--删除用户
drop user pt6 CASCADE;
drop user br CASCADE;
drop user cbb CASCADE;

--创建用户
create user pt6 identified by cape default tablespace pt6;
create user br identified by cape default tablespace br;
create user cbb identified by cape default tablespace cbb;


--赋权限
grant dba to pt6;
grant dba to br;
grant dba to cbb;


grant all on dual to pt6 with grant option;
grant all on dual to br with grant option;
grant all on dual to cbb with grant option;


-- drop directory dir_dp;
create directory dir_dp as 'E:\oracle\dir_dp';
Grant read,write on directory dir_dp to pt6;

--磁盘建立dir_dp文件夹目录


--在服务器端数据泵导库:

--进入dos命令窗口:
expdp pt6/cape@localhost/IMBR(数据源实例名) schemas=pt6,br,cbb directory=dir_dp dumpfile=IMBR_2015040101.dmp logfile=IMBR_2015040101.log;
impdp pt6/cape@localhost/IMBR_test(入库实例名) schemas=pt6,br,cbb directory=dir_dp dumpfile=IMBR_2015040101.dmp nologfile=yes;


--远程数据泵导库:

--远程导库

--进入dos命令窗口
exp pt6/cape@10.216.60.74/IMBRV6R3  file=d:\cap20101230.dmp owner=(pt6,br,cbb)
imp pt6/cape@localhost/IMBR file=d:\cap20101230.dmp fromuser=pt6 touser=pt6 fromuser=br touser=br fromuser=cbb touser=cbb


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值