浪潮優派培訓筆記:oracle筆記

創建表空間:
create tablespace tbs2
datafile 'c:\ \ \tbs2_01'
size 50M
autoextend on;  //自增


用SYS用戶登錄SQLPLUS: sys/sys @數據庫名 as sysdba


--Oracle的安全機制
--1.authentication 認證:必須要有正確的用戶名和密碼才能連接到服務器端
--2.authorization 授權:必須授予權限,才能進行相應的操作。


創建新用戶:用戶名爲ynz,密碼爲pwd
create user ynz
identified by pwd
default tablespace users
temporary tablespace temp; //每個用戶都有一個默認表空間和一個臨時表空間


更改用戶:alter user
alter user ynz identified by ynzpwd;


刪除用戶:drop user
drop user ynz cascade;








授予權限:grant .. to..
grant create session to ynz;  //把create session權限授予用戶ynz


角色是一組相關權限的集合。
授予角色:(把3個常用角色授予用戶ynz)
grant connect to ynz;
grant resource to ynz;
grant dba to ynz; 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章