1、创建表空间MMS_DATA

 --创建表空间和数据库文件dbf
CREATE TABLESPACE MMS_DATA DATAFILE
'D:\ORADATA\ORCL\MMS_DATA.DBF'
SIZE 3096M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED
LOGGING
ONLINE
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;

2、创建临时表空间MMS_TEMP

 --创建临时表空间和数据库文件dbf
CREATE TEMPORARY TABLESPACE MMS_TEMP TEMPFILE
'D:\ORADATA\ORCL\MMS_TEMP.DBF' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED
TABLESPACE GROUP ''
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;

3、创建用户MMS并解锁

 CREATE USER MMS
IDENTIFIED BY VALUES 'MMS'
DEFAULT TABLESPACE MMS_DATA
TEMPORARY TABLESPACE MMS_TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;

4、赋予角色

  GRANT CONNECT TO MMS ;
GRANT RESOURCE TO MMS ;
GRANT EXP_FULL_DATABASE TO MMS;
ALTER USER MMS DEFAULT ROLE ALL;

5、赋予系统权限 创建/修改/删除任何表  创建视图 给用户

 --  System Privilege for MMS
GRANT CREATE ANY TABLE TO MMS;
GRANT ALTER ANY TABLE TO MMS;
GRANT DROP ANY TABLE TO MMS;
GRANT UNLIMITED TABLESPACE TO MMS;
GRANt CREATE VIEW TO MMS;
05-11 11:27