简体   繁体   English

Oracle 12c sys.snap $视图不存在

[英]Oracle 12c sys.snap$ view does not exist

I am trying to run Redgate Schema compare tool, and I am getting the following errors: 我正在尝试运行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)

I tried to query the view directly from sql developer, but with no luck. 我试图直接从sql developer查询视图,但是没有运气。 I'm assuming this isn't correct, but I have no idea how to fix it. 我假设这是不正确的,但我不知道如何解决。 Any help would be appreciated. 任何帮助,将不胜感激。

I know this question was asked sometime back. 我知道这个问题有时会被问到。 For all others benifit I would like to respond. 对于所有其他利益,我想回应。

As per my knowledge these type of views can be accessed by sys user by default. 据我所知,默认情况下, sys用户可以访问这些类型的视图。 Since the user doesn't have a DBA and if he is aware of how to logon as " sys as sysdba " then you should be able to access snap$ . 由于用户没有DBA,并且如果他知道如何以“ sys as sysdba ”身份登录,那么您应该可以访问snap $

The alternate method is to ask the DBA to grant 另一种方法是要求DBA授予

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM