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.
Share
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
SqlClientnamespace references to useIBM.Data.DB2instead. Also, the class names change. SoSqlCommandtypes for example need to be updated to useDB2Command. 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.