将 SQL Server 数据库转换为 MySQL [英] Convert SQL Server database to MySQL

查看:33
本文介绍了将 SQL Server 数据库转换为 MySQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的专用服务器上有一个 SQL Server 2008 Express 上的应用程序数据库.这对我的网络应用程序来说还不够.

I have an application database on SQL Server 2008 Express on my dedicated server. It's not enough for my web app.

  • 是否有任何好的免费转换工具可以让我将当前的 SQL Server 数据库转换为我服务器上的 MySQL.
  • 我的网络应用也能正常工作吗?

推荐答案

问题中没有足够的信息,就目前而言,无法真正解决有关网络应用程序是否可以正常工作的许多问题.

There isn't enough information in the question, as it stands, to really address the many issues around whether the web app will work the same.

easy 部分将把模式和数据移植到另一个 RDBMS.SQL Server 有一组很棒的 Generate Scripts 命令来生成 CREATE TABLE 语句.您还可以通过 SQL Management Studio 为您的数据创建 INSERT 语句.

The easy part will be porting the schema and data over to another RDBMS. SQL Server has a great set of Generate Scripts commands to generate CREATE TABLE statements. You'll be able to create INSERT statements as well for your data, all through SQL Management Studio.

迁移应用程序时会遇到挑战.

The challenge comes when moving your application over.

  • 数据访问策略是什么?是所有 ADO.NET 准备/构建语句,还是存储过程?也许是 LINQ to SQL?
  • 其中的 SQL 语句:它们在多大程度上符合 ANSI 标准,SQL 对 TSQL 特定关键字的依赖程度如何?此处的答案将指向将 SQL 语句和逻辑移至新 RDBMS 所需的工作量.
  • 该应用程序是否依赖于任何 SQL Server 特定功能或 MySQL 不具备的功能?重写代码以适应 MySQL 的成本是多少?
  • 希望该应用使用集中式连接字符串.这需要改变,希望它在 web.config 中.如果它被硬编码在数据访问代码中,那么它就是一个查找+替换的游戏.
  • what's the data access strategy? Is it all ADO.NET prepared/built statements, or is it stored procedures? LINQ to SQL perhaps?
  • the SQL statements within: to what degree are they ANSI standard, and how reliant is the SQL on TSQL-specific keywords? The answers here will point to the amount of work needed to move the SQL statements and logic to the new RDBMS.
  • does the app rely on any SQL Server specific features or features that MySQL doesn't have? What's the cost of rewriting the code to fit into MySQL?
  • hopefully the app uses a centralized connection string. That'll need changing, and hopefully it's in the web.config. If it's hardcoded in the data-access code, then it's a game of find+replace.

对第二个问题的简短回答是,您将无法仅在新的 RDBMS 中实现数据并让应用程序正常工作.必须重新编译才能使用新的数据访问库(ADO.NET for MySQL).

The short answer to the second question is that you will NOT be able to just implement your data in a new RDBMS and have the application work. It'll have to be recompiled to use new data access libraries (ADO.NET for MySQL).

总而言之,当然可以让它工作起来一样,但所需的工作量并不小,而且 100% 依赖于代码.

All in all, it can of course be made to work the same, but the effort needed isn't small, and 100% dependent on the code.

这篇关于将 SQL Server 数据库转换为 MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆