sql - 从命令行/批处理在 SQL Workbench/j 中设置和保存连接配置文件
问题描述
使用指南https://www.sql-workbench.eu/manual/commandline.html#commandline-connect-noprofile
设置为配置文件并保存配置文件以供将来使用。
这可以通过“7.2. 管理配置文件组”手动操作
https://www.sql-workbench.eu/manual/profiles.html#profile-workbench-settings
是否可以通过命令行保存配置文件?
SQLWorkbench64.exe -username=user -password=pass -url=jdbc.. -driver=Redshift driverJar=filepath
解决方案
对此没有直接的支持。
但是您可以使用WbStoreProfile命令将当前活动的连接存储为配置文件。
您可以通过-command
参数执行此操作。
SQLWorkbench64.exe -command="WbStoreProfile -name=test" -username=user -password=pass -url=jdbc.. -driver=Redshift driverJar=filepath
这将连接到数据库,然后运行WbStoreProfile
命令并再次退出。
配置文件将以名称“test”保存在wb-profiles.properties
.
但是wb-profiles.properties
手动编辑可能更容易。
推荐阅读
- javascript - 使用来自的值填充模态
- sql - 无法在 Apex Oracle SQL/PL PLS-00103 中编译我的触发器
- git - Git是否更改了“!” .gitignore 的前缀行为?
- typescript - Electron TypeScript Parcel 第二个 BrowserWindow
- python - Python中列值的累积和循环重置每年特定月份的值
- c# - 如何选择列表框中的项目,以便列表框呈现所选项目的子数组
- php - 合并描述和附加信息。边框未延伸到内容
- python - 如何从文本文件中读取数据库凭据?
- android - 使用 android:configChanges="orientation|screenSize"/> 并且它在方向更改时弄乱了我的横向布局
- typescript - 如何隐藏函数参数缺失类型通知?