Ingres Community Forums Login Register Ingres.com  

Ingres Community Forum


Go Back   Ingres Community Forums > Ingres Forums > DBA Forum
 

Reply
 
LinkBack Thread Tools Display Modes
Old 2009-06-29   #1 (permalink)
Junior Member
 
Join Date: Jun 2009
Posts: 1
Default Oracle Stored Procedure to Ingres

Hi,

I'm going to be migrating an oracle database to Ingres, and I'm trying to find a conversion tool that will convert the stored procedures.

I've found a conversion tool that will convert the PL/SQL stored procs to T-SQL for SQL Server because I think that T-SQL is closer to the Ingres Syntax, but I have not been able to find any tool nor documentation on converting stored procs from T-SQL to Ingres or PL/SQL to Ingres.

Any help would be greatly appreciated.

Thanks,
zak
dbczak is offline   Reply With Quote
Old 2009-06-30   #2 (permalink)
Ingres Community
 
Join Date: Mar 2007
Location: Cheshire, UK
Posts: 34
Default

There was shift2ingres, the winner of CA's "million dollar challenge" - but it doesn't look like that project has been maintained for a few years now: SourceForge.net: Shift2Ingres

PL/SQL and T-SQL are very complex languages, that can run things like Java or VBScript natively. Ingres procedures offer relatively limited "database" functionality, so trying to convert an procedures in this way may not be an option.
nick.bolton@barclays.com is offline   Reply With Quote
Old 2009-06-30   #3 (permalink)
Ingres Corp
 
Join Date: Mar 2007
Location: On the OpenROAD
Posts: 666
Default

As Nick said PL/SQL and T-SQL are very complex, but often you can convert a complex language construct in a much less complex one in Ingres.
E.g. in SQLServer you can use cursors within a stored procedure:
Code:
DECLARE my_cursor CURSOR FOR SELECT ... FOR UPDATE;
OPEN my_cursor;
FETCH NEXT FROM my_cursor ...;
WHILE ::FETCH_STATUS = 0
BEGIN
    <statements>
    FETCH NEXT FROM my_cursor;
END;
CLOSE my_cursor;
DEALLOCATE my_cursor;
You can't declare a cursor in Ingres DB Procedures, but there is much easier way to get the same:
Code:
FOR SELECT ...
DO
    <statements>
ENFDOR;
An conversion tool will often just try a 1:1 translation, which often also means bad performance, etc.
Using your gray cells is a viable alternative
Bodo is offline   Reply With Quote

Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© 2009 Ingres Corporation. All Rights Reserved