不用aspnet_regsql创建membership数据库

1.执行 标准的创建aspnetdb的脚本。

 

2.最关键的2,最最关键的2.

必须给aspnet_SchemaVersions表初始化数据,不然会报数据库架构版本不兼容的错误。

 

/*Insert aspnet_SchemaVersions*/

INSERT INTO [dbo].[aspnet_SchemaVersions]

           ([Feature]

           ,[CompatibleSchemaVersion]

           ,[IsCurrentVersion])

     VALUES

          ('common','1',1)



INSERT INTO [dbo].[aspnet_SchemaVersions]

           ([Feature]

           ,[CompatibleSchemaVersion]

           ,[IsCurrentVersion])

     VALUES

          ('health monitoring','1', 1);



INSERT INTO [dbo].[aspnet_SchemaVersions]

           ([Feature]

           ,[CompatibleSchemaVersion]

           ,[IsCurrentVersion])

     VALUES

          ('membership', '1', 1)



 

INSERT INTO [dbo].[aspnet_SchemaVersions]

           ([Feature]

           ,[CompatibleSchemaVersion]

           ,[IsCurrentVersion])

     VALUES

          ('personalization','1', 1)



 

INSERT INTO [dbo].[aspnet_SchemaVersions]

           ([Feature]

           ,[CompatibleSchemaVersion]

           ,[IsCurrentVersion])

     VALUES

          ('profile','1', 1)





INSERT INTO [dbo].[aspnet_SchemaVersions]

           ([Feature]

           ,[CompatibleSchemaVersion]

           ,[IsCurrentVersion])

     VALUES

          ('role manager','1', 1)





 

你可能感兴趣的:(sql)