oracle用命令建立資料表空間、使用者,並為使用者授權、收回許可權。

來源:互聯網
上載者:User

標籤:

oracle中如何刪除使用者?

Oracle中使用DROP USER來刪除使用者,如果使用DROP USER CASCADE那麼使用者的對象也同時被刪除掉。為了達到刪除使用者的效果而又不影響對使用者下的對象的使用可以使用alter user username account lock將使用者鎖定。

 

 

 用命令建立資料表空間、使用者,並為使用者授權、收回許可權。
Create tablespace tabllespacename
Datafile ‘f:\orcl\user001.dbf   size 20m
Default storage(
Initial 512k
Next 512k
minextents 2
pctincrease 50% 
maxExitnts 2048)
minimum extent 512k
logging
online
permanent
extent management dictionary;
回收許可權: revoke privilege from user;
create tablespace tablespace_name 
    Datafile ‘f:\orcl\user001.dbf   size 20m

     default storage(
         initial xxxkb
         next yykb
         minextents 2
         pctincrease nnnn
         maxextents mmm)
     logging
     online
     extent management dictionary/local[autoallocate/uniform size

xxxmb];
create user user_name
     identified by passwore/
     identified externally/
     identified globally as ‘CN=user’
     default tablespace tablespace_name
     temporary tablespace tablespace_name
     [account lock /unlock]
grant connect to user_name;
grant create table to suer_name;
grant update on table_name to user_name;
revoke create table from user_name;
revoke update on table_name from user_name;

 

在Oracle中查看目前使用者,通常有哪些方式?(提示:show user和

select * from user_users)show user;/select username from

user_users;

 

談談你對角色的理解,常用的角色有哪些?
角色就是一組許可權的資料庫實體,它不屬於任何模式或使用者但是可以被授予

任何使用者。常用的角色有CONNECT,DBA,RESOURCE,SELECT_CATALOG_ROLE

(查詢所有表視圖權),DELETE_CATALOG_ROLE(刪除許可權)等。
角色的建立和授權:和建立使用者為使用者授權差不多。Create role role_name identified …

grant 許可權to role_name。

 

oracle用命令建立資料表空間、使用者,並為使用者授權、收回許可權。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.