Oracle 12c sys.snap $ view不存在

时间:2015-07-10 13:37:10

标签: oracle

我正在尝试运行Redgate Schema比较工具,我收到以下错误:

SELECT s.sowner as owner, s.vname as mview_name, decode(bitand(s.flag, 262144), 262144, 'Y', 'N') as reduced_precisions 
FROM sys.snap$ s 
WHERE (s.sowner = 'OBSOLESCENCE_DATA_STORE' );
10:25:26.511|Error  |Object Model        |7  |Failed to execute reader
Devart.Data.Oracle.OracleException (0x80004005): ORA-00942: table or view does not exist
at Devart.Data.Oracle.a7.b(Int32 A_0)
at Devart.Data.Oracle.a9.a(Int32 A_0, bw A_1)
at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at Devart.Data.Oracle.OracleCommand.ExecuteReader()
at RedGate.Oracle.Common.ObjectModel.DatabaseReader.ExecuteReader(String script)

我试图直接从sql开发人员查询视图,但没有运气。我假设这不正确,但我不知道如何解决它。任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

我知道这个问题有时会被问到。对于所有其他人,我想回应。

据我所知,默认情况下, sys 用户可以访问这些类型的视图。 由于用户没有DBA,并且如果他知道如何登录“ sys as sysdba ”,那么您应该能够访问 snap $

另一种方法是要求DBA授予

GRANT SELECT on sys.snap$ to *[user logged in]*