Using the guide https://www.sql-workbench.eu/manual/commandline.html#commandline-connect-noprofile
to set up as profile and save the profile for future use.
This is possible manually via "7.2. Managing profile groups"
https://www.sql-workbench.eu/manual/profiles.html#profile-workbench-settings
Is it possible to save a profile via the command line?
SQLWorkbench64.exe -username=user -password=pass -url=jdbc.. -driver=Redshift driverJar=filepath
There is no direct support for this.
But you can use the WbStoreProfile command to store the currently active connection as a profile.
You can do this through the -command
parameter.
SQLWorkbench64.exe -command="WbStoreProfile -name=test" -username=user -password=pass -url=jdbc.. -driver=Redshift driverJar=filepath
That will connect to the database, then run the WbStoreProfile
command and exit again.
The profile will be saved under the name "test" in wb-profiles.properties
.
But it's probably easier to edit wb-profiles.properties
manually.