squirrel sql client settings folder location

37,319

Solution 1

About the local settings directory of SQuirreL:

SQuirrel SQL is an application written in Java and it uses the Java System Property user.home to store the local configuration files. Per default, this Java Property points to the home directory of the user. You can change this by the following steps:

Open squirrel-sql.bat in a text editor and navigate to the end of the file. One of the last lines should start with "start "SQuirreL SQL Client" - you have to change this line. Add -Duser.home=PathToStoreTheSquirrelConfigDir just after the -Xmx argument and ensure, that the new Argument is separated by a space from the others.

Here an example:

 -Xmx256m -Duser.home=C:/temp -Dsun.java2d.noddraw=true

Note, that I use the slash and not a back-slash!

Now you can move the existing .squirrel-sql directory to the new place. e.g C:\temp\.squirrel-sql

Now, if you start SQuirreL SQL, it will use the new storage location. You can verify this in the global properties of SQuirrel (see the section SQuirreL paths)

About the installer version of SQuirreL:

SQuirreL SQL also offers a plain zip instead of a installer version. Here is the link to the latest stable version

SQuirreL is offering 3 packages (base, standard, optional). The difference between them are the packaged plugins. I use the optional package - but the standard package is also fine.

Solution 2

You can use the Squirrel-Parameter --user-settings-dir, but unlinke the other answer with -Duser.home you have to use the actual Squirrel-Settings-Directory, e.g. the one with all the xml-Settings files and the folders logs and plugins.

You can use that parameter on the .jar / main-class directly, but also on the squirrel-sql.bat or squirrel-sql.sh file, so you don't need to edit those.

Example:

C:\dev\squirrel-sql\squirrel-sql-3.9.0\squirrel-sql.bat --user-settings-dir=C:\dev\squirrel-sql\squirrel-sql-settings

This is from the Squirrel-Manual, strangly enough, i couldn't find an online-source for it (only an outdated one), buts inside the squirrel installation folder, e.g. squirrel-sql-3.9.0/doc/quick_start.html

Share:
37,319
Ayusman
Author by

Ayusman

Updated on February 21, 2020

Comments

  • Ayusman
    Ayusman about 4 years

    I installed the squirrel client 3.4.0 on my windows 7 64 bit machine.

    I see a squirrel client settings folder

    ".squirrel-sql"

    created in:

    C:\Users\ayusman\

    Is there any way I can specify the folder location to be in my squirrel install location i.e.

    "C:\tools\dumps\Squirrel-3.4.0"

    location?

    The reason I want to do this is to make my squirrel set up easily movable between machines; I could just take the dump of the application and I will be ready to go on any machine.

    Also is there a Squirrel-sql distribution that does not do the installation; but rather just a simple zip file that I can unzip to any location and start working?

  • Vadzim
    Vadzim almost 10 years
    SQuirreL SQL connection aliases location: %USERPROFILE%\.squirrel-sql\SQLAliases23.xml
  • Davor Josipovic
    Davor Josipovic over 8 years
    Is there any way to do this through the shortcut that is pointing to squirrel-sql.bat? (i.e. without modifying the squirrel-sql.bat). Like ...\squirrel-sql.bat "-Duser.home=C:/temp". As far as I can see, squirrel-sql.bat accepts parameters, but they are all set at the end of the command line, and thus not correctly (?) interpreted.
  • oᴉɹǝɥɔ
    oᴉɹǝɥɔ over 4 years
    This is perfect to both keep settings for different versions and gives ability to move configuration directory from $HOME to $HOME/.config (where it is supposed to be in Linux)