• <bdo id='3Tqlb'></bdo><ul id='3Tqlb'></ul>
    <legend id='3Tqlb'><style id='3Tqlb'><dir id='3Tqlb'><q id='3Tqlb'></q></dir></style></legend>
  • <tfoot id='3Tqlb'></tfoot>

  • <i id='3Tqlb'><tr id='3Tqlb'><dt id='3Tqlb'><q id='3Tqlb'><span id='3Tqlb'><b id='3Tqlb'><form id='3Tqlb'><ins id='3Tqlb'></ins><ul id='3Tqlb'></ul><sub id='3Tqlb'></sub></form><legend id='3Tqlb'></legend><bdo id='3Tqlb'><pre id='3Tqlb'><center id='3Tqlb'></center></pre></bdo></b><th id='3Tqlb'></th></span></q></dt></tr></i><div id='3Tqlb'><tfoot id='3Tqlb'></tfoot><dl id='3Tqlb'><fieldset id='3Tqlb'></fieldset></dl></div>

      1. <small id='3Tqlb'></small><noframes id='3Tqlb'>

      2. dba_jobs_running:尝试从过程访问时,表或视图不存在

        dba_jobs_running: table or view does not exist when trying to access from procedure(dba_jobs_running:尝试从过程访问时,表或视图不存在)

          <legend id='YHzva'><style id='YHzva'><dir id='YHzva'><q id='YHzva'></q></dir></style></legend>

              <i id='YHzva'><tr id='YHzva'><dt id='YHzva'><q id='YHzva'><span id='YHzva'><b id='YHzva'><form id='YHzva'><ins id='YHzva'></ins><ul id='YHzva'></ul><sub id='YHzva'></sub></form><legend id='YHzva'></legend><bdo id='YHzva'><pre id='YHzva'><center id='YHzva'></center></pre></bdo></b><th id='YHzva'></th></span></q></dt></tr></i><div id='YHzva'><tfoot id='YHzva'></tfoot><dl id='YHzva'><fieldset id='YHzva'></fieldset></dl></div>

                <bdo id='YHzva'></bdo><ul id='YHzva'></ul>
                <tfoot id='YHzva'></tfoot>
                    <tbody id='YHzva'></tbody>
                • <small id='YHzva'></small><noframes id='YHzva'>

                  本文介绍了dba_jobs_running:尝试从过程访问时,表或视图不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  使用类似

                  select * from dba_jobs_running;
                  

                  在我的 sqldevelopers SQL 控制台中执行时工作正常.

                  works fine when executed in my sqldevelopers SQL console.

                  但是,当在一个过程中有完全相同的语句时,它不起作用.编译失败

                  However, it does not work, when having exactly the same statement within a procedure. Compilation fails with

                  PL/SQL: ORA-00942: table or view does not exist
                  

                  有什么想法吗?是否需要考虑范围之类的东西?

                  Any ideas? Is there something like a scope to be considered?

                  非常感谢任何建议,提前致谢:)

                  Any suggestions are highly appreciated, thanks in advance :)

                  推荐答案

                  您可能需要对拥有该过程的用户执行 DBA_JOBS_RUNNING 的直接 GRANT.通过角色进行 GRANT 是行不通的.... 授权需要是明确的.

                  You probably need to do a direct GRANT of DBA_JOBS_RUNNING to the user that owns the procedure. Doing a GRANT via a role won't work.... the grant needs to be explicit.

                  在过程中执行 SELECT 与从过程外部(例如在 SQL-Developer 中)执行 SELECT 所需的权限略有不同.拥有过程的用户必须已明确授予对表或视图的权限...如果从视图外部运行查询,则情况并非如此(例如,您可以通过角色授予权限)

                  Doing a SELECT from within a procedure requires subtly different permissions to doing a SELECT from outside a procedure (e.g. in SQL-Developer). The user that owns a procedure must have been explicitly granted rights to the table or view... if running a query from outside a view this is not the case (you can be granted the permission through a role for example)

                  您需要以 SYS 身份连接并继续:

                  You need to connect as SYS and go:

                  GRANT SELECT ON SYS.DBA_JOBS_RUNNING TO <user-that-owns-proc>;
                  

                  这篇关于dba_jobs_running:尝试从过程访问时,表或视图不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Accessing another user#39;s table within an Oracle Stored Procedure(在 Oracle 存储过程中访问另一个用户的表)
                  Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)(超出最大存储过程、函数、触发器或视图嵌套级别(限制 32))
                  How to View Oracle Stored Procedure using SQLPlus?(如何使用 SQLPlus 查看 Oracle 存储过程?)
                  How to debug stored procedure in VS 2015?(如何在 VS 2015 中调试存储过程?)
                  How to Pass Java List of Objects to Oracle Stored Procedure Using MyBatis?(如何使用 MyBatis 将 Java 对象列表传递给 Oracle 存储过程?)
                  Set the variable result, from query(设置变量结果,来自查询)
                  • <small id='cdeWR'></small><noframes id='cdeWR'>

                        <i id='cdeWR'><tr id='cdeWR'><dt id='cdeWR'><q id='cdeWR'><span id='cdeWR'><b id='cdeWR'><form id='cdeWR'><ins id='cdeWR'></ins><ul id='cdeWR'></ul><sub id='cdeWR'></sub></form><legend id='cdeWR'></legend><bdo id='cdeWR'><pre id='cdeWR'><center id='cdeWR'></center></pre></bdo></b><th id='cdeWR'></th></span></q></dt></tr></i><div id='cdeWR'><tfoot id='cdeWR'></tfoot><dl id='cdeWR'><fieldset id='cdeWR'></fieldset></dl></div>
                        <tfoot id='cdeWR'></tfoot>
                      1. <legend id='cdeWR'><style id='cdeWR'><dir id='cdeWR'><q id='cdeWR'></q></dir></style></legend>

                            <tbody id='cdeWR'></tbody>
                            <bdo id='cdeWR'></bdo><ul id='cdeWR'></ul>