views:

20

answers:

1

OK long story short, we designed and built a web application connecting to a standalone SQL Server 2000 database using asp:SqlDataSource and System.Data.SqlClient, now we are looking at migrating to a db2 cluster. Aside from the connection string, do we need to do anything on the web application? I am clueless about DB2. We have close to a thousand stored procs in SQL if that makes any difference.

+1  A: 

do we need to do anything on the web application?

Yes. Db2 uses a different provider than sql server. So first of all you need find and install that provider (it probably comes with your DB2 installation or is available from IBM) and then change your SqlClient namespace references to use IBM.Data.DB2 instead. Also, the class names change. So SqlCommand types for example need to be updated to use DB2Command. This link should help:
http://www.ibm.com/developerworks/data/library/techarticle/dm-0502alazzawe/

Additionally, every vendor has their own particular dialect of the SQL language. Some idioms from Sql Server will just work differently when moving to DB2. You will have to re-write some, if not most, of your queries.

Joel Coehoorn
+1 yes, definitely - just changing the connection string isn't gonna do.... every RDBMS has a slightly different SQL implementation, especially when it comes to stored procedures.
marc_s