12.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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Overview2. Create a tsql.ini: This file should be in the same directory that contains the stored procedurefiles (.sql). This file is used during the import. If it is anywhere other than thedirectory containing the *.sql files, it won’t have any effect. An example T<strong>SQL</strong>.INI file isshown below:SET QUOTED_IDENTIFIER OFFSETTINGS UNDERLINE=zSET TRANSACTION ISOLATION LEVEL READ COMMITTEDSET ANSI_NULLS ONSET ROWCOUNT 0SET TEXTSIZE 200SET NOCOUNT ON3. Migrate the Stored Procedures: These are generally in *.sql files and can be loaded usingone of the following commands:For a directory with the .sql extension:DO CompileDirectory^%apiT<strong>SQL</strong>3(,,"dbo.")For a fully-qualified file name:DO CompileBatchFile^%apiT<strong>SQL</strong>3(,,"dbo.")4. Inspect the log file for errors: Search by Error #. A summary count of errors and successfulimports will appear at the end of the log. In most cases, errors can be worked around oraddressed by using information found in this document.5. Compile: It is best to use the command as follows:DO $SYSTEM.OBJ.CompileAll("-l")This command can also be invoked as:DO CompileAll^%apiOBJ("-l")The lowercase “L” qualifier flag specifies that locking is not applied for the duration ofthe compile. For a full list of flag qualifiers, call DO $SYSTEM.OBJ.ShowFlags().6. Migrate the Data: In the System Management Portal select <strong>SQL</strong>, then select the Data<strong>Migration</strong> Wizard.1.2 T<strong>SQL</strong> Language ImplementationT<strong>SQL</strong> procedures are converted to <strong>Caché</strong> methods or queries with a Language type equal toT<strong>SQL</strong>. Use the following command:2 <strong>Caché</strong> <strong>Transact</strong>-<strong>SQL</strong> (T<strong>SQL</strong>) <strong>Migration</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!