I love Oracle SQL Developer so I find myself using it a lot to complete my daily tasks. The thing is that my collection of custom snippets only keeps growing so I though it'd be interesting to learn how to backup them.
我喜欢Oracle SQL Developer,所以我发现自己经常使用它来完成我的日常任务。问题是我的自定义片段集合不断增长,所以我知道如何备份它们会很有趣。
Before asking blindly I did a bit of work trying to figure out how. I've performed a search within the application's folder by "snippet" and found the following file:
在盲目地问我之前,我做了一些工作,试图弄清楚如何。我通过“snippet”在应用程序的文件夹中执行了搜索,找到了以下文件:
oracle.sqldeveloper.snippet.jar
which quite probably contains my beloved pieces of code. I could just save that file hoping the best, but why not doing it the right way and perhaps being able to, say, only backup the ones and I've created, avoiding the ones that came out-of-the-box, et cétera?
这很可能包含了我心爱的代码。我可以保存那个希望最好的文件,但为什么不以正确的方式做到这一点,也许只能备份我创建的文件,避免那些开箱即用的文件,等等。等等?
Any suggestion would be really appreciated!
任何建议都会非常感激!
7 个解决方案
#1
On my WinXP machine, I found my User Snippets at:
在我的WinXP机器上,我找到了我的用户代码:
C:\Documents and Settings\eddie\Application Data\SQL Developer\UserSnippets.xml
C:\ Documents and Settings \ eddie \ Application Data \ SQL Developer \ UserSnippets.xml
PS: Replace eddie with your username.
PS:用您的用户名替换eddie。
#2
Agreeing with Eddie Awad, just copy the xml file. And for windows7 the sqldeveloper User-Snippets file can be found here:
同意Eddie Awad,只需复制xml文件即可。对于windows7,可以在此处找到sqldeveloper User-Snippets文件:
C:\Users[username]\AppData\Roaming\SQL Developer\UserSnippets.xml
#3
Are you running on Windows? Check your "C:\Documents and Settings\\Application Data\SQL Developer" directory for a UserSnippets.xml file, it contains all user defined snippets.
你在Windows上运行吗?检查“C:\ Documents and Settings \\ Application Data \ SQL Developer”目录中的UserSnippets.xml文件,它包含所有用户定义的片段。
Also, check the online help for "Location of User-Related Information" topic. It has location of files that hold other user defined info.
另外,请查看“用户相关信息的位置”主题的在线帮助。它具有包含其他用户定义信息的文件位置。
-Dave
#4
If you use SQL Developer on Mac OS X, then the snippets can be found in ~/Library/Application Support/SQL Developer/UserSnippets.xml
如果您在Mac OS X上使用SQL Developer,那么可以在〜/ Library / Application Support / SQL Developer / UserSnippets.xml中找到这些片段。
#5
Why not create a package on the Oracle server for daily maintenance that way it's stored with your DB and in your DB backups?
为什么不在Oracle服务器上创建一个包进行日常维护,就像它存储在数据库和数据库备份中一样?
EDIT: I do this and find it even easier to use them later on when performing routine maintenance tasks. Being able to call a packaged procedure is really, REALLY handy sometimes.
编辑:我这样做,发现在以后执行日常维护任务时更容易使用它们。能够打电话给一个打包的程序真的,有时真的很方便。
#6
For SQL Developer 3.2.20.09 on OS X Mountain Lion (10.8.*), the snippet file is located in ~/.sqldeveloper/UserSnippets.xml
.
对于OS X Mountain Lion(10.8。*)上的SQL Developer 3.2.20.09,该代码段文件位于〜/ .sqldeveloper / UserSnippets.xml中。
#7
On OS-X Yosemite (10.10.5) I found the current UserSnippets.xml for the current SQL Developer ( Version 4.1.0.19 ) also in ~/.sqldeveloper/UserSnippets.xml
在OS-X Yosemite(10.10.5)上,我在〜/ .sqldeveloper / UserSnippets.xml中找到了当前SQL Developer(版本4.1.0.19)的当前UserSnippets.xml
#1
On my WinXP machine, I found my User Snippets at:
在我的WinXP机器上,我找到了我的用户代码:
C:\Documents and Settings\eddie\Application Data\SQL Developer\UserSnippets.xml
C:\ Documents and Settings \ eddie \ Application Data \ SQL Developer \ UserSnippets.xml
PS: Replace eddie with your username.
PS:用您的用户名替换eddie。
#2
Agreeing with Eddie Awad, just copy the xml file. And for windows7 the sqldeveloper User-Snippets file can be found here:
同意Eddie Awad,只需复制xml文件即可。对于windows7,可以在此处找到sqldeveloper User-Snippets文件:
C:\Users[username]\AppData\Roaming\SQL Developer\UserSnippets.xml
#3
Are you running on Windows? Check your "C:\Documents and Settings\\Application Data\SQL Developer" directory for a UserSnippets.xml file, it contains all user defined snippets.
你在Windows上运行吗?检查“C:\ Documents and Settings \\ Application Data \ SQL Developer”目录中的UserSnippets.xml文件,它包含所有用户定义的片段。
Also, check the online help for "Location of User-Related Information" topic. It has location of files that hold other user defined info.
另外,请查看“用户相关信息的位置”主题的在线帮助。它具有包含其他用户定义信息的文件位置。
-Dave
#4
If you use SQL Developer on Mac OS X, then the snippets can be found in ~/Library/Application Support/SQL Developer/UserSnippets.xml
如果您在Mac OS X上使用SQL Developer,那么可以在〜/ Library / Application Support / SQL Developer / UserSnippets.xml中找到这些片段。
#5
Why not create a package on the Oracle server for daily maintenance that way it's stored with your DB and in your DB backups?
为什么不在Oracle服务器上创建一个包进行日常维护,就像它存储在数据库和数据库备份中一样?
EDIT: I do this and find it even easier to use them later on when performing routine maintenance tasks. Being able to call a packaged procedure is really, REALLY handy sometimes.
编辑:我这样做,发现在以后执行日常维护任务时更容易使用它们。能够打电话给一个打包的程序真的,有时真的很方便。
#6
For SQL Developer 3.2.20.09 on OS X Mountain Lion (10.8.*), the snippet file is located in ~/.sqldeveloper/UserSnippets.xml
.
对于OS X Mountain Lion(10.8。*)上的SQL Developer 3.2.20.09,该代码段文件位于〜/ .sqldeveloper / UserSnippets.xml中。
#7
On OS-X Yosemite (10.10.5) I found the current UserSnippets.xml for the current SQL Developer ( Version 4.1.0.19 ) also in ~/.sqldeveloper/UserSnippets.xml
在OS-X Yosemite(10.10.5)上,我在〜/ .sqldeveloper / UserSnippets.xml中找到了当前SQL Developer(版本4.1.0.19)的当前UserSnippets.xml