Tuesday, May 16, 2006

[Product Review] SwisSQL SQLOne Console 3.0

Few days back Srikanth from SwisSQL got in touch with me and introduced me to their new product called "SwisSQL - SQLOne Console 3.0". I initially thought I would fiddle with it sometime in the weekend. But one of the meeting which was about to happen yesterday evening got cancelled and so I came early to home than usual. I just utilized that time to review this product.

About the product:

1) SQLOne Console is an automated SQL Migration tool offering SQL Conversion, Execution and Comparison across multiple databases.

2) SQLOne Console migrates SQLs, either available as stand alone scripts or as embedded SQL statements within Application code like VB, PB, VC++, Java etc.,.

3) It supports Migration across Oracle, SQL Server, DB2, MySQL, Sybase, PostgreSQL, Informix and ANSI-SQL database SQL dialects.

4) This software also has features to test the converted SQLs in target databases. It would be a very handy product to have in database migration projects as well DBAs working in multi-database environment.

Here we go ....

I downloaded and installed the 30-day trial pack of that product from here. The trial pack was not restricted in anyway as far as the functionalities are concerned. But the only hitch is we can run / test only 50 queries by using it.

When I clicked on the SwisSQL shortcut, which got created, on my desktop it first opened the command prompt. After couple of seconds it opened the GUI application.


Once I clicked on "OK" button the application got loaded without any hassles. The screen was divided horizontally into three parts as shown in the screenshot below.



This app consists of 3 frames and they are,

1) The first part of the screen is where you could type your code snippet that needs to be converted into other database dialect. Once you type a query and click on "Convert" from the toolbar (you could also press F5 key to run the queries) the converted query would be displayed in the middle frame.

2) The center frame in the above screenshot is where the converted code snippet would be displayed. Various DB, which is supported by this product, is displayed in a tabbed fashion in this frame. Interestingly one F5 is enough for the product to convert the query into all the 8 DB dialect at one short.

3) The bottom frame is where the executed result would be displayed. Obviously we need to set the connection strings (which could be easily done using settings menu >> Database Connection settings).

Few of the code snippets which I have tried myself are:

Sample 1 :: First I tested with NewID() function of SQL Server.

SQL Server -- Select newId()
Oracle - SELECT SYS_GUID() FROM SYS.DUAL
DB2 - SELECT GENERATE_UNIQUE() FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY
Informix - SELECT FIRST 1 SYS_GUID() FROM SYSTABLES
PostgreSQL - SELECT SYS_GUID()
MySQL - SELECT SYS_GUID()
ANSI SQL - SELECT SYS_GUID()
Sybase - SELECT NEWID()

Sample 2: Then I checked out how Identity() and Primary Key constraint performs in all the DBs.

SQL Server -
CREATE TABLE tblTest
(
Field1 int Identity NOT NULL ,
Field2 varchar (30) ,
Field3 int CONSTRAINT pk_parent PRIMARY KEY nonclustered (Field1)
)

Oracle -
CREATE SEQUENCE tblTest_Field1_SEQ
START WITH 1
INCREMENT BY 1
/

/* AdventNet SwisSQL Message : Query split into multiple Queries. */

CREATE TABLE tblTest
(
Field1 int NOT NULL ,
Field2 VARCHAR2 (30) ,
Field3 int null ,
CONSTRAINT pk_parent PRIMARY KEY (Field1)
)


DB2 -
CREATE TABLE tblTest
(
Field1 int GENERATED BY DEFAULT AS IDENTITY(START WITH 1 INCREMENT BY 1) NOT NULL ,
Field2 varchar (30) ,
Field3 int CONSTRAINT pk_parent PRIMARY KEY NOT NULL
)

Informix -
CREATE TABLE tblTest
(
Field1 int NOT NULL ,
Field2 varchar (30) ,
Field3 int PRIMARY KEY
)

PostgreSQL -
CREATE TABLE tblTest
(
Field1 INT8 NOT NULL ,
Field2 varchar (30) ,
Field3 INT8 CONSTRAINT pk_parent PRIMARY KEY null
)

MySQL ::
CREATE TABLE `tblTest`
(
`Field1` int NOT NULL ,
`Field2` varchar (30) ,
`Field3` int CONSTRAINT `pk_parent` PRIMARY KEY null
)

ANSI SQL ::
CREATE TABLE tblTest
(
Field1 int NOT NULL ,
Field2 varchar (30) ,
Field3 int CONSTRAINT pk_parent PRIMARY KEY null
)

Sybase ::
CREATE TABLE tblTest
(
Field1 NUMERIC Identity NOT NULL ,
Field2 varchar (30) ,
Field3 int ,
CONSTRAINT pk_parent PRIMARY KEY nonclustered (Field1)
)

Sample 3 : I tried to convert this SQL Server query Execute sp_MSForeachTable @command1 = "sp_help '?'"

It didn't work out. When I discussed regarding this with Srikanth I came to know that SwisSQL SQLOne Console converts SQLs only and does not handle T-SQL blocks.

To migrate Procedure syntaxes like T-SQL, PL/SQL etc they offer solution based on the source and destination database combination. For those who are interested in that check the below URLs:

http://www.swissql.com/products/sqlserver-to-oracle/sql-server-to-oracle.html
http://www.swissql.com/products/sqlserver-to-db2/sql-server-to-db2.html

As of now, I found that the tool doesn't convert Temporary tables and queries like Identity(int, 1, 1). I actually tried

Select Identity(int, 1,1) RowNum, au_id, au_lname, au_fname, phone into #tmpTable from authors

and it failed to convert. That said, these aren't supported in the current version of the product. Hope their development team is working on it.

The site claims that they support SQL Server 2005 but I haven't tested it out. Would do it sometime later and update this post.

I feel this to be an useful tool for the DBAs / senior developers in particular who handle multiple databases parallely. They only know the pain of doing database migrations :) I am sure this tool will be handy and it would really help them do migrate most of the queries with ease.

Important URLs for your reference:

1. Download SwisSQL - SQLOne Console 3.0
2. Various Products of SwisSQL

2. Product Support

As of now the support given by the team is really great. I was able to get response to my queries within a hour of so. I am impressed.

Technorati tags: ,

4 comments:

Anonymous said...

Product seems to be interesting. Nice write up Vadivel.

-- James

Anonymous said...

Thanx for this review vadivel. I have lots of SP's written in Oracle. I was looking at a way to easily convert them into SQL Server 2000. Is a there any product available with SwisSQL for this?

Anonymous said...

Sorry i forgot to mention my identity in my earlier comment. I am Prasanth working in a start-up @ kerela.

Vadivel said...

James, thanks for dropping by and thanx for your comments.

Prasanth, yes they have product for your requirement too. Check out http://www.swissql.com/products/oracle-to-sqlserver/oracle-to-sql-server.html

I suggest you go through this URL also http://www.swissql.com/products/. Btw thanx for dropping by :)