創建oracle數據庫,用戶、表空間、設置角色權限腳本
/*分為四步 */
/*第1步:創建臨時表空間 */
create temporary tablespace contract_temp
tempfile 'D:\oradata\contract_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
/*第2步:創建數據表空間 */
create tablespace contract_data
logging
datafile 'D:\oradata\contract_data.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
/*第3步:創建用戶並指定表空間 */
create user contract identified by password
default tablespace contract_data
temporary tablespace contract_temp;
/*第4步:給用戶授予權限 */
grant connect,resource,dba to contract;