如何讓普通使用者可以對DBA_SOURCE檢視進行閃回查詢?
賦權:GRANT SELECT , FLASHBACK ON DBA_SOURCE TO LHR10;
或:GRANT DBA,SELECT_CATALOG_ROLE TO LHR10;
LHR@orclasm > DROP USER LHR10;
CREATE USER LHR10 IDENTIFIED BY LHR;
GRANT RESOURCE TO LHR10;
User dropped.
LHR@orclasm >
User created.
LHR@orclasm >
Grant succeeded.
LHR@orclasm > LHR@orclasm > LHR@orclasm > LHR@orclasm >
LHR@orclasm >
LHR@orclasm >
LHR@orclasm > CONN LHR10/LHR;
ERROR:
ORA-01045: user LHR10 lacks CREATE SESSION privilege; logon denied
Warning: You are no longer connected to ORACLE.
@ > CONN / AS SYSDBA
Connected.
SYS@orclasm > GRANT CONNECT,RESOURCE TO LHR10;
Grant succeeded.
SYS@orclasm > conn lhr10/LHR
Connected.
LHR10@orclasm >
LHR10@orclasm > select * from dba_source as of timestamp sysdate -1/24 where rownum<=1;
select * from dba_source as of timestamp sysdate -1/24 where rownum<=1
*
ERROR at line 1:
ORA-00942: table or view does not exist
LHR10@orclasm > GRANT SELECT ON DBA_SOURCE TO LHR10;
GRANT SELECT ON DBA_SOURCE TO LHR10
*
ERROR at line 1:
ORA-00942: table or view does not exist
LHR10@orclasm > CONN / AS SYSDBA
Connected.
SYS@orclasm > GRANT SELECT ON DBA_SOURCE TO LHR10;
Grant succeeded.
SYS@orclasm > conn lhr10/LHR
Connected.
LHR10@orclasm > select * from dba_source as of timestamp sysdate -1/24 where rownum<=1;
select * from dba_source as of timestamp sysdate -1/24 where rownum<=1
*
ERROR at line 1:
ORA-01031: insufficient privileges
LHR10@orclasm > CONN / AS SYSDBA
Connected.
SYS@orclasm > GRANT FLASHBACK ON DBA_SOURCE TO LHR10;
Grant succeeded.
SYS@orclasm > conn lhr10/LHR
Connected.
LHR10@orclasm > select * from dba_source as of timestamp sysdate -1/24 where rownum<=1;
OWNER NAME TYPE
------------------------------ ------------------------------ ------------
LINE
----------
TEXT
--------------------------------------------------------------------------------
SYS AGGXMLIMP TYPE
1
type AggXMLImp
LHR10@orclasm > CONN / AS SYSDBA
Connected.
SYS@orclasm > REVOKE FLASHBACK ON DBA_SOURCE FROM LHR10;
Revoke succeeded.
SYS@orclasm > conn lhr10/LHR
Connected.
LHR10@orclasm >
LHR10@orclasm > select * from dba_source as of timestamp sysdate -1/24 where rownum<=1;
select * from dba_source as of timestamp sysdate -1/24 where rownum<=1
*
ERROR at line 1:
ORA-01031: insufficient privileges
LHR10@orclasm > CONN / AS SYSDBA
Connected.
SYS@orclasm >
SYS@orclasm > GRANT SELECT_CATALOG_ROLE TO LHR10;
Grant succeeded.
SYS@orclasm > conn lhr10/LHR
Connected.
LHR10@orclasm > select * from dba_source as of timestamp sysdate -1/24 where rownum<=1;
select * from dba_source as of timestamp sysdate -1/24 where rownum<=1
*
ERROR at line 1:
ORA-01031: insufficient privileges
LHR10@orclasm > CONN / as sysdba
Connected.
SYS@orclasm > grant dba to lhr10;
Grant succeeded.
SYS@orclasm > conn lhr10/LHR
Connected.
LHR10@orclasm > select * from dba_source as of timestamp sysdate -1/24 where rownum<=1;
OWNER NAME TYPE
------------------------------ ------------------------------ ------------
LINE
----------
TEXT
--------------------------------------------------------------------------------
SYS AGGXMLIMP TYPE
1
type AggXMLImp
About Me
.............................................................................................................................................
● 本文作者:小麥苗,部分內容整理自網路,若有侵權請聯絡小麥苗刪除
● 本文在itpub(http://blog.itpub.net/26736162/abstract/1/)、部落格園(http://www.cnblogs.com/lhrbest)和個人微信公眾號(xiaomaimiaolhr)上有同步更新
● 本文itpub地址:http://blog.itpub.net/26736162/abstract/1/
● 本文部落格園地址:http://www.cnblogs.com/lhrbest
● 本文pdf版、個人簡介及小麥苗雲盤地址:http://blog.itpub.net/26736162/viewspace-1624453/
● 資料庫筆試面試題庫及解答:http://blog.itpub.net/26736162/viewspace-2134706/
● DBA寶典今日頭條號地址:
.............................................................................................................................................
● QQ群號:230161599(滿)、618766405
● 微信群:可加我微信,我拉大家進群,非誠勿擾
● 聯絡我請加QQ好友(646634621),註明新增緣由
● 於 2017-09-01 09:00 ~ 2017-09-30 22:00 在魔都完成
● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解
● 版權所有,歡迎分享本文,轉載請保留出處
.............................................................................................................................................
● 小麥苗的微店:
● 小麥苗出版的資料庫類叢書:http://blog.itpub.net/26736162/viewspace-2142121/
.............................................................................................................................................
使用微信客戶端掃描下面的二維碼來關注小麥苗的微信公眾號(xiaomaimiaolhr)及QQ群(DBA寶典),學習最實用的資料庫技術。
小麥苗的微信公眾號 小麥苗的DBA寶典QQ群1 小麥苗的DBA寶典QQ群2 小麥苗的微店
.............................................................................................................................................
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2144687/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 閃回查詢之閃回版本查詢
- 閃回查詢之閃回表查詢
- 【閃回特性之閃回查詢】使用閃回查詢(select as of)
- 閃回表、閃回查詢
- 閃回查詢
- 閃回(關於閃回查詢)
- 閃回刪除、閃回查詢
- 基本閃回查詢和閃回表
- 閃回技術一:閃回查詢
- 閃回版本查詢與閃回事務查詢
- EBS中通過查詢 dba_source 檢視pkg 的版本號
- oracle閃回查詢Oracle
- 閃回查詢(轉)
- 閃回查詢(1)
- oracle 閃回查詢Oracle
- 【Flashback】使用檢視快速獲得Flashback Query閃回查詢資料
- DM7閃回與閃回查詢
- Oracle閃回查詢,閃回版本查詢與閃回事務查詢的使用區別總結Oracle
- Oracle 11G 閃回技術 閃回版本查詢和閃回事務查詢Oracle
- Flashback Query閃回查詢
- oracle的閃回查詢Oracle
- oracle的回閃查詢Oracle
- 閃回查詢(undo sql)SQL
- 閃回版本查詢操作
- 檢視慢查詢進度
- [閃回特性之閃回版本查詢]Flashback Version Query
- DM8 閃回查詢
- 閃回版本查詢技術:
- 回閃查詢查詢刪除的資料
- 【備份恢復】閃回技術之閃回版本查詢
- Oracle 11G 閃回技術 使用Oracle閃回查詢Oracle
- Oracle 11G 閃回技術 使用閃回版本查詢Oracle
- oracle閃回版本查詢學習Oracle
- 閃回技術查詢資料
- Oracle 11g 閃回查詢Oracle
- 閃回版本查詢(Flashback Version Query)
- 閃回查詢恢復過程
- Oracle給普通使用者賦予查詢動態效能檢視的許可權Oracle