300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > bak文件导入到mysql 如何将SQL Server .bak文件导入MySQL?

bak文件导入到mysql 如何将SQL Server .bak文件导入MySQL?

时间:2024-05-09 21:02:40

相关推荐

bak文件导入到mysql 如何将SQL Server .bak文件导入MySQL?

The title is self explanatory. Is there a way of directly doing such kind of importing?

解决方案

The .BAK files from SQL server are in Microsoft Tape Format (MTF) ref: /willy/msbackup.htm

The bak file will probably contain the LDF and MDF files that SQL server uses to store the database.

You will need to use SQL server to extract these. SQL Server Express is free and will do the job.

So, install SQL Server Express edition, and open the SQL Server Powershell. There execute sqlcmd -S \SQLExpress (whilst logged in as administrator)

then issue the following command.

restore filelistonly from disk=c:\temp\mydbName--09-29-v10.bak;

GO

This will list the contents of the backup - what you need is the first fields that tell you the logical names - one will be the actual database and the other the log fil

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。