Convert SQL Server database to MySQL(将 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将 SQL Server 数据库转换为 MySQL
基础教程推荐
- SQL Server 2016更改对象所有者 2022-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01