简体   繁体   English

将 SQL Server 数据传输到 SQL Azure

[英]Transfer SQL Server data to SQL Azure

I have a local database SQL Server 2008 Express and I have tables along with data in them.我有一个本地数据库 SQL Server 2008 Express,我有表格和数据。 I want to export those schemas and data to SQL Azure database.我想将这些架构和数据导出到 SQL Azure 数据库。

What I have tried in SQL Management Studio is to right-click database (contextual menu) and Tasks->Generate Scripts.我在 SQL Management Studio 中尝试的是右键单击数据库(上下文菜单)和任务-> 生成脚本。 But those SQL scripts were only the schema, stored procedures etc and no data is exported at all.但是那些 SQL 脚本只是模式、存储过程等,根本没有导出任何数据。

Then I have tried Tasks->Export Data, but there were no appropriate export types.然后我尝试了任务-> 导出数据,但没有合适的导出类型。 I have seen only Flat File dump and I think SQL Mgmt Studio 2008 R2 does not support importing flat files for SQL Azure.我只看到了平面文件转储,我认为 SQL Mgmt Studio 2008 R2 不支持为 SQL Azure 导入平面文件。

Is there a nicer way to export data from SQL Server as sql scripts and execute them on a remote server without using any 3rd party tools?有没有更好的方法将数据从 SQL Server 导出为 sql 脚本并在远程服务器上执行它们而不使用任何 3rd 方工具?

I found that SQL Azure Migration Tool http://sqlazuremw.codeplex.com/我发现 SQL Azure 迁移工具http://sqlazuremw.codeplex.com/

Very handy and useful.非常方便和有用。 Worked for me.为我工作。

In Tasks/Generate Scripts you can set Script Options/Script Data to be True, which should script out the data as well.在 Tasks/Generate Scripts 中,您可以将 Script Options/Script Data 设置为 True,这也应该编写出数据的脚本。

Not free, but SQL Data Compare will let you move data from on-premise to SQL Azure.不是免费的,但SQL 数据比较可以让您将数据从本地迁移到 SQL Azure。

You can try SQL Server Import and Export Wizard .您可以尝试SQL Server 导入和导出向导

For Detailed steps reg how to do it, check link .有关详细步骤 reg 如何操作,请查看链接

I have worked with it already and it works fine for both Azure and on-premises .我已经使用过它,它适用于 Azure 和本地

An article that comprehensively explains available options:一篇全面解释可用选项的文章:

http://parasdoshi.com/2011/06/20/solidq-journal-article-migrating-data-into-microsofts-data-platform-sql-azure/ http://parasdoshi.com/2011/06/20/solidq-journal-article-migrating-data-into-microsofts-data-platform-sql-azure/

Full disclosure: i work at SolidQ.com全面披露:我在 SolidQ.com 工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM