Oracle sqldeveloper - 如何从命令行连接数据库
我正在编写一个小型数据库实用程序。我想让用户能够直接从该实用程序打开 Oracle sqldeveloper 实例。是否可以打开已连接到特定数据库的 Oracle sqldeveloper IDE?
类似于 sqldeveloper USERID/PASSWORD@DATABASE
I am writing a small DB utility. I would like to give the user the ability to open an instance of Oracle sqldeveloper directly from this utility. Is it possible to open Oracle sqldeveloper IDE that already connected to a specific DB?
Something like sqldeveloper USERID/PASSWORD@DATABASE
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
现在可以使用免费的开源 扩展,只要您使用的是 SQL Developer 20.2 或更高版本。
我有 步骤这里有分步说明
它工作的快速 GIF...
This is now possible with a free, open-source extension as long as you're using version 20.2 or higher of SQL Developer.
I have step-by-step instructions here
A quick GIF of it working...
/?比 /h 更有效。有一些选项可以覆盖配置文件,因此您是否可以这样做可能取决于配置文件提供的功能。
/? works rather than /h. There are options to override the cofiguration file so whether you can do that or not is probably determined by the facilities offered by the config file.
幸运的是,是的。现在可以使用 Oracle 的 ConnectionHelper 扩展来实现这一点。
不过,这是一个有点棘手的工作流程。希望他们能找到一种方法将其纳入 SQLDeveloper 本身,因为如果管理层了解如何添加“githubusercontent”存储库,他们可能会误判风险。
另外,请确保您使用最新的 SQLDeveloper (20.2+)。
但这里是这样的:
https://raw.githubusercontent.com/bjeffrie/sqldev-update-center/master/update-center.xml
sqldeveloper -myCLIconnection=user/pw@host:port/service
[这是 Oracle thatjeffsmith 于 他的博客 以及 Oracle 的 Brian Jeffries 在 Oracle 的 github 存储库。]
Luckily, yes. This is now possible using Oracle's ConnectionHelper extension.
It's a bit of hacky workflow, though. Hopefully they'll figure out a way to include in SQLDeveloper itself, because if management learns about adding a 'githubusercontent' repo they might misjudge the risks.
Also, be sure you make use of a pretty recent SQLDeveloper (20.2+).
But here goes:
https://raw.githubusercontent.com/bjeffrie/sqldev-update-center/master/update-center.xml
sqldeveloper -myCLIconnection=user/pw@host:port/service
[This is a combination of what's documented by Oracle's thatjeffsmith on his blog and what Oracle's Brian Jeffries put in Oracle's github repo.]
看来并非如此。
sqldeveloper.exe /h
向我们展示了可能的启动参数,但它们似乎与您的需求没有任何共同点。It doesn't seem so.
sqldeveloper.exe /h
shows us possible launch parameters, and none of them seem to have anything in common with your demand.