Oracle中的创建和删除

drop user ORACLE1 cascade;

drop tablespace ORACLE1 including contents and datafiles cascade constraints;

CREATE TABLESPACE ORACLE1 
    LOGGING 
    DATAFILE 'E:\app\yanghongjie\oradata\oracle\ORACLE1.DBF' SIZE 500M
    AUTOEXTEND ON NEXT 100M MAXSIZE 10G
    EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT AUTO;

CREATE USER ORACLE1 
    PROFILE DEFAULT
    IDENTIFIED BY ORACLE1 
    DEFAULT TABLESPACE ORACLE1 
    TEMPORARY TABLESPACE TEMP
    QUOTA UNLIMITED ON ORACLE1 
    ACCOUNT UNLOCK;

ALTER USER ORACLE1 DEFAULT ROLE  ALL;


GRANT CONNECT,
      CREATE PROCEDURE,
      CREATE TRIGGER,
      ANALYZE ANY,
      CREATE TYPE,
      SELECT ANY DICTIONARY,
      CREATE VIEW,
      CREATE SEQUENCE
TO ORACLE1;

GRANT ALTER ANY TABLE TO ORACLE1;
GRANT DROP ANY TABLE TO  ORACLE1;
GRANT DELETE ANY TABLE TO  ORACLE1;
GRANT SELECT ANY TABLE TO  ORACLE1;
GRANT INSERT ANY TABLE TO  ORACLE1;
GRANT CREATE ANY TABLE TO  ORACLE1;
GRANT CREATE TYPE TO ORACLE1;
GRANT CREATE PUBLIC DATABASE LINK TO ORACLE1;
GRANT DROP PUBLIC DATABASE LINK TO ORACLE1;
GRANT DBA TO ORACLE1;

create directory DR_DBIMP as 'D:\DR_DBIMP'; 

Grant read,write on directory DR_DBIMP to ORACLE1;

impdp ORACLE1/ORACLE1@Instance directory=DR_DBIMP DUMPFILE=filename.DMP LOGFILE=filename.log REMAP_SCHEMA=(ORIGINALNAME:ORACLE1) REMAP_TABLESPACE=(ORIGINALNAME:ORACLE1)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值