迁移ASP.NET成员资格数据库到SQL Azure的 [英] Migrating ASP.NET Membership Database to SQL Azure

查看:120
本文介绍了迁移ASP.NET成员资格数据库到SQL Azure的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图迁移从SQL Server 2008到SQL Azure的数据库。我正在尝试迁移的数据库包括ASP.NET会员数据库(http://www.asp.net/web-forms/tutorials/moving-to-aspnet-20/membership)。当我在SQL Server 2008数据库运行该数据库工作正常。然而,当我尝试对SQL Azure的用户进行身份验证时,我收到一个错误,指出:

I am trying to migrate a database from SQL Server 2008 to SQL Azure. The database that I am attempting to migrate includes the ASP.NET Membership database (http://www.asp.net/web-forms/tutorials/moving-to-aspnet-20/membership). This database works fine when I run it in my SQL Server 2008 database. However, when I try to authenticate a user against SQL Azure, I receive an error that says:

没有一个聚集索引的表在此版本的SQL Server不支持,请创建一个聚集索引,然后再试一次。

"Tables without a clustered index are not supported in this version of SQL Server. Please create a clustered index and try again."

不过,我不知道该怎么办。当我尝试更新的aspnet_Applications表上的索引,我收到一个外键的问题。我使用下面的企图到我的非聚集索引迁移到一个聚集索引:

However, I'm not sure what to do. When I try to update the index on the aspnet_Applications table, I receive a foreign key problem. I am using the following in an attempt to migrate my non-clustered index to a clustered index:

ALTER TABLE aspnet_Applications
DROP CONSTRAINT PK__aspnet_A__SOMEID

ALTER TABLE aspnet_Applications
ADD CONSTRAINT PK__aspnet_A__SOMEID PRIMARY KEY CLUSTERED(ApplicationId)

有人可以帮我解决这个问题?谢谢!

Can someone please help me overcome this issue? Thank you!

推荐答案

如果可以的话,尝试使用的 ASP.NET通用提供商SqlEx $ p $ 1.1 PSS (我希望他们能改名字,因为它是一个有点用词不当)。这是跨SQL Azure和SQL独立服务器都使SQL成员,角色和会话商的官方支持的方法。

If you can, try to use the ASP.NET Universal Providers For SqlExpress 1.1 (I wish they'd change the name as it is a bit of a misnomer). This is the officially supported method of enabling the SQL membership, role and session providers across both SQL Azure and standalone SQL Server.

下面是一些其他的链接,以供参考:

Here are a couple of other links for reference:

<一个href=\"http://www.hanselman.com/blog/IntroducingSystemWebProvidersASPNETUniversalProvidersForSessionMembershipRolesAndUserProfileOnSQLCompactAndSQLAzure.aspx\"相对=nofollow>斯科特Hanselman的 - 介绍System.Web.Providers

SQL Azure团队博客 - 使用SQL Azure的会话国家

这篇关于迁移ASP.NET成员资格数据库到SQL Azure的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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