Sybase ASE
Supported Versions
Support Level
Support Level determines the degree of support available for this database (learn more).
Drivers
|
jConnect |
jTDS |
URL format |
jdbc:sybase:Tds:host:port/database |
jdbc:jtds:sybase://host:port/database |
Ships with Flyway Command-line |
No |
Yes |
Download |
Download from sap.com |
Maven Central coordinates: net.sourceforge.jtds:jtds:1.3.1 |
Supported versions |
7.0 and later |
1.3.1 and later |
Default Java class |
com.sybase.jdbc4.jdbc.SybDriver |
net.sourceforge.jtds.jdbc.Driver |
SQL Script Syntax
Compatibility
- DDL exported by Sybase ASE Client can be used unchanged in a Flyway migration.
- Any Sybase ASE Server sql script executed by Flyway, can be executed by Sybase Interactive SQL client, Sybase Central and
other Sybase ASE Server-compatible tools (after the placeholders have been replaced).
Example
/* Single line comment */
CREATE TABLE Customers (
CustomerId smallint identity(1,1),
Name nvarchar(255),
Priority tinyint
)
GO
CREATE TABLE Sales (
TransactionId smallint identity(1,1),
CustomerId smallint,
[Net Amount] int,
Completed bit
)
GO
/*
Multi-line
comment
*/
-- TSQL
CREATE TRIGGER Update_Customer on Sales
for insert,update
as
declare @errorMsg VARCHAR(200),
@customerID VARCHAR(10)
BEGIN
select @customerID = customerID from inserted
IF exists (select 1 from Sales tbl, inserted i
where tbl.customerID = i.customerID )
begin
select @errorMsg = 'Cannot have 2 record with the same customer ID '+@customerID
raiserror 99999 @errorMsg
rollback
end
END
GO
-- Placeholder
INSERT INTO ${tableName} (name) VALUES ('Mr. T');
Limitations
- No Support for
flyway.schemas
due to Sybase ASE limitations.
- No Support for DDL transactions due to Sybase ASE limitations.
Informix