Oracle:如何为所有开发人员启用闪回“截至”查询?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/752382/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle: how to enable flashback "as of" queries for all developers?
提问by Mark Harrison
How do I enable flashback queries for all of my developers on my Oracle instance?
如何为我的 Oracle 实例上的所有开发人员启用闪回查询?
Flashback queries are executed as of a particular time so that
闪回查询在特定时间执行,以便
select * from mytable as of timestamp(sysdate-1);
will show the contents of the table as of 24 hours ago.
将显示截至 24 小时前的表格内容。
回答by Mark Harrison
grant execute on dbms_flashback to public;
grant flashback any table to public;
回答by Yas
You can use flashback query for your own tables without needing any privileges. If you want other users to use flashback query on your tables you need to grant select and flashback privileges to those users.
您可以对自己的表使用闪回查询,无需任何权限。如果您希望其他用户对您的表使用闪回查询,您需要向这些用户授予选择和闪回权限。
If you want to see data as of 24 hours ago you need to have an adequately sized undo tablespace and properly set undo retention.
如果您想查看 24 小时前的数据,您需要有一个足够大的撤消表空间并正确设置撤消保留。