Am 16.01.24 um 12:54 schrieb Nicholas Foley:
> Hi all,
>
> I’m wondering if someone may be able to help me. We use a jdbc driver to
> connect to an oracle database. I’m trying to get data from this database
> in an automated way, unfortunately our IT are removing the ODBC driver
> we did have. So I’m wondering is there a way I can launch squirrel via a
> custom batch file. And include some text that’ll tell it to use this
> driver, with this alias setup and this username/password and run this
> SQL statement and return a specific filename I provide. This’ll then run
> squirrel ideally without showing the screen, and automatically return
> the results to the file given and then close that squirrel window.
>
> Thanks
For the following you will need the latest version (4.6.0) of SQuirreL.
It won't work with version 3.6.
Go to the squirrelcli sub directory of your SQuirreL installation and
open a Powershell in this directory. Try if you can execute the command
.\squirrelcli.bat -help
If this doesn't work open the squirrelcli.bat file in some editor and put
SET JAVA_HOME=<pathToYourJavaJDKInstallationDir>
in the first line of the file an try to execute the command again.
If the command executes correctly it will explain the command line
parameters you can use for the command. Here's an example that may come
close to what you want:
.\squirrelcli.bat -alias <yourAliasName> -sql "<yourSql>"
-toFileFormatted <pathToYourOutputFile>
Gerd
|