權限的傳遞:
grant alter any table to jack;(不能授予其他人權限)
grant alter any table to jack with admin option;
(帶上with admin option就可以在授予其他人權限)
grant alter any table to rose with admin option;
grant alter any table to jack;(不能授予其他人權限)
grant alter any table to jack with admin option;
(帶上with admin option就可以在授予其他人權限)
grant alter any table to rose with admin option;
grant select On mytab to jack;
grant select On mytab to jack with grant option;
grant select On mytab to rose with grant option;
grant select On mytab to jack with grant option;
grant select On mytab to rose with grant option;
當sys把給jack的權限撤銷後,rose還擁有jack授予她的權限嗎?
角色(權限的集合):把N個權限做成一個角色。
create role myrole;(創建一個角色)
grant create session to myrole;(添加權限)
grant create table to myrole;(添加權限)
create role myrole;(創建一個角色)
grant create session to myrole;(添加權限)
grant create table to myrole;(添加權限)
create user rose identified by rose;(創建rose用戶)
grant myrole to rose;(把角色授權給rose)
grant myrole to rose;(把角色授權給rose)
drop role myrole;(刪除角色)
注意:
1 有些權限是不能直接授予到角色裏的:(原因是權限太大)
2 create table
3 create any table
4 [alter table] alter any table
5 [drop table] drop any table
6 表是屬於某一個用戶的
7 角色不屬於某一個用戶的
grant unlimited tablespase to myrole;
2 create table
3 create any table
4 [alter table] alter any table
5 [drop table] drop any table
6 表是屬於某一個用戶的
7 角色不屬於某一個用戶的
grant unlimited tablespase to myrole;
create table rose.A (id int);(用jack的身份給rose創建表)
管理員密碼丟失怎麼辦?
sys修改scott的密碼:
sqlplus / as sysdba
alter user scott identified by tiger;
sys修改scott的密碼:
sqlplus / as sysdba
alter user scott identified by tiger;
sys用戶密碼丟失?
數據庫的三種驗證機制
1 操作系統驗證
2 密碼文件驗證
3 數據庫驗證
數據庫的三種驗證機制
1 操作系統驗證
2 密碼文件驗證
3 數據庫驗證
sys用戶採用的是1操作系統驗證和 2密碼文件驗證。
Linux 下Oracle的啓動過程
1 lsnrctl start
2 sqlplus sys/oracle as sysdba(新版本)
sqlplus /nolog(老版本)
conn sys/ooracle as sysdba(老版本)
3 sys正確的話 startup 啓動實例
Linux 下Oracle的啓動過程
1 lsnrctl start
2 sqlplus sys/oracle as sysdba(新版本)
sqlplus /nolog(老版本)
conn sys/ooracle as sysdba(老版本)
3 sys正確的話 startup 啓動實例
windows 下Oracle的啓動過程
1 lsnrctl start
2 oradim -starup -sid orcl
1 lsnrctl start
2 oradim -starup -sid orcl
控制面板——計算機管理——組——ora_dba中就是超級用戶
1 把原有口令文件刪除(pwdora9i.ora)
2 用orapwd命令創建新的密碼文件
Usage: orapwd file=<路徑> password=<密碼> entries=<放幾個特權用戶> force=<是否覆蓋>
3 查看有幾個特權用戶命令:select * from v$pwfile_users;
2 用orapwd命令創建新的密碼文件
Usage: orapwd file=<路徑> password=<密碼> entries=<放幾個特權用戶> force=<是否覆蓋>
3 查看有幾個特權用戶命令:select * from v$pwfile_users;