Oracle使用者建立過程

來源:互聯網
上載者:User

對於Oracle使用者建立過程,估計大家在熟悉不過了,無論是自己練習玩,還是工作用,都免不了做這步,有的人已經熟練的記住了,有的人還是喜歡複製粘貼,把建立使用者的指令碼存在記事本裡,直接拿來用。但是這種指令碼太簡單,所以最容易被弄丟了。

關鍵時刻找不到,又沒記住。煩了吧!所以最好記住,忘了就看看這裡!

第一步:建立資料表空間

create tablespace ICB datafile 'D:\oracle\product\10.2.0\oradata\icb\icb.dbf' size 2048M
autoextend on next 256M maxsize unlimited logging extent management local autoallocate segment space management auto;
alter tablespace ICB add datafile 'D:\oracle\product\10.2.0\oradata\icb\icb01.dbf' size  2048M autoextend on next 256M;

注意:“maxsize unlimited logging extent management local autoallocate segment space management auto” 這段可以根據需要可不加;

“alter tablespace ICB add datafile 'D:\oracle\product\10.2.0\oradata\icb\icb01.dbf' size  2048M autoextend on next 256M" 不需要可不加。

第二步:建立使用者

  create user test
  identified by "test"
  default tablespace ICB
  temporary tablespace TEMP
  profile DEFAULT
  quota unlimited on system
  quota unlimited on test
  quota unlimited on users;

第三步:授權
 -- Grant/Revoke role privileges
 grant connect to test with admin option;
 grant resource to test with admin option;
 -- Grant/Revoke system privileges
 grant create any table to test;
 grant create any view to test;
 grant create table to test with admin option;
 grant select any table to test;
 grant unlimited tablespace to test with admin option;


注意:許可權根據需要自己來設定。

最後:就是退出

exit;

總結:oracle使用者的建立一共就三個步驟,

1)建立資料表空間(如果資料表空間已存在,則可以不做這步)

2)建立使用者

3)授權

參考閱讀:

Oracle教程:使用者管理的備份

Oracle基礎教程之通過RMAN複製資料庫

RMAN備份策略制定參考內容

RMAN備份學習筆記

OracleDatabase Backup加密 RMAN加密

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.