Browse Prior Art Database

A Method and System to Generate Portable SQL Archives Across Platforms for Database Stored Procedures

IP.com Disclosure Number: IPCOM000030813D
Original Publication Date: 2004-Aug-27
Included in the Prior Art Database: 2004-Aug-27
Document File: 2 page(s) / 39K

Publishing Venue

IBM

Abstract

A program is disclosed that implements portable SQL archive (SAR) files. Current database systems generate operating system dependent SAR files for stored procedures. Database developers have to compile stored procedures into database systems on different operating systems as the SAR files are not portable.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 2

A Method and System to Generate Portable SQL Archives Across Platforms for Database Stored Procedures

There are three ways to implement portable SQL archive (SAR) files. Either an intermediate format such as XML or bytecode is used or a cross platform disassembler is used.

The first way to implement a portable SAR file is by setting a new database switch called stored-procedure-cross-compiler to on. If the switch stored-procedure-cross-compiler is not set to on then the SAR file that contains the binary code will not be installed in the database if the binary code came from a different operating system. If the switch stored-procedure-cross-compiler is set to on then when installing the SAR file in the database the binary code will be examined to see if it came from a different operating system. If the binary code came from the same operating system then the stored procedure will be installed without having to go through the cross compiler. Otherwise, the cross compiler is invoked to disassemble the binary code and transform it into source code that can be compiled on the destination operating system. Once the source has been written then the stored procedure is regenerated as usual.

The second way to implement a portable SAR file is by specifying an option to create bytecode when generating a stored procedure. When creating an SQL archive a new option would be specified to create it from the bytecode instead of the binary. When installing the SQL archive an option would be specified to indicate bytecode is being used to...