从 MS SQL 迁移到 MySQL:SQLOLEDB? 迁移套件登录错误?

发布于 2024-07-24 11:01:02 字数 1343 浏览 3 评论 0原文

我负责将客户的MS SQL/ASP 网站迁移到PHP/MYSQL。 我对 MS SQL 的经验为零。

我正在尝试找出将当前数据迁移到 MySQL 的最佳方法,以便我可以开始 PHP 开发。

一些详细信息:

  • 我下载了 SQL Server Mangement Studio Express。 我在连接文件中找到了以下字符串:

    MM_connCompanyName_STRING = "provider=SQLOLEDB;data source=IP_ADDRESS;database=DATABASENAME;uid=USERNAMEpwd=PASSWORD;"

  • 使用该字符串中的 IP、用户名和密码,我可以使用 Studio Express 成功连接。

  • 我下载了 MySQL 迁移工具包并输入了相同的信息,但出现以下错误:

    连接到源数据库并检索模式名称。 正在初始化 JDBC 驱动程序... 驱动程序类 MS SQL JDBC 驱动程序 打开连接... 连接 jdbc:jtds:sqlserver://IP_ADDRESS:1433/DATABASENAME;user=USERNAME;password=PASSWORD;";charset=utf-8;domain= 无法检索架构名称列表(错误:0)。 ReverseEngineeringMssql.getSchemata:用户“USERNAME”登录失败。

  • 我没有当前 SQL Server 的管理员或物理访问权限。 我尝试通过 Studio Express 运行一些导出,但它将它们保存到我无权访问的文件系统中。

  • 可以联系现任/旧网站管理员,但由于他不再为公司工作,他的回复速度很慢,而且通常没有帮助。 所以没有帮助...

  • 前管理员给我发了一个 MDF 文件...不知道该怎么办。
  • 我在当前服务器上的连接信息上方发现了此注释(如果它意味着什么):

'此连接正在被使用,因为 ODBC 导致了奇怪的错误, 切换到 OLEDB 修复了这些问题

我的问题:

  1. 知道为什么使用与 Studio Express 相同的登录凭据会失败吗? 我假设这与司机有关,但我不知道下一步要采取什么步骤。
  2. 有没有更好/更简单/更有效的方法来迁移这些数据? (我希望我没有发现自己在 Studio Express 中运行“SELECT *”语句并将数据复制/粘贴到 Excel 中......上帝啊,不)

提前感谢您的帮助。

I've been put in charge of migrating a customer's website of MS SQL/ASP to PHP/MYSQL. I have zero experience with MS SQL.

I'm trying to figure out the best way to get the current data migrated to MySQL so I can begin PHP development.

Some details:

  • I downloaded SQL Server Mangement Studio Express. I found the following string in a connection file:

    MM_connCompanyName_STRING = "provider=SQLOLEDB;data source=IP_ADDRESS;database=DATABASENAME;uid=USERNAMEpwd=PASSWORD;"

  • Using the IP, username, and password from this string, I could successfully connect using Studio Express.

  • I downloaded the MySQL Migration Toolkit and entered the same info, but get the following error:

    Connecting to source database and retrieve schemata names.
    Initializing JDBC driver ...
    Driver class MS SQL JDBC Driver
    Opening connection ...
    Connection jdbc:jtds:sqlserver://IP_ADDRESS:1433/DATABASENAME;user=USERNAME;password=PASSWORD;";charset=utf-8;domain=
    The list of schema names could not be retrieved (error: 0).
    ReverseEngineeringMssql.getSchemata :Login failed for user 'USERNAME'.

  • I don't have admin or physical access to the current SQL server. I've tried to run some exports through Studio Express, but it saves them to the file system, which I don't have access to.

  • I can reach the current/old webmaster, but because he no longer works for the company, his responses are slow and usually un-helpful. So no help there...

  • The former admin sent me an MDF file ... no idea what to do with that.
  • I found this note above the connection info on the current server (if it means anything):

'this connection is being used because
ODBC was causing weird errors,
switching to OLEDB fixed them

My questions:

  1. Any idea why this would be failing with the same login credentials that works with Studio Express? I'm assuming it has something to do with the driver, but I don't know what next steps to take.
  2. Is there a better/easier/more effective way to migrate this data? (I'm hoping I don't find myself running "SELECT *" statements in Studio Express and copy/pasting data into Excel...please god, no)

Thanks in advance for your help.

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

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

发布评论

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

评论(2

娜些时光,永不杰束 2024-07-31 11:01:02

呃,这会很可怕(连接字符串表明它是由 Dreamweaver 生成的工具,这绝不是一个好兆头)。

知道 SQL Server 是哪个版本吗? 您应该能够选择@@VERSION。 10.x 是 2008,9.x 是 2005,8.x 是 2000。如果是 7.x 运行。

MDF 文件是实际的数据库。 如果我是你,我会购买 SQL 2005 的开发者版本(如果是 2008 年,我会购买 8,这不太可能),它值 99 美元左右。

这将使您能够通过附加 MDF 文件来本地安装数据库。 一旦您拥有本地运行的副本,您就可以将 SQL Server ETL 工具与 MySql ODBC 驱动程序结合使用,以可重复的方式将数据推送到 MySql。

Eww, this is going to be scary (connection string indicates it was tool generated from Dreamweaver, never a good sign).

Any idea which version of SQL Server? You should be able to SELECT @@VERSION. 10.x is 2008, 9.x is 2005 and 8.x is 2000. If it is 7.x run.

The MDF file is the actual database. If I were you, I would buy a developer edition of SQL 2005 (or 8 if it is 2008 which is unlikely), it will be worth the $99 or so it costs.

This will give you the ability to locally install the DB by ATTACHing the MDF file. Once you have a locally running copy, you can use the SQL Server ETL tools with the MySql ODBC drivers to push the data to MySql in a repeatable manner.

海未深 2024-07-31 11:01:02

我相信您可以选择不同的 SQL 方言从 MSSQL 导出数据; 我相信有一个与 MySQL 相当兼容的。 当然,它并不能解决您的所有问题,因为虽然您可能会正确获得结构,但存储过程和触发器等将需要更多的工作。 但这应该可以帮助您开始。

I believe you can export data from MSSQL choosing different SQL dialects; I believe there's one that's reasonably MySQL compatible. It doesn't solve all your problems, of course, because while you may get the structure properly, stored procedures and triggers and the like will take a bit more work. But that should get you started.

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