Membership DB on Azure

May 28, 2012 at 1:25 PM

 Deprecated feature 'Table hint without WITH' is not supported in this version of SQL Server

 It might be best of the Membership Database was scripted to support Azure.

Thanks

Pat Tormey NH USA

Coordinator
May 28, 2012 at 1:44 PM

Hi Pat,

We currently don't support SQL Azure DBs.

Would you like to see that feature implemented?

If so, we can create a work item.

 

Kind Regards,

Jorge

May 28, 2012 at 2:19 PM

You can just modify by adding the WITH Keyword
Pat

CREATE
PROCEDURE [dbo].[aspnet_Membership_GetNumberOfUsersOnline]

@ApplicationName nvarchar(256),
@MinutesSinceLastInActive int, 
@CurrentTimeUtc
datetime
 AS
BEGIN
DECLARE @DateActive datetime 
S
ELECT @DateActive = DATEADD(minute, -(@MinutesSinceLastInActive), @CurrentTimeUtc)
 
DECLARE @NumOnline int
 
SELECT @NumOnline = COUNT(*)

FROM dbo.aspnet_Users u WITH (NOLOCK),

dbo
.aspnet_Applications a WITH (NOLOCK),

dbo
.aspnet_Membership m WITH (NOLOCK)

WHERE u.ApplicationId = a.ApplicationId
AND LastActivityDate> @DateActive
AND
a.LoweredApplicationName = LOWER(@ApplicationName)
AND
u.UserId = m.UserId
RETURN(@NumOnline)

END

 

May 28, 2012 at 2:21 PM

I hear that Azure is a up and coming thing...(g)

This (WITH HINT) thing also applies to SQL 2012.

Maybe it would be a good idea to plan for it..

 

Thanks for your quick response

Pat

 

Coordinator
May 28, 2012 at 2:31 PM

Thank you!

I don't know what could be the best way to get clean and up-to-date scripts for ASP.NET Membership for SQL Server. The script on Nearforums is gotten from the .NET 2.0 Framework installation (%WINDIR%\Microsoft.NET\Framework\v2.0.50727\InstallMembership.sql)

Probably the best way is to re-export it from the database that is created with the SQL Azure Db db type selected...

 

I'll be glad to hear if you can find a better way :)

Kind Regards,

Jorge

May 28, 2012 at 8:42 PM
Hi Jorge,
Yep, that's exactly what I did. But the only change was to use the keyword WITH
and that was only in the aspnet_Membership_GetNumberOfUsersOnline Stored proc
Maybe you could add it to the original script..
Meanwhile I'll look around for Azure options.. I know I've even seen one for Azue Tables..
Hey NICE product by the way.. Just started playing with it an I'm really impressed!
Thanks
Pat
Coordinator
May 29, 2012 at 8:02 AM

Hi Pat,

Thanks for all the info! We will modify it.

If you ever want to join the Nearforums team we will be very glad to code with you!