如何在 Oracle 视图中查看数据,就像通过应用程序查看数据一样?
当我与我的应用程序用户和正确的职责一起浏览 Oracle 应用程序时,我看到了数据。
我使用“记录历史记录”菜单来查看应用程序使用哪个表/视图。
所以,我得到了 PA_EXPEND_ITEMS_ADJUST2_V
。
当我在 sqlplus 会话中与 apps
用户连接时,
SELECT * FROM PA_EXPEND_ITEMS_ADJUST2_V
给我 0 行。
我猜想 apps
有一些配置错误,但是什么?
如何在 sqlplus 会话中使用 apps
用户查看 PA_EXPEND_ITEMS_ADJUST2_V 的行?
如何在 Oracle 视图中查看数据,就像通过应用程序查看数据一样?
When I navigate through the Oracle application with my application user and the right responsibility, I see the data.
I use the "record history" menu to see which table/view is used by application.
So, I got PA_EXPEND_ITEMS_ADJUST2_V
.
When I'm connected with apps
user in a sqlplus session,
SELECT * FROM PA_EXPEND_ITEMS_ADJUST2_V
gives me 0 rows.
I guess that there's something is misconfigurated with the apps
but what ?
How may I view the rows of PA_EXPEND_ITEMS_ADJUST2_V using apps
user in a sqlplus session ?
How may I see the data in the Oracle view like I see it through the application ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这里可能发生了一些行级安全性。可能基于视图,可能是内置的 RLS/FGAC/VPD(或者他们在该版本中给出的任何缩写词)。这就是数据库在幕后重写查询以添加过滤器的地方。
一般是基于SYS_CONTEXT值。
There is probably some row-level security happening here. Possibly based on views, possibly the built-in RLS/FGAC/VPD (or whatever acronym they give it with that version). That's where the database rewrites the query behind the scenes to add in filters.
Generally there are based on SYS_CONTEXT values.
在 Oracle 应用程序中,您必须执行
APPS.FND_GLOBAL.apps_initialize
过程才能在 SQL*Plus 会话中拥有相同的上下文。我使用以下脚本来启动会话:In Oracle Applications you have to execute the
APPS.FND_GLOBAL.apps_initialize
procedure to have the same context in a SQL*Plus session. I use the following script to start a session:您需要使用与应用程序所使用的用户相同的用户(或具有相同权限/角色的用户)登录 Oracle。
您需要与您的 DBA 交谈。
You will need to log into oracle with the same user ( or a user with the same rights/roles ) as what the application is using.
You need to talk to your DBA.
另一种可能性(除了可能涉及的行级安全性之外)是视图基于一个或多个全局临时表 - 这意味着除非您从插入数据的同一会话中查询,否则您将看不到数据。
或者,应用程序可能会在完成数据后删除数据;)
Another possibility (apart from row-level security, which may be involved) is that the view is based on one or more global temporary tables - which means you won't see the data unless you query from within the same session that inserts it.
Or, perhaps, the app is deleting the data after it's finished with it ;)