Oracle创建用户与授予表空间与权限
生活随笔
收集整理的這篇文章主要介紹了
Oracle创建用户与授予表空间与权限
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Oracle建立用戶? ? ?
建立:create user 用戶名 identified by "密碼";oracle 表空間
一個數據庫可以有多個表空間,一個表空間里可以有多個表。表空間就是存多個表的物理空間; ??可以指定表空間的大小位置等。
建立表空間的定義
建立表空間(一般建N個存數據的表空間和一個索引空間): create tablespace 表空間名 datafile ' 路徑(要先建好路徑)\***.dbf ' size *M tempfile ' 路徑\***.dbf ' size *M autoextend on --自動增長 --還有一些定義大小的命令,看需要default storage(initial 100K,next 100k, );例子
創建表空間:create tablespace ts1 datafile 'C:\tablespace\ts1.dbf' size 50M; 自動擴展大小:create tablespace ts2 datafile 'C:\tablespace\ts2.dbf' size 50M autoextend on next 10M; 設置最大空間:create tablespace ts3 datafile 'C:\tablespace\ts3.dbf' size 50M autoextend on next 10M maxsize 1024M;更改用戶默認表空間:alter database default tablespace ts1; 表空間改名:alter tablespace ts1 rename to tss1; 刪除表空間:drop tablespace ts2 including contents and datafiles;授予用戶使用表空間的權利
alter user 用戶名 quota unlimited on 表空間; 或 alter user 用戶名 quota *M on 表空間授予用戶的基本權限
授權:grant create session to 用戶名;grant create table to 用戶名;grant create tablespace to 用戶名;grant create view to 用戶名; grant connect,resource to demo; grant create any sequence to demo; grant create any table to demo; grant delete any table to demo; grant insert any table to demo; grant select any table to demo; grant unlimited tablespace to demo; grant execute any procedure to demo; grant update any table to demo; grant create any view to demo;?
?
?
?
?
?
?
?
?
?
?
總結
以上是生活随笔為你收集整理的Oracle创建用户与授予表空间与权限的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SNIP论文学习
- 下一篇: Microsoft Visual Stu