The Sybase plugin allows you to create a Sybase database client, and Sybase database deployable, to deploy Sybase SQL database.
This Sybase SQL plugin works the same as all other SQL deployments. For each SQL file in your SQL deployable, a wrapper.sql file is created to ensure proper error handling. This wrapper.sql file is then passed into the SQL database client, with the appropriate flags. (ex/ host, port, username, password, etc)
For this Sybase plugin, the following flags are passed into ISQL:
-S server_name
-D database
-U username
-P password
(Any additionalOptions)
--retserverror
-i inputfile
ref. Sybase ISQL documentation
The actual command, using Freemarker replacement at runtime, will be for Windows:
"${deployed.container.sybHome}\${deployed.container.sybOcs}\bin\isql.exe" -S ${deployed.container.address}:${deployed.container.port} -D ${sanitize(deployed.container.dbName)} -U ${sanitize(cmn.lookup('username'))} -P <#if cmn.lookup('password')??>${sanitize(cmn.lookup('password'))}</#if> ${cmn.lookup('additionalOptions')!} --retserverror -i ${sqlScriptToExecute}
The actual command, using Freemarker replacement at runtime, will be for Unix/Linux:
"${deployed.container.sybHome}/${deployed.container.sybOcs}/bin/isql" -S ${deployed.container.address}:${deployed.container.port} -D ${sanitize(deployed.container.dbName)} -U ${sanitize(cmn.lookup('username'))} -P <#if cmn.lookup('password')??>${sanitize(cmn.lookup('password'))}</#if> ${cmn.lookup('additionalOptions')!} --retserverror -i ${sqlScriptToExecute}
Note: An empty password or 'NULL' password is allowed bij Sybase but using an empty password is considered insecure.
To use the plugin, you:
- Create a sql.SybaseClient under Infrastructure.
- Add the sql.SybaseClient into target Environment definition.
- Create an application, with a sql.SqlScripts deployable.
You can now execute a Sybase database deployment. For an example check the examples directory. Here you will find an Infrastructure As Code file to configure your server with the xl(.exe) client and some innocent SQL files to use against your database.
- Download the version of the plugin from the Releases tab, and install in your XL_DEPLOY/plugins directory or upload to XL Deploy using the pluginmanager.
- Restart XL Deploy.