ASP.net 网站在 SQL Server 上设计/构建 过渡到 DB2

发布于 2024-08-09 04:13:07 字数 195 浏览 3 评论 0原文

长话短说,我们设计并构建了一个使用 asp:SqlDataSource 和 System.Data.SqlClient 连接到独立 SQL Server 2000 数据库的 Web 应用程序,现在我们正在考虑迁移到 db2 集群。除了连接字符串之外,我们还需要在 Web 应用程序上执行任何操作吗?我对DB2一无所知。如果这有什么区别的话,我们在 SQL 中有近千个存储过程。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月亮是我掰弯的 2024-08-16 04:13:07

我们需要在网络应用程序上执行任何操作吗?

是的。 Db2 使用与 sql server 不同的提供程序。因此,首先您需要找到并安装该提供程序(它可能随您的 DB2 安装一起提供,或者可以从 IBM 获得),然后更改您的 SqlClient 命名空间引用以使用 IBM.Data.DB2< /代码> 相反。此外,类名也会发生变化。因此,例如,SqlCommand 类型需要更新为使用 DB2Command。此链接应该有帮助:
http://www.ibm.com/developerworks/data/library /techarticle/dm-0502alazzawe/

此外,每个供应商都有自己特定的 SQL 语言方言。 Sql Server 中的一些习惯用法在迁移到 DB2 时会以不同的方式工作。您将必须重写一些(如果不是大部分)查询。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文