Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

squirrel sql client settings folder location

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?

like image 633
Ayusman Avatar asked Aug 27 '12 19:08

Ayusman


2 Answers

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.

like image 63
wis775 Avatar answered Sep 22 '22 11:09

wis775


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

like image 44
hinneLinks Avatar answered Sep 18 '22 11:09

hinneLinks