ORCLE 创建表空间,用户,赋予角色以及授权
1、创建表空间MMS_DATA
1 --创建表空间和数据库文件dbf 2 CREATE TABLESPACE MMS_DATA DATAFILE 3 'D:\ORADATA\ORCL\MMS_DATA.DBF' 4 SIZE 3096M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED 5 LOGGING 6 ONLINE 7 EXTENT MANAGEMENT LOCAL AUTOALLOCATE 8 BLOCKSIZE 8K 9 SEGMENT SPACE MANAGEMENT AUTO 10 FLASHBACK ON;
2、创建临时表空间MMS_TEMP
1 --创建临时表空间和数据库文件dbf 2 CREATE TEMPORARY TABLESPACE MMS_TEMP TEMPFILE 3 'D:\ORADATA\ORCL\MMS_TEMP.DBF' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED 4 TABLESPACE GROUP '' 5 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
3、创建用户MMS并解锁
1 CREATE USER MMS 2 IDENTIFIED BY VALUES 'MMS' 3 DEFAULT TABLESPACE MMS_DATA 4 TEMPORARY TABLESPACE MMS_TEMP 5 PROFILE DEFAULT 6 ACCOUNT UNLOCK;
4、赋予角色
1 GRANT CONNECT TO MMS ; 2 GRANT RESOURCE TO MMS ; 3 GRANT EXP_FULL_DATABASE TO MMS; 4 ALTER USER MMS DEFAULT ROLE ALL;
5、赋予系统权限 创建/修改/删除任何表 创建视图 给用户
1 -- 1 System Privilege for MMS 2 GRANT CREATE ANY TABLE TO MMS; 3 GRANT ALTER ANY TABLE TO MMS; 4 GRANT DROP ANY TABLE TO MMS; 5 GRANT UNLIMITED TABLESPACE TO MMS; 6 GRANt CREATE VIEW TO MMS;