我開始閱讀Tom Kyte的書,並立即遇到問題:) - sql執行得很好,但基於該sql的CREATE VIEW返回ORA-01031。創建視圖時ORA-01031
命令下面代表 「系統」 用戶的被執行:在3線
create or replace view stats
as select 'STAT...' || a.name name, b.value
from v$statname a, v$mystat b
where a.statistic# = b.statistic#
union all
select 'LATCH.' || name, gets
from v$latch
union all
select 'STAT...Elapsed Time', hsecs from v$timer;
ERROR:ORA-01031:足夠的特權
然而執行SQL呈現沒有錯誤:
select 'STAT...' || a.name name, b.value
from v$statname a, v$mystat b
where a.statistic# = b.statistic#
union all
select 'LATCH.' || name, gets
from v$latch
union all
select 'STAT...Elapsed Time', hsecs from v$timer;
無關您的問題,而是:做**不**創建新的對象爲 –
您可能沒有權限來創建一個視圖'SYSTEM'用戶。 – OldProgrammer
系統被用來找出缺乏特權 - 僅僅爲了簡單起見 – ValeryC