问题
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?
My windows SQL Server was 2017 and my new MAC version is 2019 in case that matters.
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.
回答1:
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?
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
:
来源:https://stackoverflow.com/questions/57678075/migrating-sql-server-databases-to-azure-data-studio-on-mac