CREATE TABLESPACE test_data LOGGING DATAFILE 'C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\TEST_DATA01.DBF' SIZE 32M AUTOEXTEND ON NEXT 32M MAXSIZE 2048M EXTENT MANAGEMENT LOCAL; 創(chuàng)建用戶并制定表空間 CREATE USER username IDENTIFIED BY password DEFAULT TABLESPACE TEST_DATA TEMPORARY TABLESPACE TEST_TEMP; 給用戶授予權限 GRANT CREATE SESSION, CREATE ANY TABLE, CREATE ANY VIEW ,CREATE ANY INDEX, CREATE ANY PROCEDURE, ALTER ANY TABLE, ALTER ANY PROCEDURE, DROP ANY TABLE, DROP ANY VIEW, DROP ANY INDEX, DROP ANY PROCEDURE, SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE TO username; 將role這個角色授與username,也就是說,使username這個用戶可以管理和使用role所擁有的資源 GRANT role TO username;
|
|
來自: liyan1371 > 《數(shù)據(jù)庫》