create tablespace logincenter_yc datafile '+DATA' size 500M autoextend on next 100M maxsize 20g; create user logincenter_yc identified by "uT_9hK$11jva" default tablespace logincenter_yc ;
二、设置默认表空间quota
1 2 3 4
alter user logincenter_yc quota unlimited on logincenter_yc;
SQL> select * from dba_sys_privs where grantee='CONNECT';
GRANTEE PRIVILEGE ADM ------------------------------ ------------------------------ --- CONNECT CREATE SESSION NO
SQL> select * from dba_sys_privs where grantee='RESOURCE';
GRANTEE PRIVILEGE ADM ------------------------------ ------------------------------ --- RESOURCE CREATE TRIGGER NO RESOURCE CREATE SEQUENCE NO RESOURCE CREATE TYPE NO RESOURCE CREATE PROCEDURE NO RESOURCE CREATE CLUSTER NO RESOURCE CREATE OPERATOR NO RESOURCE CREATE INDEXTYPE NO RESOURCE CREATE TABLE NO
8 rows selected.
SQL> select * from dba_role_privs a where a.grantee='LOGINCENTER_YC';
GRANTEE GRANTED_ROLE ADM DEF ------------------------------ ------------------------------ --- --- LOGINCENTER_YC CONNECT NO YES LOGINCENTER_YC RESOURCE NO YES
set linesize 500 set pagesize 500 col role for a20 col username for a23 col privilege for a30 col default_tablespace for a23 col temporary_tablespace for a23 col profile for a14 select a.grantee username, a.granted_role role,b.privilege,c.default_tablespace,c.temporary_tablespace,c.profile from dba_role_privs a,role_sys_privs b,dba_users c where a.granted_role=b.role and a.grantee='LOGINCENTER_YC' and a.grantee=c.username union select grantee username,(select 'N/A' from dual) role,privilege,d.default_tablespace,d.temporary_tablespace,profile from dba_sys_privs,dba_users d where grantee='LOGINCENTER_YC' and grantee=d.username order by username; USERNAME ROLE PRIVILEGE DEFAULT_TABLESPACE TEMPORARY_TABLESPACE PROFILE ----------------------- -------------------- ------------------------------ ----------------------- ----------------------- -------------- LOGINCENTER_YC CONNECT CREATE SESSION LOGINCENTER_YC TEMP DEFAULT LOGINCENTER_YC N/A UNLIMITED TABLESPACE LOGINCENTER_YC TEMP DEFAULT LOGINCENTER_YC RESOURCE CREATE CLUSTER LOGINCENTER_YC TEMP DEFAULT LOGINCENTER_YC RESOURCE CREATE INDEXTYPE LOGINCENTER_YC TEMP DEFAULT LOGINCENTER_YC RESOURCE CREATE OPERATOR LOGINCENTER_YC TEMP DEFAULT LOGINCENTER_YC RESOURCE CREATE PROCEDURE LOGINCENTER_YC TEMP DEFAULT LOGINCENTER_YC RESOURCE CREATE SEQUENCE LOGINCENTER_YC TEMP DEFAULT LOGINCENTER_YC RESOURCE CREATE TABLE LOGINCENTER_YC TEMP DEFAULT LOGINCENTER_YC RESOURCE CREATE TRIGGER LOGINCENTER_YC TEMP DEFAULT LOGINCENTER_YC RESOURCE CREATE TYPE LOGINCENTER_YC TEMP DEFAULT
set linesize 500 set pagesize 500 col role for a20 col username for a23 col privilege for a30 col default_tablespace for a23 col temporary_tablespace for a23 col profile for a14 select a.grantee username, a.granted_role role,b.privilege,c.default_tablespace,c.temporary_tablespace,c.profile from dba_role_privs a,role_sys_privs b,dba_users c where a.granted_role=b.role and a.grantee='LOGINCENTER_YC' and a.grantee=c.username union select grantee username,(select 'N/A' from dual) role,privilege,d.default_tablespace,d.temporary_tablespace,profile from dba_sys_privs,dba_users d where grantee='LOGINCENTER_YC' and grantee=d.username order by username;