oracle建立使用者以及授權

2021-07-26 23:35:07 字數 807 閱讀 7610

--建立使用者scott密碼pass,預設表空間使用的時臨時表空間temp;

create user scott identified by  pass default tablespace scott temporary tablespace temp;

--建立表空間scott初始大小是5m,當表空間滿的時候自動增長1m,最大增長無限制(無限制本地乙個dbf檔案最大約30g,會慢,需要追---加資料檔案才可以繼續擴充表空間)

--datafile 表示資料檔案,若建立臨時表空間,要使用臨時檔案tempfile;

--size 後跟著大小,如果在作業系統上,該檔案已存在,並且想要重用,需要加上reuse選項,表示重用。

--autoextend 表示是自動擴充套件該資料檔案的選項。沒有autoextend 的話,也就不使用自動擴充套件,也沒有next和maxsize的選項。

--next  表示下一次自動擴充套件時,擴充套件的大小。

--maxsize  表示此資料檔案能夠擴充套件的最大大小;如果無大小限制,則使用maxsize unlimited

--授予soctt使用者dba許可權

grant dba to scott;

--scott使用者不可以隨便在其他的表空間建表

revoke unlimited tablespace from scott;

--授權給使用者可以修改表空間配額許可權(配額為0即無配額不受空間限制,unlimited無限制)

alter user soctt quota 0 on scott;

alter user scott quota unlimited on soctt;

oracle建立表空間,建立使用者以及授權

建立臨時表空間 create temporary tablespace test temp tempfile e oracle product 10.2.0 oradata testserver test temp01.dbf size 32m autoextend on next 32m maxs...

oracle建立表空間,建立使用者以及授權

建立臨時表空間 create temporary tablespace test temp tempfile e oracle product 10.2.0 oradata testserver test temp01.dbf size 32m autoextend on next 32m maxs...

Oracle建立表空間 建立使用者以及授權

1.假如現在已經建好名為 newdb 的資料庫 2.建立使用者之前要建立 臨時表空間 若不建立則預設的臨時表空間為temp。sql create temporary tablespace db temp size 32m autoextend on next 32m maxsize unlimite...