设置PLSQL启动自动登录指定数据库

Posted lunarflyer

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了设置PLSQL启动自动登录指定数据库相关的知识,希望对你有一定的参考价值。

设置PLSQL启动自动登录数据库

在做公司的项目中,有多个测试环境,在deubg问题时经常要连不同的数据库。虽然PLSQL可以保存登录用户名和密码,但是每次选择的时候在一排数据库中选择的时候很容易看花眼,就想有没有什么便捷的方法可以直接登录数据库。

在看PLSQL的帮助文档时,发现33.4有这么一段话:

userid
Every time you start PL/SQL Developer, it will prompt you for at least the password. To avoid this, you can supply a userid parameter with the familiar username/[email protected] format:
plsqldev.exe userid=scott/[email protected]
Note that you can also use the following registry key to supply a default logon:
HKEY_CURRENT_USERSoftwareAllround AutomationsPL/SQL DeveloperLogon
Here you can add a Username, Password and Database.
The last method has the advantage that it enables you to be automatically logged on after double clicking a PL/SQL Developer registered file.

也就是说,在运行plsqldev.exe时,在后面加上“user=登录信息”参数,PLSQL启动后就会自动登录,因此创建带有不同数据库连接的PLSQL快捷方式就可以实现这个需求。

打开PLSQL的安装目录,右键plsqldev.exe,选择发送到-桌面快捷方式,在桌面上右键plsqldev.exe - 快捷方式文件-属性,在目标的引号后加上数据库连接信息,格式如下:

user=用户名/密码@数据库地址

技术分享图片

创建多个快捷方式,每个快捷方式对应一个数据库,改不同的名字,这样看起来非常的美观。
技术分享图片








以上是关于设置PLSQL启动自动登录指定数据库的主要内容,如果未能解决你的问题,请参考以下文章

oracle 的sql*plus问题

linux怎么设置root自动登录

linux自动登录

启动后自动登录windows

C# .NET winform 打开指定(谷歌)浏览器,如何设置cookie 实现自动登录

TX1 文字界面启动与root用户自动登录设置