Oracle SQL Developer 中的旧 SQL 历史记录
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25807835/
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
Old SQL History in Oracle SQL Developer
提问by user3035077
In SQL Developer, i was finding some SQL commands of previous month but not able to find that as it is showing only the records of last 4-5 days.
在 SQL Developer 中,我找到了上个月的一些 SQL 命令,但无法找到,因为它只显示最近 4-5 天的记录。
Is there any way to find the old SQL commands those are not displaying under SQL history tab.
有什么方法可以找到那些没有在 SQL 历史记录选项卡下显示的旧 SQL 命令。
Thanks.
谢谢。
回答by Patrick Bacon
As Oracle has documented, there is a SQL history folder and it is larger (has more SQL queries that go back about a year) than the SQL History tool bar (a couple of months).
正如 Oracle 所记录的那样,有一个 SQL 历史文件夹,它比 SQL 历史工具栏(几个月)更大(有更多的 SQL 查询可以追溯到大约一年)。
Here is the content of my SQL History tool bar:
这是我的 SQL History 工具栏的内容:
With respect to the SQL history folder, release notes cite this location in Windows 7:
关于 SQL 历史文件夹,发行说明在 Windows 7 中引用了这个位置:
C:\Users\your_user_name\AppData\Roaming\SQL Developer\SqlHistory
C:\Users\your_user_name\AppData\Roaming\SQL Developer\SqlHistory
While this folder contains SQL History, it also contains: User-defined reports and user-defined snippets files (e.g. see 3.1 Sql Developer release notes) Here is my SQL History folder:
虽然此文件夹包含 SQL 历史记录,但它还包含: 用户定义的报告和用户定义的片段文件(例如,请参阅 3.1 Sql Developer 发行说明)这是我的 SQL 历史记录文件夹:
I do not see any documentation to adjust the size of either.
我没有看到任何调整两者大小的文档。
回答by Alberto Cerqueira
回答by MiguelKVidal
In SQL Developer, to change the limit go to:
Tools -> Preferences
.
在 SQL Developer 中,要更改限制,请转到:
Tools -> Preferences
。
Inside this, navigate to:
在这个里面,导航到:
Database –> Worksheet –> SQL History Limit
Change it to whatever you want. (In 4.0.1.14, the max was 999999999.)
将其更改为您想要的任何内容。(在 4.0.1.14 中,最大值为 999999999。)
Hope it helps.
希望能帮助到你。
Best regards.
此致。
回答by Roberto Garcia
Well, I think there is another option like this:
好吧,我认为还有另一种选择:
In SQL Developer> View menu:
在 SQL Developer > 查看菜单中:
Then, go to file option:
然后,转到文件选项:
and you got recent file tab:
你有最近的文件标签:
回答by Lalit Kumar B
If your queries are still in the shared_pool, you can use v$sql
and v$sqlarea
. They would be flushed out regularly, but you can find them till that period of time.
如果您的查询仍在 shared_pool 中,则可以使用v$sql
和v$sqlarea
。它们会定期冲洗掉,但在此之前您可以找到它们。