13.07.2015 Views

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1Overview<strong>Caché</strong> T<strong>SQL</strong> is an implementation of <strong>Transact</strong>-<strong>SQL</strong> which supports many of the features of both the Microsoft and Sybaseimplementations. <strong>Transact</strong>-<strong>SQL</strong> is used with Microsoft <strong>SQL</strong> Server (MS<strong>SQL</strong>) and Sybase Adaptive Server.<strong>Caché</strong> T<strong>SQL</strong> also contains a few proprietary extensions not found in either of these implementations. These are describedin the Commands chapter.This document will help you to quickly migrate schemas and stored procedures from Microsoft or Sybase databases andit will provide you with an understanding of the T<strong>SQL</strong> (<strong>Transact</strong>-<strong>SQL</strong>) implementation in <strong>Caché</strong>.1.1 Getting StartedTo migrate existing T<strong>SQL</strong> applications to <strong>Caché</strong> T<strong>SQL</strong>, you need to perform three operations: configure <strong>Caché</strong> for T<strong>SQL</strong>,migrate the T<strong>SQL</strong> source code, and migrate the data.1.1.1 Configuring T<strong>SQL</strong>To configure your system for T<strong>SQL</strong>:• Go into the <strong>Caché</strong> Management Portal. Go to [System] > [Configuration] > [<strong>SQL</strong> Settings], then select T<strong>SQL</strong> CompatibilitySettings. Here you can specify the dialect (Sybase or MS<strong>SQL</strong>), and turn on or off the ANSI_NULLS, CASEINSCOMPARE,and QUOTED_IDENTIFIER settings. The default for all three is “off”. These values are used to set the^%SYS(“tsql”,”SET”,...) global array values.• In the Management Portal, select [System] > [Configuration] > [<strong>SQL</strong> Settings] > [General <strong>SQL</strong> Settings], then set theDefault <strong>SQL</strong> Schema Name. This will be the destination schema (which maps to a package) for all unqualified DDLentities.• In the Management Portal, select [System] > [Configuration] > [<strong>SQL</strong> Settings], the select User-defined DDL Mappings tomap any needed user data types.1.1.2 Migrating Source CodeThe initial application migration is simple:1. Migrate the DDL: Import table and view definitions using the DDLImport() method of the %SYSTEM.<strong>SQL</strong>. class.Set this method's DDLMode parameter to either "MS<strong>SQL</strong>Server" or "Sybase". For further details, see the <strong>Caché</strong>Class Reference.<strong>Caché</strong> <strong>Transact</strong>-<strong>SQL</strong> (T<strong>SQL</strong>) <strong>Migration</strong> <strong>Guide</strong> 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!