亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2503 | 回復(fù): 0
打印 上一主題 下一主題

刷新物化視圖需要的權(quán)限 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2011-12-20 09:48 |只看該作者 |倒序瀏覽
Problem Summary:

================

Privileges To Refresh A Snapshot Or Materialized View

 

Problem Description:

===================

From Oracle 8i materialized views are synonymous with snapshots. Any reference to snapshot

can be replaced with materialized view instead.

 

You are attempting to refresh a snapshot that someone else owns, manually or

automatically, and you are receiving ORA-1031 or ORA-23406

 

SQLDBA> execute dbms_snapshot.refresh(SCOTT.SNAP_TEST);

ORA-01031: insufficient privileges

ORA-06512: at "SYS.DBMS_SNAPSHOT", line 269

ORA-06512: at "SYS.DBMS_SNAPSHOT", line 139

ORA-06512: at line 1

 

OR

 

SQLDBA> execute dbms_refresh.refresh(SCOTT.SNAP_TEST);

ORA-23406: insufficient privileges on user "JOHN"

ORA-06512: at "SYS.DBMS_SYS_ERROR", line 83

ORA-06512: at "SYS.DBMS_IREFRESH", line 25

ORA-06512: at "SYS.DBMS_REFRESH", line 21

ORA-06512: at "SYS.DBMS_REFRESH", line 171

ORA-06512: at line 1

 

OR

 

SQL> exec DBMS_MVIEW.REFRESH('scott.snap_test','C', '',TRUE,FALSE,0,0,0, FALSE);

BEGIN DBMS_MVIEW.REFRESH('scott.snap_test','C', '',TRUE,FALSE,0,0,0, FALSE); END;

 

*

ERROR at line 1:

ORA-01031: insufficient privileges

ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2254

ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2460

ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2429

ORA-06512: at line 1

 

 

For example, user JOHN tries to refresh SCOTT's snapshot and receives the

above errors.  However, user JOHN has the DBA role granted to him  

as well as privileges to the master table and the snapshot log on the

master site. Why can't he refresh SCOTT's snaphshot?

 

 

Problem Explanation:

====================

Being granted the DBA role is NOT sufficient to refresh another

user's snapshot.   You have to explicitly grant the user:

ALTER ANY SNAPSHOT

or

ALTER ANY MATERIALIZED VIEW

and

SELECT ANY TABLE

system privilege.

 注意:如果job是在system用戶下的,那么刪除了其他普通用戶再重建用戶后,需要給system顯式的授于這幾個權(quán)限才能刷新其他用戶的MV及snapshot!

 

Solution Summary:

=================

GRANT ALTER ANY SNAPSHOT

GRANT ALTER ANY MATERIALIZED VIEW

GRANT SELECT ANY TABLE

 

Solution Description:

=====================

connect system/manager

grant ALTER ANY SNAPSHOT to ;

or

grant ALTER ANY MATERIALIZED VIEW to ;

grant SELECT ANY TABLE to ;

 

Solution Explanation:

=====================

 

To refresh a snapshot, you must meet the following criteria:

 

o  You must own the snapshot or have the ALTER ANY SNAPSHOT or

   ALTER ANY MATERIALIZED VIEW and

   SELECT ANY TABLE privilege

 

o  The snapshot owner (or the user that you have connected as, if you are

   using a database link) must have SELECT privileges on the master table

   and, for fast refreshes, on the snapshot log.

 

 

 

The reason why the DBA role will not work is because when Oracle goes to

refresh, internally, it specifically checks the requirements mentioned above. 

Oracle checks if the snapshot is owned by the user refreshing OR checks for

the user to have ALTER ANY SNAPSHOT or ALTER ANY MATERIALIZED VIEW and

SELECT ANY TABLE privilege. 

It does NOT check for the privileges granted through the DBA role.

 

您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP