将 SQL Server 数据传输到 SQL Azure
我有一个本地数据库 SQL Server 2008 Express,并且有表及其中的数据。我想将这些架构和数据导出到 SQL Azure 数据库。
我在 SQL Management Studio 中尝试的是右键单击数据库(上下文菜单)并选择“任务”->“生成脚本”。但这些 SQL 脚本只是架构、存储过程等,根本没有导出任何数据。
然后我尝试了任务->导出数据,但没有合适的导出类型。我只看到平面文件转储,并且我认为 SQL Mgmt Studio 2008 R2 不支持为 SQL Azure 导入平面文件。
有没有更好的方法从 SQL Server 导出数据作为 sql 脚本并在远程服务器上执行它们,而无需使用任何第三方工具?
I have a local database SQL Server 2008 Express and I have tables along with data in them. I want to export those schemas and data to SQL Azure database.
What I have tried in SQL Management Studio is to right-click database (contextual menu) and Tasks->Generate Scripts. But those SQL scripts were only the schema, stored procedures etc and no data is exported at all.
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.
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我发现 SQL Azure 迁移工具 http://sqlazuremw.codeplex.com/
非常方便和有用。为我工作。
I found that SQL Azure Migration Tool http://sqlazuremw.codeplex.com/
Very handy and useful. Worked for me.
在任务/生成脚本中,您可以将脚本选项/脚本数据设置为 True,这也应该编写数据脚本。
不是免费的,但是 SQL Data Compare 可以让您将数据从本地移动到 SQL Azure。
In Tasks/Generate Scripts you can set Script Options/Script Data to be True, which should script out the data as well.
Not free, but SQL Data Compare will let you move data from on-premise to SQL Azure.
您可以尝试SQL Server 导入和导出向导。
有关如何执行此操作的详细步骤,请检查 链接。
我已经使用过它,它在 Azure 和本地都可以正常工作。
You can try SQL Server Import and Export Wizard.
For Detailed steps reg how to do it, check link.
I have worked with it already and it works fine for both Azure and on-premises.
一篇全面解释可用选项的文章:
http://parasdoshi.com/2011/06/20/solidq-journal-article-migration-data-into-microsofts-data-platform-sql-azure/
完整披露:i在 SolidQ.com 工作
An article that comprehensively explains available options:
http://parasdoshi.com/2011/06/20/solidq-journal-article-migrating-data-into-microsofts-data-platform-sql-azure/
Full disclosure: i work at SolidQ.com