创建用户临时的表空间
CREATE TEMPORARY TABLESPACE portal_temp
TEMPFILE 'D:\app\patrol\oradata\orcl\portal_temp.dbf'
SIZE 32M
AUTOEXTEND ON
NEXT 32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL;
创建用户表空间
create tablespace portal_data
LOGGING
DATAFILE 'D:\app\patrol\oradata\orcl\portal_data.dbf'
SIZE 32M
AUTOEXTEND ON
NEXT 32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL;
创建用户并制定表空间
create user portal identified by orcl
DEFAULT TABLESPACE portal_data
TEMPORARY TABLESPACE portal_temp;
授权:
2.grant create table,create view,create trigger, create sequence,create procedure to portal;--分配创建表,视图,触发器,序列,过程 权限
grant create session,resource to portal;
GRANT DBA TO portal;
GRANT RESOURCE TO portal;
ALTER USER portal DEFAULT ROLE ALL;
GRANT SELECT ANY TABLE TO portal;
GRANT UNLIMITED TABLESPACE TO portal;
GRANT CREATE ANY TABLE to portal;