建立Oracle使用者及賦予許可權

來源:互聯網
上載者:User

1。建立資料表空間表

SQL>CREATE TABLESPACE 資料表空間表名;

例:SQL>create tablespace mytablespace;

2。建立使用者(在上面建立的資料表空間表中)

SQL>CREATE user 使用者名稱 identified by 密碼 default tablespace 資料表空間表名

例:SQL>create user myname identified by mypasswd default tablespace mytablespace;

3。賦予許可權

GRANT — 賦予一個使用者,一個組或所有使用者存取權限

GRANT privilege [, ...] ON object [, ...] TO { PUBLIC | GROUP group | username }

輸入

privilege可能的許可權有: SELECT 訪問聲明的表/視圖的所有列/欄位. INSERT 向聲明的表中插入所有欄欄位. UPDATE 更新聲明的所有列/欄位. DELETE 從聲明的表中刪除所有行. RULE 在表/視圖上定義規則 (參見 CREATE RULE 語句). ALL 賦予所有許可權. object賦予許可權的對象名.可能的對象是: table (表) view (視圖) sequence (序列) index (索引) PUBLIC 代表是所有使用者的簡寫. GROUP group將要賦予許可權的組 group .目前的版本中,組必須是用下面方法顯式建立的. username將要賦予許可權的使用者名稱.PUBLIC 是代表所有使用者的簡寫. 例:SQL>grant select, update on employee to myname

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.