| There's a "Parse TSQL files"
button in the top row of buttons, that I found quite useful.
This feature is useful for checking the input files for
syntax errors and other potential problems, before the
actual conversion. This functionality can also be invoked
from the Action > Examine menu item, or by clicking
Ctrl + E.
Press "F1" to access the help files for this
product. The "User Guide" in the help file
provides, step by step instructions for migrating your
SQL Serverdatabase objects to Oracle.
Here's an example, of a T-SQL script, and an equivalent
PL/SQL script produced by this tool. Notice how the
RAISERROR is converted:
T-SQL:
IF EXISTS ( SELECT name from sysobjects where name='TestProcedure' AND type='P')
DROP PROCEDURE TestProcedure
GO
CREATE PROCEDURE dbo.TestProcedure
(
@i int
)
AS
SET NOCOUNT ON
BEGIN
IF @i < 0
BEGIN
RAISERROR ( '@i CANNOT BE LESS THAN 0.', 16, 1 )
END
ELSE
BEGIN
SELECT
id,
Name
FROM MyTable
WHERE id = @i
END
END
GO
Equivalent Oracle PL/SQL version, generated by SwisSQL
SQL Server to Oracle Migration Tool:
CREATE OR REPLACE PROCEDURE TestProcedure
(
i IN INT DEFAULT NULL,
RCT1 IN OUT GLOBALPKG.RCT1
)
AS
BEGIN
BEGIN
IF i < 0 THEN
BEGIN
RAISE_APPLICATION_ERROR(-20001, '@i CANNOT BE LESS THAN 0.' );
END;
ELSE
BEGIN
OPEN RCT1 FOR
SELECT
id,
Name
FROM MyTable
WHERE id = TestProcedure.i;
END;
END IF;
END;
END;
The above is just a simple example, but this product is
capable of converting more complex queries, stored procedures
and functions into PL/SQL.
Here are the source T-SQL and the equivalent PL/SQL
script produced by this tool:
Source T-SQL script file
Resulting PL/SQL script file
As you can see these scripts demonstrate how this tool
converts T-SQL functions and stored procedures into PL/SQL.
The only downside I can think of is that, this product
is a Java based application, and as such does not conform
to Microsoft Windows User Interface guidelines. For
example, you may not be able to close a dialog box by
pressing the Esc key. Or Ctrl + C may not copy text
to clipboard, for example. But don't get discouraged
by this comment, as the product itself is a powerful
tool for the DBA and database developer community involved
in database migrations. I was assured by SwisSQL that
they are working on improving the user interface of
the product.
Here's a tip. By default, every time you start this
application, a command prompt window also starts up,
and stays open, as long as the main application is open.
If this annoys you, then there's a way to prevent this
command prompt window from staying visible. Here's how:
1) Edit the "runTSQL2PLSP.bat" file under
/bin/ folder
2) Modify the option as shown below:
Original statement:
"%javahome%\bin\java"
Modified statement:
start %javahome%\bin\javaw
Now start the product. The command prompt window will
be displayed only for a moment and it will disappear.
Well, this is it for now. You can download a free evaluation
version of AdventNet SwisSQL SQL Server to Oracle Migration
Tool,
from here. Note that SwisSQL provides free technical
support during the evaluation period.
|