我如何在SQL Azure上运行aspnet_regsql? [英] How do i run aspnet_regsql on sql azure?

查看:140
本文介绍了我如何在SQL Azure上运行aspnet_regsql?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  <一href=\"http://stackoverflow.com/questions/10140774/migrating-asp-net-membership-database-to-sql-azure\">Migrating ASP.NET成员资格数据库到SQL Azure的

我怎么上的SQL Azure数据库aspnet_regsql运行?我做了它的工作困难的方式,通过导出所有的数据库对象了。不过,我真的相信有一个更简单的方法。请帮助。

How do I run aspnet_regsql on sql azure database? I made it work the hard way, by exporting all db objects over. However, I seriously believe that there's an easier way. Please help.

推荐答案

当您在SQL Azure数据库aspnet_regsql运行,只是因为SQL Azure不支持使用语句转换数据库环境中发生错误当执行针对SQL Azure数据库命令。

When you run aspnet_regsql on sql azure database, the error occurs only because SQL Azure does not support the USE statement to switch database contexts when it executes commands against SQL Azure databases.

要解决这个问题,微软创建了一个修补程序。下列步骤显示了如何使用由该修复程序所提供的工具。

To work around this, Microsoft created a hotfix. The following steps show you how to use the tool that is provided by the hotfix.


  1. 下载由修补程序页面的aspnet_regsqlazure.zip文件。

  2. 解压文件的内容到您的本地硬盘上的位置。

  3. 打开一个命令提示符并导航到目录中提取文件。<​​/ li>
  1. Download the aspnet_regsqlazure.zip file from the hotfix page.
  2. Extract the contents of the file to a location on your local hard drive.
  3. Open a command prompt and navigate to the directory where you extracted the files.

使用以下命令行执行工具(替换您的服务器名称,数据库名称,登录密码和在适当情况下)。

Use the following command line to execute the tool (substitute your server name, database name, logon, and password where appropriate).

aspnet_regsqlazure -s [your server name].database.windows.net -d [your database name] -u [your user name]@[your server name] -p [your password] -a mr

这篇关于我如何在SQL Azure上运行aspnet_regsql?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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