ORACLE創建表空間、用戶語句


近日項目遇到ORACLE數據庫,將常用操作語句記錄於此。

--創建表空間
create tablespace tablespace_name
datafile 'G:\oracle\Administrator\oradata\amop\amop_support.dbf'
size 500M
autoextend on next 100M
maxsize unlimited;

--創建臨時表空間

create temporary tablespace temporary_tablespace_name
tempfile 'G:\oracle\Administrator\oradata\amop\amop_support_temp.dbf'
size 500M
autoextend on
next 100M maxsize unlimited
extent management local;

--刪除表空間及數據庫文件
--drop tablespace tablespace_name including contents and datafiles;

--創建用戶
create user username identified by password
profile default
default tablespace tablespace_name
temporary tablespace temporary_tablespace_name
account unlock;

--賦予用戶權限
grant connect,resource to username ;
grant create any sequence to username ;
grant create any table to username ;
grant delete any table to username ;
grant insert any table to username ;
grant select any table to username ;
grant unlimited tablespace to username ;
grant execute any procedure to username ;
grant update any table to username ;
grant create any view to username ;

如上~

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM