在MAC上将SQL Server数据库迁移到Azure Data Studio [英] Migrating SQL Server databases to Azure Data Studio on MAC

查看:84
本文介绍了在MAC上将SQL Server数据库迁移到Azure Data Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于不相关的原因,我必须从Microsoft Windows计算机移至MACPro.在Windows计算机上,我安装了带有多个数据库的SQL Server.所有数据库均已备份到存储中.在我的MAC上,我安装了Docker,并且正在使用Azure Data Studio作为界面运行适用于Ubuntu的SQL Server.安装效果很好,但我现在的问题是:是否可以将Windows环境中存储中的Sql Server数据库附加到MACPRO上的新安装中?

Due to unrelated reasons, I have to move from a Microsoft Windows machine to a MACPro. On my windows machine, I have a SQL server installed with several databases. All databases have been backed up to storage. On my MAC, I installed Docker and I am running SQL Server for Ubuntu with Azure Data Studio as my interface. The installation works great but my question now is: Is there any way to attach the Sql Server Databases in storage from my windows environment to the new installation on MACPRO?

如果重要的话,我的Windows SQL Server是2017年,而我的新MAC版本是2019年.

My windows SQL Server was 2017 and my new MAC version is 2019 in case that matters.

我看到了一些有关导入平面文件的教程等,但是找不到从Windows的SQL Server环境向MAC(或Linux)环境中导入(附加,还原等)数据库的教程,但希望有人能提供解决方案.

I see some tutorials on importing flat files etc. but not where you can import (attach, restore etc.) a database from a SQL Server environment in Windows to a MAC (or Linux) environment but hoping someone has a solution.

推荐答案

为什么不仅仅使用"Generate Scripts"来备份数据库以创建具有架构和数据的SQL脚本.然后使用生成的SQL文件在您的新环境中创建一个新数据库吗?

Why not just backup your database using "Generate Scripts" to create a SQL script with the schema and data. Then use the generated SQL file to create a new database in your new environment?

在SSMS中,右键单击数据库,然后选择 Tasks-> Generate Scripts ... .在对话框中,单击 Advanced 按钮,然后选择<数据类型下的code> Schema和数据:

In SSMS, you right-click the database, then select Tasks->Generate Scripts... In the dialog you click the Advanced button and choose to Schema and data under types of data:

这篇关于在MAC上将SQL Server数据库迁移到Azure Data Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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