oracle迁移数据库语句

--创建oracle 表空间
create tablespace xzsp_data   
logging   
datafile 'E:\app\Administrator\oradata\db3\xzsp_data.dbf'   
size 2048m
autoextend on
next 32m maxsize 30720m   
extent management local; 


-- 创建用户
create user WELL_PT_004   
default tablespace xzsp_data IDENTIFIED BY WELL_PT_004
  temporary tablespace TEMP
  profile DEFAULT
  quota unlimited on users;
-- Modify the user 
alter user WELL_PT_004 identified by WELL_PT_004;
-- Grant/Revoke object privileges 
grant read, write on directory BACKUP to WELL_PT_004;
grant select on DBA_2PC_PENDING to WELL_PT_004;
grant select on DBA_PENDING_TRANSACTIONS to WELL_PT_004;
grant execute on DBMS_XA to WELL_PT_004;
grant select on PENDING_TRANS$ to WELL_PT_004;


grant create session to WELL_PT_004;
grant resource  to WELL_PT_004;




-- 创建用户
create user XZSP_004  
default tablespace xzsp_data identified by XZSP_004
temporary tablespace TEMP
  profile DEFAULT
  quota unlimited on users;
-- Modify the user 
alter user LDX_01 identified by XZSP_004;
-- Grant/Revoke object privileges 
grant read, write on directory BACKUP to XZSP_004;
grant select on DBA_2PC_PENDING to XZSP_004;
grant select on DBA_PENDING_TRANSACTIONS to XZSP_004;
grant execute on DBMS_XA to XZSP_004;
grant select on PENDING_TRANS$ to XZSP_004;


grant create session to XZSP_004;
grant resource  to XZSP_004;


--删除用户
drop user ×× cascade


--删除表空间
DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES;


impdp system/admin888 directory=backup dumpfile=XZSP_004_20150416.DMP REMAP_SCHEMA=XZSP_004:XZSP_004 remap_tablespace=TEST_DATA:xzsp_data

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值