Skip to content

This plugin offers an interface from XL Deploy to deploy Sybase database scripts

License

Notifications You must be signed in to change notification settings

xebialabs-community/xld-sybase-plugin

Repository files navigation

xld-sybase-plugin

Build Status Codacy Badge Code Climate License: MIT Github All Releases

Preface

The Sybase plugin allows you to create a Sybase database client, and Sybase database deployable, to deploy Sybase SQL database.

Overview

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:

  1. Create a sql.SybaseClient under Infrastructure.
  2. Add the sql.SybaseClient into target Environment definition.
  3. 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.

Installation

  1. 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.
  2. Restart XL Deploy.

References

Introduction to SQL Database Plugin

Extend the XL Deploy Database plugin

About

This plugin offers an interface from XL Deploy to deploy Sybase database scripts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •