Oracle建立表空間、建立資料庫使用者、賦許可權

ywxj_001發表於2018-01-24
建立表空間:
create tablespace HY datafile '/usr/oracle/oradata/YSDB/HY01.dbf' size 300M autoextend on next 50M maxsize unlimited;

建立臨時表空間:
create TEMPORARY tablespace TMP tempfile '/usr/oracle/oradata/YSDB/TMP01.dbf' size 1000M autoextend on next 50M maxsize unlimited;

建立資料庫使用者:
create user hy identified by hy  
default tablespace HY  
temporary tablespace TMP;

賦許可權:
GRANT CREATE ANY SYNONYM to hy;
GRANT CREATE CLUSTER to hy;
GRANT CREATE INDEXTYPE to hy;
GRANT CREATE PROCEDURE to hy;
GRANT CREATE SEQUENCE to hy;
GRANT CREATE SESSION to hy;
GRANT CREATE TABLE to hy;
GRANT CREATE TRIGGER to hy;
GRANT CREATE TYPE to hy;
GRANT CREATE VIEW to hy;
GRANT DROP ANY SYNONYM to hy;
GRANT UNLIMITED TABLESPACE to hy;

檢視使用者許可權:
select * from dba_sys_privs where grantee = 'HY';

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22996654/viewspace-2150509/,如需轉載,請註明出處,否則將追究法律責任。

相關文章