(local) - Ben Hall
(local)
aspnetdb
|Server |(local) |
|Author |Ben Hall |
|Created |14 December 2008 21:00 |
|File Path |E:\Users\Ben Hall\Documents\My Database Documentation\aspnetdb.doc |
Table of Contents
aspnetdb Database 5
Tables 6
[dbo].[aspnet_Applications] 7
[dbo].[aspnet_Membership] 10
[dbo].[aspnet_Paths] 13
[dbo].[aspnet_PersonalizationAllUsers] 15
[dbo].[aspnet_PersonalizationPerUser] 17
[dbo].[aspnet_Profile] 19
[dbo].[aspnet_Roles] 21
[dbo].[aspnet_SchemaVersions] 23
[dbo].[aspnet_Users] 25
[dbo].[aspnet_UsersInRoles] 28
[dbo].[aspnet_WebEvent_Events] 30
Views 32
[dbo].[vw_aspnet_Applications] 33
[dbo].[vw_aspnet_MembershipUsers] 35
[dbo].[vw_aspnet_Profiles] 37
[dbo].[vw_aspnet_Roles] 39
[dbo].[vw_aspnet_Users] 41
[dbo].[vw_aspnet_UsersInRoles] 43
[dbo].[vw_aspnet_WebPartState_Paths] 44
[dbo].[vw_aspnet_WebPartState_Shared] 46
[dbo].[vw_aspnet_WebPartState_User] 48
Stored Procedures 50
[dbo].[aspnet_AnyDataInTables] 52
[dbo].[aspnet_Applications_CreateApplication] 55
[dbo].[aspnet_CheckSchemaVersion] 57
[dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer] 59
[dbo].[aspnet_Membership_CreateUser] 61
[dbo].[aspnet_Membership_FindUsersByEmail] 66
[dbo].[aspnet_Membership_FindUsersByName] 69
[dbo].[aspnet_Membership_GetAllUsers] 71
[dbo].[aspnet_Membership_GetNumberOfUsersOnline] 73
[dbo].[aspnet_Membership_GetPassword] 75
[dbo].[aspnet_Membership_GetPasswordWithFormat] 79
[dbo].[aspnet_Membership_GetUserByEmail] 81
[dbo].[aspnet_Membership_GetUserByName] 83
[dbo].[aspnet_Membership_GetUserByUserId] 85
[dbo].[aspnet_Membership_ResetPassword] 87
[dbo].[aspnet_Membership_SetPassword] 91
[dbo].[aspnet_Membership_UnlockUser] 93
[dbo].[aspnet_Membership_UpdateUser] 95
[dbo].[aspnet_Membership_UpdateUserInfo] 98
[dbo].[aspnet_Paths_CreatePath] 102
[dbo].[aspnet_Personalization_GetApplicationId] 104
[dbo].[aspnet_PersonalizationAdministration_DeleteAllState] 106
[dbo].[aspnet_PersonalizationAdministration_FindState] 108
[dbo].[aspnet_PersonalizationAdministration_GetCountOfState] 112
[dbo].[aspnet_PersonalizationAdministration_ResetSharedState] 114
[dbo].[aspnet_PersonalizationAdministration_ResetUserState] 116
[dbo].[aspnet_PersonalizationAllUsers_GetPageSettings] 118
[dbo].[aspnet_PersonalizationAllUsers_ResetPageSettings] 120
[dbo].[aspnet_PersonalizationAllUsers_SetPageSettings] 122
[dbo].[aspnet_PersonalizationPerUser_GetPageSettings] 124
[dbo].[aspnet_PersonalizationPerUser_ResetPageSettings] 126
[dbo].[aspnet_PersonalizationPerUser_SetPageSettings] 128
[dbo].[aspnet_Profile_DeleteInactiveProfiles] 130
[dbo].[aspnet_Profile_DeleteProfiles] 132
[dbo].[aspnet_Profile_GetNumberOfInactiveProfiles] 135
[dbo].[aspnet_Profile_GetProfiles] 137
[dbo].[aspnet_Profile_GetProperties] 140
[dbo].[aspnet_Profile_SetProperties] 142
[dbo].[aspnet_RegisterSchemaVersion] 145
[dbo].[aspnet_Roles_CreateRole] 147
[dbo].[aspnet_Roles_DeleteRole] 150
[dbo].[aspnet_Roles_GetAllRoles] 153
[dbo].[aspnet_Roles_RoleExists] 155
[dbo].[aspnet_Setup_RemoveAllRoleMembers] 157
[dbo].[aspnet_Setup_RestorePermissions] 159
[dbo].[aspnet_UnRegisterSchemaVersion] 161
[dbo].[aspnet_Users_CreateUser] 163
[dbo].[aspnet_Users_DeleteUser] 165
[dbo].[aspnet_UsersInRoles_AddUsersToRoles] 169
[dbo].[aspnet_UsersInRoles_FindUsersInRole] 173
[dbo].[aspnet_UsersInRoles_GetRolesForUser] 175
[dbo].[aspnet_UsersInRoles_GetUsersInRoles] 177
[dbo].[aspnet_UsersInRoles_IsUserInRole] 179
[dbo].[aspnet_UsersInRoles_RemoveUsersFromRoles] 181
[dbo].[aspnet_WebEvent_LogEvent] 185
Users 188
BIGBLUE\Ben Hall 189
Database Roles 190
aspnet_Membership_BasicAccess 191
aspnet_Membership_FullAccess 191
aspnet_Membership_ReportingAccess 192
aspnet_Personalization_BasicAccess 193
aspnet_Personalization_FullAccess 193
aspnet_Personalization_ReportingAccess 194
aspnet_Profile_BasicAccess 195
aspnet_Profile_FullAccess 195
aspnet_Profile_ReportingAccess 196
aspnet_Roles_BasicAccess 197
aspnet_Roles_FullAccess 197
aspnet_Roles_ReportingAccess 198
aspnet_WebEvent_FullAccess 199
db_accessadmin 199
db_backupoperator 200
db_datareader 200
db_datawriter 200
db_ddladmin 201
db_denydatareader 201
db_denydatawriter 202
db_owner 202
db_securityadmin 203
public 203
Schemas 204
aspnet_Membership_BasicAccess 205
aspnet_Membership_FullAccess 206
aspnet_Membership_ReportingAccess 207
aspnet_Personalization_BasicAccess 208
aspnet_Personalization_FullAccess 209
aspnet_Personalization_ReportingAccess 210
aspnet_Profile_BasicAccess 211
aspnet_Profile_FullAccess 212
aspnet_Profile_ReportingAccess 213
aspnet_Roles_BasicAccess 214
aspnet_Roles_FullAccess 215
aspnet_Roles_ReportingAccess 216
aspnet_WebEvent_FullAccess 217
|[pic] aspnetdb Database |
|(local) > aspnetdb |
Project Information
|Author |Ben Hall |
|Created |14 December 2008 21:00 |
Properties
|Property |Value |
|SQL Server Version |SQL Server 2005 |
|Compatibility Level |SQL Server 2005 |
Files
|Name |Type |Size |File Name |
|aspnetdb |Data |2.19 MB |C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\aspnetdb.mdf |
|aspnetdb_log |Log |832.00 KB |C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\aspnetdb_log.LDF |
|[pic] Tables |
|(local) > aspnetdb > Tables |
|Name |
|dbo.aspnet_Applications |
|dbo.aspnet_Membership |
|dbo.aspnet_Paths |
|dbo.aspnet_PersonalizationAllUsers |
|dbo.aspnet_PersonalizationPerUser |
|dbo.aspnet_Profile |
|dbo.aspnet_Roles |
|dbo.aspnet_SchemaVersions |
|dbo.aspnet_Users |
|dbo.aspnet_UsersInRoles |
|dbo.aspnet_WebEvent_Events |
|[pic] [dbo].[aspnet_Applications] |
|(local) > aspnetdb > Tables > dbo.aspnet_Applications |
Properties
|Property |Value |
|Collation |Latin1_General_CI_AS |
|Row Count |0 |
|Created |18:14:21 14 December 2008 |
|Last Modified |18:14:24 14 December 2008 |
Columns
| |Name |Data Type |Max Length |
| | | |(Bytes) |
|[pic] |PK__aspnet_Applicati__7E6CC920 |ApplicationId |⎫ |
| |UQ__aspnet_Applicati__00551192 |ApplicationName |⎫ |
| |UQ__aspnet_Applicati__7F60ED59 |LoweredApplicationName |⎫ |
|[pic] |aspnet_Applications_Index |LoweredApplicationName | |
SQL Script
|CREATE TABLE [dbo].[aspnet_Applications] |
|( |
|[ApplicationName] [nvarchar] (256) COLLATE Latin1_General_CI_AS NOT NULL, |
|[LoweredApplicationName] [nvarchar] (256) COLLATE Latin1_General_CI_AS NOT NULL, |
|[ApplicationId] [uniqueidentifier] NOT NULL CONSTRAINT [DF__aspnet_Ap__Appli__014935CB] DEFAULT (newid()), |
|[Description] [nvarchar] (256) COLLATE Latin1_General_CI_AS NULL |
|) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Applications] ADD CONSTRAINT [PK__aspnet_Applicati__7E6CC920] PRIMARY KEY NONCLUSTERED |
|([ApplicationId]) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Applications] ADD CONSTRAINT [UQ__aspnet_Applicati__00551192] UNIQUE NONCLUSTERED ([ApplicationName]) |
|ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Applications] ADD CONSTRAINT [UQ__aspnet_Applicati__7F60ED59] UNIQUE NONCLUSTERED |
|([LoweredApplicationName]) ON [PRIMARY] |
|GO |
|CREATE CLUSTERED INDEX [aspnet_Applications_Index] ON [dbo].[aspnet_Applications] ([LoweredApplicationName]) ON [PRIMARY] |
|GO |
Uses
dbo
Used By
[dbo].[aspnet_Membership]
[dbo].[aspnet_Paths]
[dbo].[aspnet_Roles]
[dbo].[aspnet_Users]
[dbo].[vw_aspnet_Applications]
[dbo].[aspnet_AnyDataInTables]
[dbo].[aspnet_Applications_CreateApplication]
[dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer]
[dbo].[aspnet_Membership_FindUsersByEmail]
[dbo].[aspnet_Membership_FindUsersByName]
[dbo].[aspnet_Membership_GetAllUsers]
[dbo].[aspnet_Membership_GetNumberOfUsersOnline]
[dbo].[aspnet_Membership_GetPassword]
[dbo].[aspnet_Membership_GetPasswordWithFormat]
[dbo].[aspnet_Membership_GetUserByEmail]
[dbo].[aspnet_Membership_GetUserByName]
[dbo].[aspnet_Membership_ResetPassword]
[dbo].[aspnet_Membership_SetPassword]
[dbo].[aspnet_Membership_UnlockUser]
[dbo].[aspnet_Membership_UpdateUser]
[dbo].[aspnet_Membership_UpdateUserInfo]
[dbo].[aspnet_Personalization_GetApplicationId]
[dbo].[aspnet_Profile_DeleteInactiveProfiles]
[dbo].[aspnet_Profile_GetNumberOfInactiveProfiles]
[dbo].[aspnet_Profile_GetProfiles]
[dbo].[aspnet_Profile_GetProperties]
[dbo].[aspnet_Roles_DeleteRole]
[dbo].[aspnet_Roles_GetAllRoles]
[dbo].[aspnet_Roles_RoleExists]
[dbo].[aspnet_Users_DeleteUser]
[dbo].[aspnet_UsersInRoles_AddUsersToRoles]
[dbo].[aspnet_UsersInRoles_FindUsersInRole]
[dbo].[aspnet_UsersInRoles_GetRolesForUser]
[dbo].[aspnet_UsersInRoles_GetUsersInRoles]
[dbo].[aspnet_UsersInRoles_IsUserInRole]
[dbo].[aspnet_UsersInRoles_RemoveUsersFromRoles]
|[pic] [dbo].[aspnet_Membership] |
|(local) > aspnetdb > Tables > dbo.aspnet_Membership |
Properties
|Property |Value |
|Collation |Latin1_General_CI_AS |
|Row Count |0 |
|Created |18:14:22 14 December 2008 |
|Last Modified |18:14:22 14 December 2008 |
Columns
| |Name |Data Type |Max Length |
| | | |(Bytes) |
|[pic] |PK__aspnet_Membershi__1367E606 |UserId |⎫ |
|[pic] |aspnet_Membership_index |ApplicationId, LoweredEmail | |
Foreign Keys [pic]
|Name |Columns |
|FK__aspnet_Me__Appli__145C0A3F |ApplicationId->[dbo].[aspnet_Applications].[ApplicationId] |
|FK__aspnet_Me__UserI__15502E78 |UserId->[dbo].[aspnet_Users].[UserId] |
SQL Script
|CREATE TABLE [dbo].[aspnet_Membership] |
|( |
|[ApplicationId] [uniqueidentifier] NOT NULL, |
|[UserId] [uniqueidentifier] NOT NULL, |
|[Password] [nvarchar] (128) COLLATE Latin1_General_CI_AS NOT NULL, |
|[PasswordFormat] [int] NOT NULL CONSTRAINT [DF__aspnet_Me__Passw__164452B1] DEFAULT ((0)), |
|[PasswordSalt] [nvarchar] (128) COLLATE Latin1_General_CI_AS NOT NULL, |
|[MobilePIN] [nvarchar] (16) COLLATE Latin1_General_CI_AS NULL, |
|[Email] [nvarchar] (256) COLLATE Latin1_General_CI_AS NULL, |
|[LoweredEmail] [nvarchar] (256) COLLATE Latin1_General_CI_AS NULL, |
|[PasswordQuestion] [nvarchar] (256) COLLATE Latin1_General_CI_AS NULL, |
|[PasswordAnswer] [nvarchar] (128) COLLATE Latin1_General_CI_AS NULL, |
|[IsApproved] [bit] NOT NULL, |
|[IsLockedOut] [bit] NOT NULL, |
|[CreateDate] [datetime] NOT NULL, |
|[LastLoginDate] [datetime] NOT NULL, |
|[LastPasswordChangedDate] [datetime] NOT NULL, |
|[LastLockoutDate] [datetime] NOT NULL, |
|[FailedPasswordAttemptCount] [int] NOT NULL, |
|[FailedPasswordAttemptWindowStart] [datetime] NOT NULL, |
|[FailedPasswordAnswerAttemptCount] [int] NOT NULL, |
|[FailedPasswordAnswerAttemptWindowStart] [datetime] NOT NULL, |
|[Comment] [ntext] COLLATE Latin1_General_CI_AS NULL |
|) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Membership] ADD CONSTRAINT [PK__aspnet_Membershi__1367E606] PRIMARY KEY NONCLUSTERED ([UserId]) ON |
|[PRIMARY] |
|GO |
|CREATE CLUSTERED INDEX [aspnet_Membership_index] ON [dbo].[aspnet_Membership] ([ApplicationId], [LoweredEmail]) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Membership] ADD CONSTRAINT [FK__aspnet_Me__Appli__145C0A3F] FOREIGN KEY ([ApplicationId]) REFERENCES |
|[dbo].[aspnet_Applications] ([ApplicationId]) |
|GO |
|ALTER TABLE [dbo].[aspnet_Membership] ADD CONSTRAINT [FK__aspnet_Me__UserI__15502E78] FOREIGN KEY ([UserId]) REFERENCES |
|[dbo].[aspnet_Users] ([UserId]) |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Users]
dbo
Used By
[dbo].[vw_aspnet_MembershipUsers]
[dbo].[aspnet_AnyDataInTables]
[dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer]
[dbo].[aspnet_Membership_CreateUser]
[dbo].[aspnet_Membership_FindUsersByEmail]
[dbo].[aspnet_Membership_FindUsersByName]
[dbo].[aspnet_Membership_GetAllUsers]
[dbo].[aspnet_Membership_GetNumberOfUsersOnline]
[dbo].[aspnet_Membership_GetPassword]
[dbo].[aspnet_Membership_GetPasswordWithFormat]
[dbo].[aspnet_Membership_GetUserByEmail]
[dbo].[aspnet_Membership_GetUserByName]
[dbo].[aspnet_Membership_GetUserByUserId]
[dbo].[aspnet_Membership_ResetPassword]
[dbo].[aspnet_Membership_SetPassword]
[dbo].[aspnet_Membership_UnlockUser]
[dbo].[aspnet_Membership_UpdateUser]
[dbo].[aspnet_Membership_UpdateUserInfo]
[dbo].[aspnet_Users_DeleteUser]
|[pic] [dbo].[aspnet_Paths] |
|(local) > aspnetdb > Tables > dbo.aspnet_Paths |
Properties
|Property |Value |
|Collation |Latin1_General_CI_AS |
|Row Count |0 |
|Created |18:14:24 14 December 2008 |
|Last Modified |18:14:24 14 December 2008 |
Columns
| |Name |Data Type |Max Length |
| | | |(Bytes) |
|[pic] |PK__aspnet_Paths__44FF419A |PathId |⎫ |
|[pic] |aspnet_Paths_index |ApplicationId, LoweredPath |⎫ |
Foreign Keys [pic]
|Name |Columns |
|FK__aspnet_Pa__Appli__45F365D3 |ApplicationId->[dbo].[aspnet_Applications].[ApplicationId] |
SQL Script
|CREATE TABLE [dbo].[aspnet_Paths] |
|( |
|[ApplicationId] [uniqueidentifier] NOT NULL, |
|[PathId] [uniqueidentifier] NOT NULL CONSTRAINT [DF__aspnet_Pa__PathI__46E78A0C] DEFAULT (newid()), |
|[Path] [nvarchar] (256) COLLATE Latin1_General_CI_AS NOT NULL, |
|[LoweredPath] [nvarchar] (256) COLLATE Latin1_General_CI_AS NOT NULL |
|) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Paths] ADD CONSTRAINT [PK__aspnet_Paths__44FF419A] PRIMARY KEY NONCLUSTERED ([PathId]) ON [PRIMARY] |
|GO |
|CREATE UNIQUE CLUSTERED INDEX [aspnet_Paths_index] ON [dbo].[aspnet_Paths] ([ApplicationId], [LoweredPath]) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Paths] ADD CONSTRAINT [FK__aspnet_Pa__Appli__45F365D3] FOREIGN KEY ([ApplicationId]) REFERENCES |
|[dbo].[aspnet_Applications] ([ApplicationId]) |
|GO |
Uses
[dbo].[aspnet_Applications]
dbo
Used By
[dbo].[aspnet_PersonalizationAllUsers]
[dbo].[aspnet_PersonalizationPerUser]
[dbo].[vw_aspnet_WebPartState_Paths]
[dbo].[aspnet_Paths_CreatePath]
[dbo].[aspnet_PersonalizationAdministration_DeleteAllState]
[dbo].[aspnet_PersonalizationAdministration_FindState]
[dbo].[aspnet_PersonalizationAdministration_GetCountOfState]
[dbo].[aspnet_PersonalizationAdministration_ResetSharedState]
[dbo].[aspnet_PersonalizationAdministration_ResetUserState]
[dbo].[aspnet_PersonalizationAllUsers_GetPageSettings]
[dbo].[aspnet_PersonalizationAllUsers_ResetPageSettings]
[dbo].[aspnet_PersonalizationAllUsers_SetPageSettings]
[dbo].[aspnet_PersonalizationPerUser_GetPageSettings]
[dbo].[aspnet_PersonalizationPerUser_ResetPageSettings]
[dbo].[aspnet_PersonalizationPerUser_SetPageSettings]
|[pic] [dbo].[aspnet_PersonalizationAllUsers] |
|(local) > aspnetdb > Tables > dbo.aspnet_PersonalizationAllUsers |
Properties
|Property |Value |
|Row Count |0 |
|Created |18:14:24 14 December 2008 |
|Last Modified |18:14:24 14 December 2008 |
Columns
| |Name |Data Type |Max Length (Bytes) |Allow Nulls |
|[pic][pic|PathId |uniqueidentifier |16 |⎦ |
|] | | | | |
| |PageSettings |image |max |⎦ |
| |LastUpdatedDate |datetime |8 |⎦ |
Indexes [pic]
| |Name |Columns |Unique |
|[pic] |PK__aspnet_Personali__4AB81AF0 |PathId |⎫ |
Foreign Keys [pic]
|Name |Columns |
|FK__aspnet_Pe__PathI__4BAC3F29 |PathId->[dbo].[aspnet_Paths].[PathId] |
SQL Script
|CREATE TABLE [dbo].[aspnet_PersonalizationAllUsers] |
|( |
|[PathId] [uniqueidentifier] NOT NULL, |
|[PageSettings] [image] NOT NULL, |
|[LastUpdatedDate] [datetime] NOT NULL |
|) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_PersonalizationAllUsers] ADD CONSTRAINT [PK__aspnet_Personali__4AB81AF0] PRIMARY KEY CLUSTERED |
|([PathId]) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_PersonalizationAllUsers] ADD CONSTRAINT [FK__aspnet_Pe__PathI__4BAC3F29] FOREIGN KEY ([PathId]) |
|REFERENCES [dbo].[aspnet_Paths] ([PathId]) |
|GO |
Uses
[dbo].[aspnet_Paths]
dbo
Used By
[dbo].[vw_aspnet_WebPartState_Shared]
[dbo].[aspnet_PersonalizationAdministration_DeleteAllState]
[dbo].[aspnet_PersonalizationAdministration_FindState]
[dbo].[aspnet_PersonalizationAdministration_GetCountOfState]
[dbo].[aspnet_PersonalizationAdministration_ResetSharedState]
[dbo].[aspnet_PersonalizationAllUsers_GetPageSettings]
[dbo].[aspnet_PersonalizationAllUsers_ResetPageSettings]
[dbo].[aspnet_PersonalizationAllUsers_SetPageSettings]
|[pic] [dbo].[aspnet_PersonalizationPerUser] |
|(local) > aspnetdb > Tables > dbo.aspnet_PersonalizationPerUser |
Properties
|Property |Value |
|Row Count |0 |
|Created |18:14:24 14 December 2008 |
|Last Modified |18:14:24 14 December 2008 |
Columns
| |Name |Data Type |Max Length |
| | | |(Bytes) |
|[pic] |PK__aspnet_Personali__4D94879B |Id |⎫ |
|[pic] |aspnet_PersonalizationPerUser_index1 |PathId, UserId |⎫ |
| |aspnet_PersonalizationPerUser_ncindex2 |UserId, PathId |⎫ |
Foreign Keys [pic]
|Name |Columns |
|FK__aspnet_Pe__PathI__4F7CD00D |PathId->[dbo].[aspnet_Paths].[PathId] |
|FK__aspnet_Pe__UserI__5070F446 |UserId->[dbo].[aspnet_Users].[UserId] |
SQL Script
|CREATE TABLE [dbo].[aspnet_PersonalizationPerUser] |
|( |
|[Id] [uniqueidentifier] NOT NULL CONSTRAINT [DF__aspnet_Perso__Id__4E88ABD4] DEFAULT (newid()), |
|[PathId] [uniqueidentifier] NULL, |
|[UserId] [uniqueidentifier] NULL, |
|[PageSettings] [image] NOT NULL, |
|[LastUpdatedDate] [datetime] NOT NULL |
|) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] ADD CONSTRAINT [PK__aspnet_Personali__4D94879B] PRIMARY KEY NONCLUSTERED |
|([Id]) ON [PRIMARY] |
|GO |
|CREATE UNIQUE CLUSTERED INDEX [aspnet_PersonalizationPerUser_index1] ON [dbo].[aspnet_PersonalizationPerUser] ([PathId], |
|[UserId]) ON [PRIMARY] |
|GO |
|CREATE UNIQUE NONCLUSTERED INDEX [aspnet_PersonalizationPerUser_ncindex2] ON [dbo].[aspnet_PersonalizationPerUser] ([UserId], |
|[PathId]) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] ADD CONSTRAINT [FK__aspnet_Pe__PathI__4F7CD00D] FOREIGN KEY ([PathId]) |
|REFERENCES [dbo].[aspnet_Paths] ([PathId]) |
|GO |
|ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] ADD CONSTRAINT [FK__aspnet_Pe__UserI__5070F446] FOREIGN KEY ([UserId]) |
|REFERENCES [dbo].[aspnet_Users] ([UserId]) |
|GO |
Uses
[dbo].[aspnet_Paths]
[dbo].[aspnet_Users]
dbo
Used By
[dbo].[vw_aspnet_WebPartState_User]
[dbo].[aspnet_AnyDataInTables]
[dbo].[aspnet_PersonalizationAdministration_DeleteAllState]
[dbo].[aspnet_PersonalizationAdministration_FindState]
[dbo].[aspnet_PersonalizationAdministration_GetCountOfState]
[dbo].[aspnet_PersonalizationAdministration_ResetUserState]
[dbo].[aspnet_PersonalizationPerUser_GetPageSettings]
[dbo].[aspnet_PersonalizationPerUser_ResetPageSettings]
[dbo].[aspnet_PersonalizationPerUser_SetPageSettings]
[dbo].[aspnet_Users_DeleteUser]
|[pic] [dbo].[aspnet_Profile] |
|(local) > aspnetdb > Tables > dbo.aspnet_Profile |
Properties
|Property |Value |
|Collation |Latin1_General_CI_AS |
|Row Count |0 |
|Created |18:14:23 14 December 2008 |
|Last Modified |18:14:23 14 December 2008 |
Columns
| |Name |Data Type |Max Length (Bytes) |Allow Nulls |
|[pic][pic|UserId |uniqueidentifier |16 |⎦ |
|] | | | | |
| |PropertyNames |ntext |max |⎦ |
| |PropertyValuesString |ntext |max |⎦ |
| |PropertyValuesBinary |image |max |⎦ |
| |LastUpdatedDate |datetime |8 |⎦ |
Indexes [pic]
| |Name |Columns |Unique |
|[pic] |PK__aspnet_Profile__286302EC |UserId |⎫ |
Foreign Keys [pic]
|Name |Columns |
|FK__aspnet_Pr__UserI__29572725 |UserId->[dbo].[aspnet_Users].[UserId] |
SQL Script
|CREATE TABLE [dbo].[aspnet_Profile] |
|( |
|[UserId] [uniqueidentifier] NOT NULL, |
|[PropertyNames] [ntext] COLLATE Latin1_General_CI_AS NOT NULL, |
|[PropertyValuesString] [ntext] COLLATE Latin1_General_CI_AS NOT NULL, |
|[PropertyValuesBinary] [image] NOT NULL, |
|[LastUpdatedDate] [datetime] NOT NULL |
|) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Profile] ADD CONSTRAINT [PK__aspnet_Profile__286302EC] PRIMARY KEY CLUSTERED ([UserId]) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Profile] ADD CONSTRAINT [FK__aspnet_Pr__UserI__29572725] FOREIGN KEY ([UserId]) REFERENCES |
|[dbo].[aspnet_Users] ([UserId]) |
|GO |
Uses
[dbo].[aspnet_Users]
dbo
Used By
[dbo].[vw_aspnet_Profiles]
[dbo].[aspnet_AnyDataInTables]
[dbo].[aspnet_Profile_DeleteInactiveProfiles]
[dbo].[aspnet_Profile_GetNumberOfInactiveProfiles]
[dbo].[aspnet_Profile_GetProfiles]
[dbo].[aspnet_Profile_GetProperties]
[dbo].[aspnet_Profile_SetProperties]
[dbo].[aspnet_Users_DeleteUser]
|[pic] [dbo].[aspnet_Roles] |
|(local) > aspnetdb > Tables > dbo.aspnet_Roles |
Properties
|Property |Value |
|Collation |Latin1_General_CI_AS |
|Row Count |0 |
|Created |18:14:23 14 December 2008 |
|Last Modified |18:14:23 14 December 2008 |
Columns
| |Name |Data Type |Max Length |
| | | |(Bytes) |
|[pic] |PK__aspnet_Roles__31EC6D26 |RoleId |⎫ |
|[pic] |aspnet_Roles_index1 |ApplicationId, LoweredRoleName |⎫ |
Foreign Keys [pic]
|Name |Columns |
|FK__aspnet_Ro__Appli__32E0915F |ApplicationId->[dbo].[aspnet_Applications].[ApplicationId] |
SQL Script
|CREATE TABLE [dbo].[aspnet_Roles] |
|( |
|[ApplicationId] [uniqueidentifier] NOT NULL, |
|[RoleId] [uniqueidentifier] NOT NULL CONSTRAINT [DF__aspnet_Ro__RoleI__33D4B598] DEFAULT (newid()), |
|[RoleName] [nvarchar] (256) COLLATE Latin1_General_CI_AS NOT NULL, |
|[LoweredRoleName] [nvarchar] (256) COLLATE Latin1_General_CI_AS NOT NULL, |
|[Description] [nvarchar] (256) COLLATE Latin1_General_CI_AS NULL |
|) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Roles] ADD CONSTRAINT [PK__aspnet_Roles__31EC6D26] PRIMARY KEY NONCLUSTERED ([RoleId]) ON [PRIMARY] |
|GO |
|CREATE UNIQUE CLUSTERED INDEX [aspnet_Roles_index1] ON [dbo].[aspnet_Roles] ([ApplicationId], [LoweredRoleName]) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Roles] ADD CONSTRAINT [FK__aspnet_Ro__Appli__32E0915F] FOREIGN KEY ([ApplicationId]) REFERENCES |
|[dbo].[aspnet_Applications] ([ApplicationId]) |
|GO |
Uses
[dbo].[aspnet_Applications]
dbo
Used By
[dbo].[aspnet_UsersInRoles]
[dbo].[vw_aspnet_Roles]
[dbo].[aspnet_AnyDataInTables]
[dbo].[aspnet_Roles_CreateRole]
[dbo].[aspnet_Roles_DeleteRole]
[dbo].[aspnet_Roles_GetAllRoles]
[dbo].[aspnet_Roles_RoleExists]
[dbo].[aspnet_UsersInRoles_AddUsersToRoles]
[dbo].[aspnet_UsersInRoles_FindUsersInRole]
[dbo].[aspnet_UsersInRoles_GetRolesForUser]
[dbo].[aspnet_UsersInRoles_GetUsersInRoles]
[dbo].[aspnet_UsersInRoles_IsUserInRole]
[dbo].[aspnet_UsersInRoles_RemoveUsersFromRoles]
|[pic] [dbo].[aspnet_SchemaVersions] |
|(local) > aspnetdb > Tables > dbo.aspnet_SchemaVersions |
Properties
|Property |Value |
|Collation |Latin1_General_CI_AS |
|Row Count |6 |
|Created |18:14:21 14 December 2008 |
|Last Modified |18:14:21 14 December 2008 |
Columns
| |Name |Data Type |Max Length (Bytes) |Allow Nulls |
|[pic] |Feature |nvarchar(128) |256 |⎦ |
|[pic] |CompatibleSchemaVersion |nvarchar(128) |256 |⎦ |
| |IsCurrentVersion |bit |1 |⎦ |
Indexes [pic]
| |Name |Columns |Unique |
|[pic] |PK__aspnet_SchemaVer__08EA5793 |Feature, CompatibleSchemaVersion |⎫ |
SQL Script
|CREATE TABLE [dbo].[aspnet_SchemaVersions] |
|( |
|[Feature] [nvarchar] (128) COLLATE Latin1_General_CI_AS NOT NULL, |
|[CompatibleSchemaVersion] [nvarchar] (128) COLLATE Latin1_General_CI_AS NOT NULL, |
|[IsCurrentVersion] [bit] NOT NULL |
|) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_SchemaVersions] ADD CONSTRAINT [PK__aspnet_SchemaVer__08EA5793] PRIMARY KEY CLUSTERED ([Feature], |
|[CompatibleSchemaVersion]) ON [PRIMARY] |
|GO |
Uses
dbo
Used By
[dbo].[aspnet_CheckSchemaVersion]
[dbo].[aspnet_RegisterSchemaVersion]
[dbo].[aspnet_UnRegisterSchemaVersion]
|[pic] [dbo].[aspnet_Users] |
|(local) > aspnetdb > Tables > dbo.aspnet_Users |
Properties
|Property |Value |
|Collation |Latin1_General_CI_AS |
|Row Count |0 |
|Created |18:14:21 14 December 2008 |
|Last Modified |18:14:24 14 December 2008 |
Columns
| |Name |Data Type |Max Length |
| | | |(Bytes) |
|[pic] |PK__aspnet_Users__03317E3D |UserId |⎫ |
|[pic] |aspnet_Users_Index |ApplicationId, LoweredUserName |⎫ |
| |aspnet_Users_Index2 |ApplicationId, LastActivityDate | |
Foreign Keys [pic]
|Name |Columns |
|FK__aspnet_Us__Appli__0425A276 |ApplicationId->[dbo].[aspnet_Applications].[ApplicationId] |
SQL Script
|CREATE TABLE [dbo].[aspnet_Users] |
|( |
|[ApplicationId] [uniqueidentifier] NOT NULL, |
|[UserId] [uniqueidentifier] NOT NULL CONSTRAINT [DF__aspnet_Us__UserI__0519C6AF] DEFAULT (newid()), |
|[UserName] [nvarchar] (256) COLLATE Latin1_General_CI_AS NOT NULL, |
|[LoweredUserName] [nvarchar] (256) COLLATE Latin1_General_CI_AS NOT NULL, |
|[MobileAlias] [nvarchar] (16) COLLATE Latin1_General_CI_AS NULL CONSTRAINT [DF__aspnet_Us__Mobil__060DEAE8] DEFAULT (NULL), |
|[IsAnonymous] [bit] NOT NULL CONSTRAINT [DF__aspnet_Us__IsAno__07020F21] DEFAULT ((0)), |
|[LastActivityDate] [datetime] NOT NULL |
|) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Users] ADD CONSTRAINT [PK__aspnet_Users__03317E3D] PRIMARY KEY NONCLUSTERED ([UserId]) ON [PRIMARY] |
|GO |
|CREATE NONCLUSTERED INDEX [aspnet_Users_Index2] ON [dbo].[aspnet_Users] ([ApplicationId], [LastActivityDate]) ON [PRIMARY] |
|GO |
|CREATE UNIQUE CLUSTERED INDEX [aspnet_Users_Index] ON [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName]) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_Users] ADD CONSTRAINT [FK__aspnet_Us__Appli__0425A276] FOREIGN KEY ([ApplicationId]) REFERENCES |
|[dbo].[aspnet_Applications] ([ApplicationId]) |
|GO |
Uses
[dbo].[aspnet_Applications]
dbo
Used By
[dbo].[aspnet_Membership]
[dbo].[aspnet_PersonalizationPerUser]
[dbo].[aspnet_Profile]
[dbo].[aspnet_UsersInRoles]
[dbo].[vw_aspnet_MembershipUsers]
[dbo].[vw_aspnet_Users]
[dbo].[aspnet_AnyDataInTables]
[dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer]
[dbo].[aspnet_Membership_CreateUser]
[dbo].[aspnet_Membership_FindUsersByEmail]
[dbo].[aspnet_Membership_FindUsersByName]
[dbo].[aspnet_Membership_GetAllUsers]
[dbo].[aspnet_Membership_GetNumberOfUsersOnline]
[dbo].[aspnet_Membership_GetPassword]
[dbo].[aspnet_Membership_GetPasswordWithFormat]
[dbo].[aspnet_Membership_GetUserByEmail]
[dbo].[aspnet_Membership_GetUserByName]
[dbo].[aspnet_Membership_GetUserByUserId]
[dbo].[aspnet_Membership_ResetPassword]
[dbo].[aspnet_Membership_SetPassword]
[dbo].[aspnet_Membership_UnlockUser]
[dbo].[aspnet_Membership_UpdateUser]
[dbo].[aspnet_Membership_UpdateUserInfo]
[dbo].[aspnet_PersonalizationAdministration_FindState]
[dbo].[aspnet_PersonalizationAdministration_GetCountOfState]
[dbo].[aspnet_PersonalizationAdministration_ResetUserState]
[dbo].[aspnet_PersonalizationPerUser_GetPageSettings]
[dbo].[aspnet_PersonalizationPerUser_ResetPageSettings]
[dbo].[aspnet_PersonalizationPerUser_SetPageSettings]
[dbo].[aspnet_Profile_DeleteInactiveProfiles]
[dbo].[aspnet_Profile_GetNumberOfInactiveProfiles]
[dbo].[aspnet_Profile_GetProfiles]
[dbo].[aspnet_Profile_GetProperties]
[dbo].[aspnet_Profile_SetProperties]
[dbo].[aspnet_Users_CreateUser]
[dbo].[aspnet_Users_DeleteUser]
[dbo].[aspnet_UsersInRoles_AddUsersToRoles]
[dbo].[aspnet_UsersInRoles_FindUsersInRole]
[dbo].[aspnet_UsersInRoles_GetRolesForUser]
[dbo].[aspnet_UsersInRoles_GetUsersInRoles]
[dbo].[aspnet_UsersInRoles_IsUserInRole]
[dbo].[aspnet_UsersInRoles_RemoveUsersFromRoles]
|[pic] [dbo].[aspnet_UsersInRoles] |
|(local) > aspnetdb > Tables > dbo.aspnet_UsersInRoles |
Properties
|Property |Value |
|Row Count |0 |
|Created |18:14:23 14 December 2008 |
|Last Modified |18:14:23 14 December 2008 |
Columns
| |Name |Data Type |Max Length (Bytes) |Allow Nulls |
|[pic][pic] |UserId |uniqueidentifier |16 |⎦ |
|[pic][pic][pi|RoleId |uniqueidentifier |16 |⎦ |
|c] | | | | |
Indexes [pic]
| |Name |Columns |Unique |
|[pic] |PK__aspnet_UsersInRo__35BCFE0A |UserId, RoleId |⎫ |
| |aspnet_UsersInRoles_index |RoleId | |
Foreign Keys [pic]
|Name |Columns |
|FK__aspnet_Us__RoleI__37A5467C |RoleId->[dbo].[aspnet_Roles].[RoleId] |
|FK__aspnet_Us__UserI__36B12243 |UserId->[dbo].[aspnet_Users].[UserId] |
SQL Script
|CREATE TABLE [dbo].[aspnet_UsersInRoles] |
|( |
|[UserId] [uniqueidentifier] NOT NULL, |
|[RoleId] [uniqueidentifier] NOT NULL |
|) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_UsersInRoles] ADD CONSTRAINT [PK__aspnet_UsersInRo__35BCFE0A] PRIMARY KEY CLUSTERED ([UserId], |
|[RoleId]) ON [PRIMARY] |
|GO |
|CREATE NONCLUSTERED INDEX [aspnet_UsersInRoles_index] ON [dbo].[aspnet_UsersInRoles] ([RoleId]) ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_UsersInRoles] ADD CONSTRAINT [FK__aspnet_Us__RoleI__37A5467C] FOREIGN KEY ([RoleId]) REFERENCES |
|[dbo].[aspnet_Roles] ([RoleId]) |
|GO |
|ALTER TABLE [dbo].[aspnet_UsersInRoles] ADD CONSTRAINT [FK__aspnet_Us__UserI__36B12243] FOREIGN KEY ([UserId]) REFERENCES |
|[dbo].[aspnet_Users] ([UserId]) |
|GO |
Uses
[dbo].[aspnet_Roles]
[dbo].[aspnet_Users]
dbo
Used By
[dbo].[vw_aspnet_UsersInRoles]
[dbo].[aspnet_Roles_DeleteRole]
[dbo].[aspnet_Users_DeleteUser]
[dbo].[aspnet_UsersInRoles_AddUsersToRoles]
[dbo].[aspnet_UsersInRoles_FindUsersInRole]
[dbo].[aspnet_UsersInRoles_GetRolesForUser]
[dbo].[aspnet_UsersInRoles_GetUsersInRoles]
[dbo].[aspnet_UsersInRoles_IsUserInRole]
[dbo].[aspnet_UsersInRoles_RemoveUsersFromRoles]
|[pic] [dbo].[aspnet_WebEvent_Events] |
|(local) > aspnetdb > Tables > dbo.aspnet_WebEvent_Events |
Properties
|Property |Value |
|Collation |Latin1_General_CI_AS |
|Row Count |0 |
|Created |18:14:25 14 December 2008 |
|Last Modified |18:14:25 14 December 2008 |
Columns
| |Name |Data Type |Max Length (Bytes) |Allow Nulls |
|[pic] |EventId |char(32) |32 |⎦ |
| |EventTimeUtc |datetime |8 |⎦ |
| |EventTime |datetime |8 |⎦ |
| |EventType |nvarchar(256) |512 |⎦ |
| |EventSequence |decimal(19,0) |9 |⎦ |
| |EventOccurrence |decimal(19,0) |9 |⎦ |
| |EventCode |int |4 |⎦ |
| |EventDetailCode |int |4 |⎦ |
| |Message |nvarchar(1024) |2048 |⎫ |
| |ApplicationPath |nvarchar(256) |512 |⎫ |
| |ApplicationVirtualPath |nvarchar(256) |512 |⎫ |
| |MachineName |nvarchar(256) |512 |⎦ |
| |RequestUrl |nvarchar(1024) |2048 |⎫ |
| |ExceptionType |nvarchar(256) |512 |⎫ |
| |Details |ntext |max |⎫ |
Indexes [pic]
| |Name |Columns |Unique |
|[pic] |PK__aspnet_WebEvent___5FB337D6 |EventId |⎫ |
SQL Script
|CREATE TABLE [dbo].[aspnet_WebEvent_Events] |
|( |
|[EventId] [char] (32) COLLATE Latin1_General_CI_AS NOT NULL, |
|[EventTimeUtc] [datetime] NOT NULL, |
|[EventTime] [datetime] NOT NULL, |
|[EventType] [nvarchar] (256) COLLATE Latin1_General_CI_AS NOT NULL, |
|[EventSequence] [decimal] (19, 0) NOT NULL, |
|[EventOccurrence] [decimal] (19, 0) NOT NULL, |
|[EventCode] [int] NOT NULL, |
|[EventDetailCode] [int] NOT NULL, |
|[Message] [nvarchar] (1024) COLLATE Latin1_General_CI_AS NULL, |
|[ApplicationPath] [nvarchar] (256) COLLATE Latin1_General_CI_AS NULL, |
|[ApplicationVirtualPath] [nvarchar] (256) COLLATE Latin1_General_CI_AS NULL, |
|[MachineName] [nvarchar] (256) COLLATE Latin1_General_CI_AS NOT NULL, |
|[RequestUrl] [nvarchar] (1024) COLLATE Latin1_General_CI_AS NULL, |
|[ExceptionType] [nvarchar] (256) COLLATE Latin1_General_CI_AS NULL, |
|[Details] [ntext] COLLATE Latin1_General_CI_AS NULL |
|) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] |
|GO |
|ALTER TABLE [dbo].[aspnet_WebEvent_Events] ADD CONSTRAINT [PK__aspnet_WebEvent___5FB337D6] PRIMARY KEY CLUSTERED ([EventId]) ON |
|[PRIMARY] |
|GO |
Uses
dbo
Used By
[dbo].[aspnet_AnyDataInTables]
[dbo].[aspnet_WebEvent_LogEvent]
|[pic] Views |
|(local) > aspnetdb > Views |
|Name |
|dbo.vw_aspnet_Applications |
|dbo.vw_aspnet_MembershipUsers |
|dbo.vw_aspnet_Profiles |
|dbo.vw_aspnet_Roles |
|dbo.vw_aspnet_Users |
|dbo.vw_aspnet_UsersInRoles |
|dbo.vw_aspnet_WebPartState_Paths |
|dbo.vw_aspnet_WebPartState_Shared |
|dbo.vw_aspnet_WebPartState_User |
|[pic] [dbo].[vw_aspnet_Applications] |
|(local) > aspnetdb > Views > dbo.vw_aspnet_Applications |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
|Created |18:14:22 14 December 2008 |
|Last Modified |18:14:22 14 December 2008 |
Columns
|Name |
|ApplicationName |
|LoweredApplicationName |
|ApplicationId |
|Description |
Permissions
|Type |Action |Owning Principal |
|Grant |Select |aspnet_Membership_ReportingAccess |
|Grant |Select |aspnet_Profile_ReportingAccess |
|Grant |Select |aspnet_Roles_ReportingAccess |
|Grant |Select |aspnet_Personalization_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE VIEW [dbo].[vw_aspnet_Applications] |
|AS SELECT [dbo].[aspnet_Applications].[ApplicationName], [dbo].[aspnet_Applications].[LoweredApplicationName], |
|[dbo].[aspnet_Applications].[ApplicationId], [dbo].[aspnet_Applications].[Description] |
|FROM [dbo].[aspnet_Applications] |
| |
|GO |
|GRANT SELECT ON [dbo].[vw_aspnet_Applications] TO [aspnet_Membership_ReportingAccess] |
|GRANT SELECT ON [dbo].[vw_aspnet_Applications] TO [aspnet_Personalization_ReportingAccess] |
|GRANT SELECT ON [dbo].[vw_aspnet_Applications] TO [aspnet_Profile_ReportingAccess] |
|GRANT SELECT ON [dbo].[vw_aspnet_Applications] TO [aspnet_Roles_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
dbo
|[pic] [dbo].[vw_aspnet_MembershipUsers] |
|(local) > aspnetdb > Views > dbo.vw_aspnet_MembershipUsers |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
|Created |18:14:23 14 December 2008 |
|Last Modified |18:14:23 14 December 2008 |
Columns
|Name |
|UserId |
|PasswordFormat |
|MobilePIN |
|Email |
|LoweredEmail |
|PasswordQuestion |
|PasswordAnswer |
|IsApproved |
|IsLockedOut |
|CreateDate |
|LastLoginDate |
|LastPasswordChangedDate |
|LastLockoutDate |
|FailedPasswordAttemptCount |
|FailedPasswordAttemptWindowStart |
|FailedPasswordAnswerAttemptCount |
|FailedPasswordAnswerAttemptWindowStart |
|Comment |
|ApplicationId |
|UserName |
|MobileAlias |
|IsAnonymous |
|LastActivityDate |
Permissions
|Type |Action |Owning Principal |
|Grant |Select |aspnet_Membership_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE VIEW [dbo].[vw_aspnet_MembershipUsers] |
|AS SELECT [dbo].[aspnet_Membership].[UserId], |
|[dbo].[aspnet_Membership].[PasswordFormat], |
|[dbo].[aspnet_Membership].[MobilePIN], |
|[dbo].[aspnet_Membership].[Email], |
|[dbo].[aspnet_Membership].[LoweredEmail], |
|[dbo].[aspnet_Membership].[PasswordQuestion], |
|[dbo].[aspnet_Membership].[PasswordAnswer], |
|[dbo].[aspnet_Membership].[IsApproved], |
|[dbo].[aspnet_Membership].[IsLockedOut], |
|[dbo].[aspnet_Membership].[CreateDate], |
|[dbo].[aspnet_Membership].[LastLoginDate], |
|[dbo].[aspnet_Membership].[LastPasswordChangedDate], |
|[dbo].[aspnet_Membership].[LastLockoutDate], |
|[dbo].[aspnet_Membership].[FailedPasswordAttemptCount], |
|[dbo].[aspnet_Membership].[FailedPasswordAttemptWindowStart], |
|[dbo].[aspnet_Membership].[FailedPasswordAnswerAttemptCount], |
|[dbo].[aspnet_Membership].[FailedPasswordAnswerAttemptWindowStart], |
|[dbo].[aspnet_Membership].[Comment], |
|[dbo].[aspnet_Users].[ApplicationId], |
|[dbo].[aspnet_Users].[UserName], |
|[dbo].[aspnet_Users].[MobileAlias], |
|[dbo].[aspnet_Users].[IsAnonymous], |
|[dbo].[aspnet_Users].[LastActivityDate] |
|FROM [dbo].[aspnet_Membership] INNER JOIN [dbo].[aspnet_Users] |
|ON [dbo].[aspnet_Membership].[UserId] = [dbo].[aspnet_Users].[UserId] |
| |
|GO |
|GRANT SELECT ON [dbo].[vw_aspnet_MembershipUsers] TO [aspnet_Membership_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[vw_aspnet_Profiles] |
|(local) > aspnetdb > Views > dbo.vw_aspnet_Profiles |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
|Created |18:14:23 14 December 2008 |
|Last Modified |18:14:23 14 December 2008 |
Columns
|Name |
|UserId |
|LastUpdatedDate |
|DataSize |
Permissions
|Type |Action |Owning Principal |
|Grant |Select |aspnet_Profile_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE VIEW [dbo].[vw_aspnet_Profiles] |
|AS SELECT [dbo].[aspnet_Profile].[UserId], [dbo].[aspnet_Profile].[LastUpdatedDate], |
|[DataSize]= DATALENGTH([dbo].[aspnet_Profile].[PropertyNames]) |
|+ DATALENGTH([dbo].[aspnet_Profile].[PropertyValuesString]) |
|+ DATALENGTH([dbo].[aspnet_Profile].[PropertyValuesBinary]) |
|FROM [dbo].[aspnet_Profile] |
| |
|GO |
|GRANT SELECT ON [dbo].[vw_aspnet_Profiles] TO [aspnet_Profile_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Profile]
dbo
|[pic] [dbo].[vw_aspnet_Roles] |
|(local) > aspnetdb > Views > dbo.vw_aspnet_Roles |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
|Created |18:14:24 14 December 2008 |
|Last Modified |18:14:24 14 December 2008 |
Columns
|Name |
|ApplicationId |
|RoleId |
|RoleName |
|LoweredRoleName |
|Description |
Permissions
|Type |Action |Owning Principal |
|Grant |Select |aspnet_Roles_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE VIEW [dbo].[vw_aspnet_Roles] |
|AS SELECT [dbo].[aspnet_Roles].[ApplicationId], [dbo].[aspnet_Roles].[RoleId], [dbo].[aspnet_Roles].[RoleName], |
|[dbo].[aspnet_Roles].[LoweredRoleName], [dbo].[aspnet_Roles].[Description] |
|FROM [dbo].[aspnet_Roles] |
| |
|GO |
|GRANT SELECT ON [dbo].[vw_aspnet_Roles] TO [aspnet_Roles_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Roles]
dbo
|[pic] [dbo].[vw_aspnet_Users] |
|(local) > aspnetdb > Views > dbo.vw_aspnet_Users |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
|Created |18:14:22 14 December 2008 |
|Last Modified |18:14:22 14 December 2008 |
Columns
|Name |
|ApplicationId |
|UserId |
|UserName |
|LoweredUserName |
|MobileAlias |
|IsAnonymous |
|LastActivityDate |
Permissions
|Type |Action |Owning Principal |
|Grant |Select |aspnet_Membership_ReportingAccess |
|Grant |Select |aspnet_Profile_ReportingAccess |
|Grant |Select |aspnet_Roles_ReportingAccess |
|Grant |Select |aspnet_Personalization_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE VIEW [dbo].[vw_aspnet_Users] |
|AS SELECT [dbo].[aspnet_Users].[ApplicationId], [dbo].[aspnet_Users].[UserId], [dbo].[aspnet_Users].[UserName], |
|[dbo].[aspnet_Users].[LoweredUserName], [dbo].[aspnet_Users].[MobileAlias], [dbo].[aspnet_Users].[IsAnonymous], |
|[dbo].[aspnet_Users].[LastActivityDate] |
|FROM [dbo].[aspnet_Users] |
| |
|GO |
|GRANT SELECT ON [dbo].[vw_aspnet_Users] TO [aspnet_Membership_ReportingAccess] |
|GRANT SELECT ON [dbo].[vw_aspnet_Users] TO [aspnet_Personalization_ReportingAccess] |
|GRANT SELECT ON [dbo].[vw_aspnet_Users] TO [aspnet_Profile_ReportingAccess] |
|GRANT SELECT ON [dbo].[vw_aspnet_Users] TO [aspnet_Roles_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[vw_aspnet_UsersInRoles] |
|(local) > aspnetdb > Views > dbo.vw_aspnet_UsersInRoles |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
|Created |18:14:24 14 December 2008 |
|Last Modified |18:14:24 14 December 2008 |
Columns
|Name |
|UserId |
|RoleId |
Permissions
|Type |Action |Owning Principal |
|Grant |Select |aspnet_Roles_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE VIEW [dbo].[vw_aspnet_UsersInRoles] |
|AS SELECT [dbo].[aspnet_UsersInRoles].[UserId], [dbo].[aspnet_UsersInRoles].[RoleId] |
|FROM [dbo].[aspnet_UsersInRoles] |
| |
|GO |
|GRANT SELECT ON [dbo].[vw_aspnet_UsersInRoles] TO [aspnet_Roles_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_UsersInRoles]
dbo
|[pic] [dbo].[vw_aspnet_WebPartState_Paths] |
|(local) > aspnetdb > Views > dbo.vw_aspnet_WebPartState_Paths |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
|Created |18:14:24 14 December 2008 |
|Last Modified |18:14:24 14 December 2008 |
Columns
|Name |
|ApplicationId |
|PathId |
|Path |
|LoweredPath |
Permissions
|Type |Action |Owning Principal |
|Grant |Select |aspnet_Personalization_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE VIEW [dbo].[vw_aspnet_WebPartState_Paths] |
|AS SELECT [dbo].[aspnet_Paths].[ApplicationId], [dbo].[aspnet_Paths].[PathId], [dbo].[aspnet_Paths].[Path], |
|[dbo].[aspnet_Paths].[LoweredPath] |
|FROM [dbo].[aspnet_Paths] |
| |
|GO |
|GRANT SELECT ON [dbo].[vw_aspnet_WebPartState_Paths] TO [aspnet_Personalization_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Paths]
dbo
|[pic] [dbo].[vw_aspnet_WebPartState_Shared] |
|(local) > aspnetdb > Views > dbo.vw_aspnet_WebPartState_Shared |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
|Created |18:14:24 14 December 2008 |
|Last Modified |18:14:24 14 December 2008 |
Columns
|Name |
|PathId |
|DataSize |
|LastUpdatedDate |
Permissions
|Type |Action |Owning Principal |
|Grant |Select |aspnet_Personalization_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE VIEW [dbo].[vw_aspnet_WebPartState_Shared] |
|AS SELECT [dbo].[aspnet_PersonalizationAllUsers].[PathId], |
|[DataSize]=DATALENGTH([dbo].[aspnet_PersonalizationAllUsers].[PageSettings]), |
|[dbo].[aspnet_PersonalizationAllUsers].[LastUpdatedDate] |
|FROM [dbo].[aspnet_PersonalizationAllUsers] |
| |
|GO |
|GRANT SELECT ON [dbo].[vw_aspnet_WebPartState_Shared] TO [aspnet_Personalization_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_PersonalizationAllUsers]
dbo
|[pic] [dbo].[vw_aspnet_WebPartState_User] |
|(local) > aspnetdb > Views > dbo.vw_aspnet_WebPartState_User |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
|Created |18:14:24 14 December 2008 |
|Last Modified |18:14:24 14 December 2008 |
Columns
|Name |
|PathId |
|UserId |
|DataSize |
|LastUpdatedDate |
Permissions
|Type |Action |Owning Principal |
|Grant |Select |aspnet_Personalization_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE VIEW [dbo].[vw_aspnet_WebPartState_User] |
|AS SELECT [dbo].[aspnet_PersonalizationPerUser].[PathId], [dbo].[aspnet_PersonalizationPerUser].[UserId], |
|[DataSize]=DATALENGTH([dbo].[aspnet_PersonalizationPerUser].[PageSettings]), |
|[dbo].[aspnet_PersonalizationPerUser].[LastUpdatedDate] |
|FROM [dbo].[aspnet_PersonalizationPerUser] |
| |
|GO |
|GRANT SELECT ON [dbo].[vw_aspnet_WebPartState_User] TO [aspnet_Personalization_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_PersonalizationPerUser]
dbo
|[pic] Stored Procedures |
|(local) > aspnetdb > Stored Procedures |
|Name |
|dbo.aspnet_AnyDataInTables |
|dbo.aspnet_Applications_CreateApplication |
|dbo.aspnet_CheckSchemaVersion |
|dbo.aspnet_Membership_ChangePasswordQuestionAndAnswer |
|dbo.aspnet_Membership_CreateUser |
|dbo.aspnet_Membership_FindUsersByEmail |
|dbo.aspnet_Membership_FindUsersByName |
|dbo.aspnet_Membership_GetAllUsers |
|dbo.aspnet_Membership_GetNumberOfUsersOnline |
|dbo.aspnet_Membership_GetPassword |
|dbo.aspnet_Membership_GetPasswordWithFormat |
|dbo.aspnet_Membership_GetUserByEmail |
|dbo.aspnet_Membership_GetUserByName |
|dbo.aspnet_Membership_GetUserByUserId |
|dbo.aspnet_Membership_ResetPassword |
|dbo.aspnet_Membership_SetPassword |
|dbo.aspnet_Membership_UnlockUser |
|dbo.aspnet_Membership_UpdateUser |
|dbo.aspnet_Membership_UpdateUserInfo |
|dbo.aspnet_Paths_CreatePath |
|dbo.aspnet_Personalization_GetApplicationId |
|dbo.aspnet_PersonalizationAdministration_DeleteAllState |
|dbo.aspnet_PersonalizationAdministration_FindState |
|dbo.aspnet_PersonalizationAdministration_GetCountOfState |
|dbo.aspnet_PersonalizationAdministration_ResetSharedState |
|dbo.aspnet_PersonalizationAdministration_ResetUserState |
|dbo.aspnet_PersonalizationAllUsers_GetPageSettings |
|dbo.aspnet_PersonalizationAllUsers_ResetPageSettings |
|dbo.aspnet_PersonalizationAllUsers_SetPageSettings |
|dbo.aspnet_PersonalizationPerUser_GetPageSettings |
|dbo.aspnet_PersonalizationPerUser_ResetPageSettings |
|dbo.aspnet_PersonalizationPerUser_SetPageSettings |
|dbo.aspnet_Profile_DeleteInactiveProfiles |
|dbo.aspnet_Profile_DeleteProfiles |
|dbo.aspnet_Profile_GetNumberOfInactiveProfiles |
|dbo.aspnet_Profile_GetProfiles |
|dbo.aspnet_Profile_GetProperties |
|dbo.aspnet_Profile_SetProperties |
|dbo.aspnet_RegisterSchemaVersion |
|dbo.aspnet_Roles_CreateRole |
|dbo.aspnet_Roles_DeleteRole |
|dbo.aspnet_Roles_GetAllRoles |
|dbo.aspnet_Roles_RoleExists |
|dbo.aspnet_Setup_RemoveAllRoleMembers |
|dbo.aspnet_Setup_RestorePermissions |
|dbo.aspnet_UnRegisterSchemaVersion |
|dbo.aspnet_Users_CreateUser |
|dbo.aspnet_Users_DeleteUser |
|dbo.aspnet_UsersInRoles_AddUsersToRoles |
|dbo.aspnet_UsersInRoles_FindUsersInRole |
|dbo.aspnet_UsersInRoles_GetRolesForUser |
|dbo.aspnet_UsersInRoles_GetUsersInRoles |
|dbo.aspnet_UsersInRoles_IsUserInRole |
|dbo.aspnet_UsersInRoles_RemoveUsersFromRoles |
|dbo.aspnet_WebEvent_LogEvent |
|[pic] [dbo].[aspnet_AnyDataInTables] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_AnyDataInTables |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@TablesToCheck |int |4 |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE [dbo].aspnet_AnyDataInTables |
|@TablesToCheck int |
|AS |
|BEGIN |
|-- Check Membership table if (@TablesToCheck & 1) is set |
|IF ((@TablesToCheck & 1) 0 AND |
|(EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type = 'V')))) |
|BEGIN |
|IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Membership)) |
|BEGIN |
|SELECT N'aspnet_Membership' |
|RETURN |
|END |
|END |
| |
|-- Check aspnet_Roles table if (@TablesToCheck & 2) is set |
|IF ((@TablesToCheck & 2) 0 AND |
|(EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Roles') AND (type = 'V'))) ) |
|BEGIN |
|IF (EXISTS(SELECT TOP 1 RoleId FROM dbo.aspnet_Roles)) |
|BEGIN |
|SELECT N'aspnet_Roles' |
|RETURN |
|END |
|END |
| |
|-- Check aspnet_Profile table if (@TablesToCheck & 4) is set |
|IF ((@TablesToCheck & 4) 0 AND |
|(EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Profiles') AND (type = 'V'))) ) |
|BEGIN |
|IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Profile)) |
|BEGIN |
|SELECT N'aspnet_Profile' |
|RETURN |
|END |
|END |
| |
|-- Check aspnet_PersonalizationPerUser table if (@TablesToCheck & 8) is set |
|IF ((@TablesToCheck & 8) 0 AND |
|(EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_WebPartState_User') AND (type = 'V'))) ) |
|BEGIN |
|IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_PersonalizationPerUser)) |
|BEGIN |
|SELECT N'aspnet_PersonalizationPerUser' |
|RETURN |
|END |
|END |
| |
|-- Check aspnet_PersonalizationPerUser table if (@TablesToCheck & 16) is set |
|IF ((@TablesToCheck & 16) 0 AND |
|(EXISTS (SELECT name FROM sysobjects WHERE (name = N'aspnet_WebEvent_LogEvent') AND (type = 'P'))) ) |
|BEGIN |
|IF (EXISTS(SELECT TOP 1 * FROM dbo.aspnet_WebEvent_Events)) |
|BEGIN |
|SELECT N'aspnet_WebEvent_Events' |
|RETURN |
|END |
|END |
| |
|-- Check aspnet_Users table if (@TablesToCheck & 1,2,4 & 8) are all set |
|IF ((@TablesToCheck & 1) 0 AND |
|(@TablesToCheck & 2) 0 AND |
|(@TablesToCheck & 4) 0 AND |
|(@TablesToCheck & 8) 0 AND |
|(@TablesToCheck & 32) 0 AND |
|(@TablesToCheck & 128) 0 AND |
|(@TablesToCheck & 256) 0 AND |
|(@TablesToCheck & 512) 0 AND |
|(@TablesToCheck & 1024) 0) |
|BEGIN |
|IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Users)) |
|BEGIN |
|SELECT N'aspnet_Users' |
|RETURN |
|END |
|IF (EXISTS(SELECT TOP 1 ApplicationId FROM dbo.aspnet_Applications)) |
|BEGIN |
|SELECT N'aspnet_Applications' |
|RETURN |
|END |
|END |
|END |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_PersonalizationPerUser]
[dbo].[aspnet_Profile]
[dbo].[aspnet_Roles]
[dbo].[aspnet_Users]
[dbo].[aspnet_WebEvent_Events]
dbo
|[pic] [dbo].[aspnet_Applications_CreateApplication] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Applications_CreateApplication |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |Direction |
|@ApplicationName |nvarchar(256) |512 | |
|@ApplicationId |uniqueidentifier |16 |Out |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE [dbo].aspnet_Applications_CreateApplication |
|@ApplicationName nvarchar(256), |
|@ApplicationId uniqueidentifier OUTPUT |
|AS |
|BEGIN |
|SELECT @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
| |
|IF(@ApplicationId IS NULL) |
|BEGIN |
|DECLARE @TranStarted bit |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
|ELSE |
|SET @TranStarted = 0 |
| |
|SELECT @ApplicationId = ApplicationId |
|FROM dbo.aspnet_Applications WITH (UPDLOCK, HOLDLOCK) |
|WHERE LOWER(@ApplicationName) = LoweredApplicationName |
| |
|IF(@ApplicationId IS NULL) |
|BEGIN |
|SELECT @ApplicationId = NEWID() |
|INSERT dbo.aspnet_Applications (ApplicationId, ApplicationName, LoweredApplicationName) |
|VALUES (@ApplicationId, @ApplicationName, LOWER(@ApplicationName)) |
|END |
| |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|IF(@@ERROR = 0) |
|BEGIN |
|SET @TranStarted = 0 |
|COMMIT TRANSACTION |
|END |
|ELSE |
|BEGIN |
|SET @TranStarted = 0 |
|ROLLBACK TRANSACTION |
|END |
|END |
|END |
|END |
|GO |
Uses
[dbo].[aspnet_Applications]
dbo
Used By
[dbo].[aspnet_Membership_CreateUser]
[dbo].[aspnet_PersonalizationAllUsers_SetPageSettings]
[dbo].[aspnet_PersonalizationPerUser_SetPageSettings]
[dbo].[aspnet_Profile_SetProperties]
[dbo].[aspnet_Roles_CreateRole]
|[pic] [dbo].[aspnet_CheckSchemaVersion] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_CheckSchemaVersion |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@Feature |nvarchar(128) |256 |
|@CompatibleSchemaVersion |nvarchar(128) |256 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_BasicAccess |
|Grant |Execute |aspnet_Membership_ReportingAccess |
|Grant |Execute |aspnet_Profile_BasicAccess |
|Grant |Execute |aspnet_Profile_ReportingAccess |
|Grant |Execute |aspnet_Roles_BasicAccess |
|Grant |Execute |aspnet_Roles_ReportingAccess |
|Grant |Execute |aspnet_Personalization_BasicAccess |
|Grant |Execute |aspnet_Personalization_ReportingAccess |
|Grant |Execute |aspnet_WebEvent_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE [dbo].aspnet_CheckSchemaVersion |
|@Feature nvarchar(128), |
|@CompatibleSchemaVersion nvarchar(128) |
|AS |
|BEGIN |
|IF (EXISTS( SELECT * |
|FROM dbo.aspnet_SchemaVersions |
|WHERE Feature = LOWER( @Feature ) AND |
|CompatibleSchemaVersion = @CompatibleSchemaVersion )) |
|RETURN 0 |
| |
|RETURN 1 |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_CheckSchemaVersion] TO [aspnet_Membership_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_CheckSchemaVersion] TO [aspnet_Membership_ReportingAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_CheckSchemaVersion] TO [aspnet_Personalization_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_CheckSchemaVersion] TO [aspnet_Personalization_ReportingAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_CheckSchemaVersion] TO [aspnet_Profile_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_CheckSchemaVersion] TO [aspnet_Profile_ReportingAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_CheckSchemaVersion] TO [aspnet_Roles_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_CheckSchemaVersion] TO [aspnet_Roles_ReportingAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_CheckSchemaVersion] TO [aspnet_WebEvent_FullAccess] |
|GO |
Uses
[dbo].[aspnet_SchemaVersions]
dbo
|[pic] [dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_ChangePasswordQuestionAndAnswer |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@NewPasswordQuestion |nvarchar(256) |512 |
|@NewPasswordAnswer |nvarchar(128) |256 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_ChangePasswordQuestionAndAnswer |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256), |
|@NewPasswordQuestion nvarchar(256), |
|@NewPasswordAnswer nvarchar(128) |
|AS |
|BEGIN |
|DECLARE @UserId uniqueidentifier |
|SELECT @UserId = NULL |
|SELECT @UserId = u.UserId |
|FROM dbo.aspnet_Membership m, dbo.aspnet_Users u, dbo.aspnet_Applications a |
|WHERE LoweredUserName = LOWER(@UserName) AND |
|u.ApplicationId = a.ApplicationId AND |
|LOWER(@ApplicationName) = a.LoweredApplicationName AND |
|u.UserId = m.UserId |
|IF (@UserId IS NULL) |
|BEGIN |
|RETURN(1) |
|END |
| |
|UPDATE dbo.aspnet_Membership |
|SET PasswordQuestion = @NewPasswordQuestion, PasswordAnswer = @NewPasswordAnswer |
|WHERE UserId=@UserId |
|RETURN(0) |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer] TO [aspnet_Membership_FullAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Membership_CreateUser] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_CreateUser |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |Direction |
|@ApplicationName |nvarchar(256) |512 | |
|@UserName |nvarchar(256) |512 | |
|@Password |nvarchar(128) |256 | |
|@PasswordSalt |nvarchar(128) |256 | |
|@Email |nvarchar(256) |512 | |
|@PasswordQuestion |nvarchar(256) |512 | |
|@PasswordAnswer |nvarchar(128) |256 | |
|@IsApproved |bit |1 | |
|@CurrentTimeUtc |datetime |8 | |
|@CreateDate |datetime |8 | |
|@UniqueEmail |int |4 | |
|@PasswordFormat |int |4 | |
|@UserId |uniqueidentifier |16 |Out |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_CreateUser |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256), |
|@Password nvarchar(128), |
|@PasswordSalt nvarchar(128), |
|@Email nvarchar(256), |
|@PasswordQuestion nvarchar(256), |
|@PasswordAnswer nvarchar(128), |
|@IsApproved bit, |
|@CurrentTimeUtc datetime, |
|@CreateDate datetime = NULL, |
|@UniqueEmail int = 0, |
|@PasswordFormat int = 0, |
|@UserId uniqueidentifier OUTPUT |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
| |
|DECLARE @NewUserId uniqueidentifier |
|SELECT @NewUserId = NULL |
| |
|DECLARE @IsLockedOut bit |
|SET @IsLockedOut = 0 |
| |
|DECLARE @LastLockoutDate datetime |
|SET @LastLockoutDate = CONVERT( datetime, '17540101', 112 ) |
| |
|DECLARE @FailedPasswordAttemptCount int |
|SET @FailedPasswordAttemptCount = 0 |
| |
|DECLARE @FailedPasswordAttemptWindowStart datetime |
|SET @FailedPasswordAttemptWindowStart = CONVERT( datetime, '17540101', 112 ) |
| |
|DECLARE @FailedPasswordAnswerAttemptCount int |
|SET @FailedPasswordAnswerAttemptCount = 0 |
| |
|DECLARE @FailedPasswordAnswerAttemptWindowStart datetime |
|SET @FailedPasswordAnswerAttemptWindowStart = CONVERT( datetime, '17540101', 112 ) |
| |
|DECLARE @NewUserCreated bit |
|DECLARE @ReturnValue int |
|SET @ReturnValue = 0 |
| |
|DECLARE @ErrorCode int |
|SET @ErrorCode = 0 |
| |
|DECLARE @TranStarted bit |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
|ELSE |
|SET @TranStarted = 0 |
| |
|EXEC dbo.aspnet_Applications_CreateApplication @ApplicationName, @ApplicationId OUTPUT |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|SET @CreateDate = @CurrentTimeUtc |
| |
|SELECT @NewUserId = UserId FROM dbo.aspnet_Users WHERE LOWER(@UserName) = LoweredUserName AND @ApplicationId = ApplicationId |
|IF ( @NewUserId IS NULL ) |
|BEGIN |
|SET @NewUserId = @UserId |
|EXEC @ReturnValue = dbo.aspnet_Users_CreateUser @ApplicationId, @UserName, 0, @CreateDate, @NewUserId OUTPUT |
|SET @NewUserCreated = 1 |
|END |
|ELSE |
|BEGIN |
|SET @NewUserCreated = 0 |
|IF( @NewUserId @UserId AND @UserId IS NOT NULL ) |
|BEGIN |
|SET @ErrorCode = 6 |
|GOTO Cleanup |
|END |
|END |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|IF( @ReturnValue = -1 ) |
|BEGIN |
|SET @ErrorCode = 10 |
|GOTO Cleanup |
|END |
| |
|IF ( EXISTS ( SELECT UserId |
|FROM dbo.aspnet_Membership |
|WHERE @NewUserId = UserId ) ) |
|BEGIN |
|SET @ErrorCode = 6 |
|GOTO Cleanup |
|END |
| |
|SET @UserId = @NewUserId |
| |
|IF (@UniqueEmail = 1) |
|BEGIN |
|IF (EXISTS (SELECT * |
|FROM dbo.aspnet_Membership m WITH ( UPDLOCK, HOLDLOCK ) |
|WHERE ApplicationId = @ApplicationId AND LoweredEmail = LOWER(@Email))) |
|BEGIN |
|SET @ErrorCode = 7 |
|GOTO Cleanup |
|END |
|END |
| |
|IF (@NewUserCreated = 0) |
|BEGIN |
|UPDATE dbo.aspnet_Users |
|SET LastActivityDate = @CreateDate |
|WHERE @UserId = UserId |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
|END |
| |
|INSERT INTO dbo.aspnet_Membership |
|( ApplicationId, |
|UserId, |
|Password, |
|PasswordSalt, |
|Email, |
|LoweredEmail, |
|PasswordQuestion, |
|PasswordAnswer, |
|PasswordFormat, |
|IsApproved, |
|IsLockedOut, |
|CreateDate, |
|LastLoginDate, |
|LastPasswordChangedDate, |
|LastLockoutDate, |
|FailedPasswordAttemptCount, |
|FailedPasswordAttemptWindowStart, |
|FailedPasswordAnswerAttemptCount, |
|FailedPasswordAnswerAttemptWindowStart ) |
|VALUES ( @ApplicationId, |
|@UserId, |
|@Password, |
|@PasswordSalt, |
|@Email, |
|LOWER(@Email), |
|@PasswordQuestion, |
|@PasswordAnswer, |
|@PasswordFormat, |
|@IsApproved, |
|@IsLockedOut, |
|@CreateDate, |
|@CreateDate, |
|@CreateDate, |
|@LastLockoutDate, |
|@FailedPasswordAttemptCount, |
|@FailedPasswordAttemptWindowStart, |
|@FailedPasswordAnswerAttemptCount, |
|@FailedPasswordAnswerAttemptWindowStart ) |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|COMMIT TRANSACTION |
|END |
| |
|RETURN 0 |
| |
|Cleanup: |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|ROLLBACK TRANSACTION |
|END |
| |
|RETURN @ErrorCode |
| |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_CreateUser] TO [aspnet_Membership_FullAccess] |
|GO |
Uses
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
[dbo].[aspnet_Applications_CreateApplication]
[dbo].[aspnet_Users_CreateUser]
dbo
|[pic] [dbo].[aspnet_Membership_FindUsersByEmail] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_FindUsersByEmail |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@EmailToMatch |nvarchar(256) |512 |
|@PageIndex |int |4 |
|@PageSize |int |4 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_FindUsersByEmail |
|@ApplicationName nvarchar(256), |
|@EmailToMatch nvarchar(256), |
|@PageIndex int, |
|@PageSize int |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|RETURN 0 |
| |
|-- Set the page bounds |
|DECLARE @PageLowerBound int |
|DECLARE @PageUpperBound int |
|DECLARE @TotalRecords int |
|SET @PageLowerBound = @PageSize * @PageIndex |
|SET @PageUpperBound = @PageSize - 1 + @PageLowerBound |
| |
|-- Create a temp table TO store the select results |
|CREATE TABLE #PageIndexForUsers |
|( |
|IndexId int IDENTITY (0, 1) NOT NULL, |
|UserId uniqueidentifier |
|) |
| |
|-- Insert into our temp table |
|IF( @EmailToMatch IS NULL ) |
|INSERT INTO #PageIndexForUsers (UserId) |
|SELECT u.UserId |
|FROM dbo.aspnet_Users u, dbo.aspnet_Membership m |
|WHERE u.ApplicationId = @ApplicationId AND m.UserId = u.UserId AND m.Email IS NULL |
|ORDER BY m.LoweredEmail |
|ELSE |
|INSERT INTO #PageIndexForUsers (UserId) |
|SELECT u.UserId |
|FROM dbo.aspnet_Users u, dbo.aspnet_Membership m |
|WHERE u.ApplicationId = @ApplicationId AND m.UserId = u.UserId AND m.LoweredEmail LIKE LOWER(@EmailToMatch) |
|ORDER BY m.LoweredEmail |
| |
|SELECT u.UserName, m.Email, m.PasswordQuestion, ment, m.IsApproved, |
|m.CreateDate, |
|m.LastLoginDate, |
|u.LastActivityDate, |
|m.LastPasswordChangedDate, |
|u.UserId, m.IsLockedOut, |
|m.LastLockoutDate |
|FROM dbo.aspnet_Membership m, dbo.aspnet_Users u, #PageIndexForUsers p |
|WHERE u.UserId = p.UserId AND u.UserId = m.UserId AND |
|p.IndexId >= @PageLowerBound AND p.IndexId aspnetdb > Stored Procedures > dbo.aspnet_Membership_FindUsersByName |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserNameToMatch |nvarchar(256) |512 |
|@PageIndex |int |4 |
|@PageSize |int |4 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_FindUsersByName |
|@ApplicationName nvarchar(256), |
|@UserNameToMatch nvarchar(256), |
|@PageIndex int, |
|@PageSize int |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|RETURN 0 |
| |
|-- Set the page bounds |
|DECLARE @PageLowerBound int |
|DECLARE @PageUpperBound int |
|DECLARE @TotalRecords int |
|SET @PageLowerBound = @PageSize * @PageIndex |
|SET @PageUpperBound = @PageSize - 1 + @PageLowerBound |
| |
|-- Create a temp table TO store the select results |
|CREATE TABLE #PageIndexForUsers |
|( |
|IndexId int IDENTITY (0, 1) NOT NULL, |
|UserId uniqueidentifier |
|) |
| |
|-- Insert into our temp table |
|INSERT INTO #PageIndexForUsers (UserId) |
|SELECT u.UserId |
|FROM dbo.aspnet_Users u, dbo.aspnet_Membership m |
|WHERE u.ApplicationId = @ApplicationId AND m.UserId = u.UserId AND u.LoweredUserName LIKE LOWER(@UserNameToMatch) |
|ORDER BY u.UserName |
| |
| |
|SELECT u.UserName, m.Email, m.PasswordQuestion, ment, m.IsApproved, |
|m.CreateDate, |
|m.LastLoginDate, |
|u.LastActivityDate, |
|m.LastPasswordChangedDate, |
|u.UserId, m.IsLockedOut, |
|m.LastLockoutDate |
|FROM dbo.aspnet_Membership m, dbo.aspnet_Users u, #PageIndexForUsers p |
|WHERE u.UserId = p.UserId AND u.UserId = m.UserId AND |
|p.IndexId >= @PageLowerBound AND p.IndexId aspnetdb > Stored Procedures > dbo.aspnet_Membership_GetAllUsers |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@PageIndex |int |4 |
|@PageSize |int |4 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_GetAllUsers |
|@ApplicationName nvarchar(256), |
|@PageIndex int, |
|@PageSize int |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|RETURN 0 |
| |
| |
|-- Set the page bounds |
|DECLARE @PageLowerBound int |
|DECLARE @PageUpperBound int |
|DECLARE @TotalRecords int |
|SET @PageLowerBound = @PageSize * @PageIndex |
|SET @PageUpperBound = @PageSize - 1 + @PageLowerBound |
| |
|-- Create a temp table TO store the select results |
|CREATE TABLE #PageIndexForUsers |
|( |
|IndexId int IDENTITY (0, 1) NOT NULL, |
|UserId uniqueidentifier |
|) |
| |
|-- Insert into our temp table |
|INSERT INTO #PageIndexForUsers (UserId) |
|SELECT u.UserId |
|FROM dbo.aspnet_Membership m, dbo.aspnet_Users u |
|WHERE u.ApplicationId = @ApplicationId AND u.UserId = m.UserId |
|ORDER BY u.UserName |
| |
|SELECT @TotalRecords = @@ROWCOUNT |
| |
|SELECT u.UserName, m.Email, m.PasswordQuestion, ment, m.IsApproved, |
|m.CreateDate, |
|m.LastLoginDate, |
|u.LastActivityDate, |
|m.LastPasswordChangedDate, |
|u.UserId, m.IsLockedOut, |
|m.LastLockoutDate |
|FROM dbo.aspnet_Membership m, dbo.aspnet_Users u, #PageIndexForUsers p |
|WHERE u.UserId = p.UserId AND u.UserId = m.UserId AND |
|p.IndexId >= @PageLowerBound AND p.IndexId aspnetdb > Stored Procedures > dbo.aspnet_Membership_GetNumberOfUsersOnline |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@MinutesSinceLastInActive |int |4 |
|@CurrentTimeUtc |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_BasicAccess |
|Grant |Execute |aspnet_Membership_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_GetNumberOfUsersOnline |
|@ApplicationName nvarchar(256), |
|@MinutesSinceLastInActive int, |
|@CurrentTimeUtc datetime |
|AS |
|BEGIN |
|DECLARE @DateActive datetime |
|SELECT @DateActive = DATEADD(minute, -(@MinutesSinceLastInActive), @CurrentTimeUtc) |
| |
|DECLARE @NumOnline int |
|SELECT @NumOnline = COUNT(*) |
|FROM dbo.aspnet_Users u(NOLOCK), |
|dbo.aspnet_Applications a(NOLOCK), |
|dbo.aspnet_Membership m(NOLOCK) |
|WHERE u.ApplicationId = a.ApplicationId AND |
|LastActivityDate > @DateActive AND |
|a.LoweredApplicationName = LOWER(@ApplicationName) AND |
|u.UserId = m.UserId |
|RETURN(@NumOnline) |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_GetNumberOfUsersOnline] TO [aspnet_Membership_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_GetNumberOfUsersOnline] TO [aspnet_Membership_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Membership_GetPassword] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_GetPassword |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@MaxInvalidPasswordAttempts |int |4 |
|@PasswordAttemptWindow |int |4 |
|@CurrentTimeUtc |datetime |8 |
|@PasswordAnswer |nvarchar(128) |256 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_GetPassword |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256), |
|@MaxInvalidPasswordAttempts int, |
|@PasswordAttemptWindow int, |
|@CurrentTimeUtc datetime, |
|@PasswordAnswer nvarchar(128) = NULL |
|AS |
|BEGIN |
|DECLARE @UserId uniqueidentifier |
|DECLARE @PasswordFormat int |
|DECLARE @Password nvarchar(128) |
|DECLARE @passAns nvarchar(128) |
|DECLARE @IsLockedOut bit |
|DECLARE @LastLockoutDate datetime |
|DECLARE @FailedPasswordAttemptCount int |
|DECLARE @FailedPasswordAttemptWindowStart datetime |
|DECLARE @FailedPasswordAnswerAttemptCount int |
|DECLARE @FailedPasswordAnswerAttemptWindowStart datetime |
| |
|DECLARE @ErrorCode int |
|SET @ErrorCode = 0 |
| |
|DECLARE @TranStarted bit |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
|ELSE |
|SET @TranStarted = 0 |
| |
|SELECT @UserId = u.UserId, |
|@Password = m.Password, |
|@passAns = m.PasswordAnswer, |
|@PasswordFormat = m.PasswordFormat, |
|@IsLockedOut = m.IsLockedOut, |
|@LastLockoutDate = m.LastLockoutDate, |
|@FailedPasswordAttemptCount = m.FailedPasswordAttemptCount, |
|@FailedPasswordAttemptWindowStart = m.FailedPasswordAttemptWindowStart, |
|@FailedPasswordAnswerAttemptCount = m.FailedPasswordAnswerAttemptCount, |
|@FailedPasswordAnswerAttemptWindowStart = m.FailedPasswordAnswerAttemptWindowStart |
|FROM dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m WITH ( UPDLOCK ) |
|WHERE LOWER(@ApplicationName) = a.LoweredApplicationName AND |
|u.ApplicationId = a.ApplicationId AND |
|u.UserId = m.UserId AND |
|LOWER(@UserName) = u.LoweredUserName |
| |
|IF ( @@rowcount = 0 ) |
|BEGIN |
|SET @ErrorCode = 1 |
|GOTO Cleanup |
|END |
| |
|IF( @IsLockedOut = 1 ) |
|BEGIN |
|SET @ErrorCode = 99 |
|GOTO Cleanup |
|END |
| |
|IF ( NOT( @PasswordAnswer IS NULL ) ) |
|BEGIN |
|IF( ( @passAns IS NULL ) OR ( LOWER( @passAns ) LOWER( @PasswordAnswer ) ) ) |
|BEGIN |
|IF( @CurrentTimeUtc > DATEADD( minute, @PasswordAttemptWindow, @FailedPasswordAnswerAttemptWindowStart ) ) |
|BEGIN |
|SET @FailedPasswordAnswerAttemptWindowStart = @CurrentTimeUtc |
|SET @FailedPasswordAnswerAttemptCount = 1 |
|END |
|ELSE |
|BEGIN |
|SET @FailedPasswordAnswerAttemptCount = @FailedPasswordAnswerAttemptCount + 1 |
|SET @FailedPasswordAnswerAttemptWindowStart = @CurrentTimeUtc |
|END |
| |
|BEGIN |
|IF( @FailedPasswordAnswerAttemptCount >= @MaxInvalidPasswordAttempts ) |
|BEGIN |
|SET @IsLockedOut = 1 |
|SET @LastLockoutDate = @CurrentTimeUtc |
|END |
|END |
| |
|SET @ErrorCode = 3 |
|END |
|ELSE |
|BEGIN |
|IF( @FailedPasswordAnswerAttemptCount > 0 ) |
|BEGIN |
|SET @FailedPasswordAnswerAttemptCount = 0 |
|SET @FailedPasswordAnswerAttemptWindowStart = CONVERT( datetime, '17540101', 112 ) |
|END |
|END |
| |
|UPDATE dbo.aspnet_Membership |
|SET IsLockedOut = @IsLockedOut, LastLockoutDate = @LastLockoutDate, |
|FailedPasswordAttemptCount = @FailedPasswordAttemptCount, |
|FailedPasswordAttemptWindowStart = @FailedPasswordAttemptWindowStart, |
|FailedPasswordAnswerAttemptCount = @FailedPasswordAnswerAttemptCount, |
|FailedPasswordAnswerAttemptWindowStart = @FailedPasswordAnswerAttemptWindowStart |
|WHERE @UserId = UserId |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
|END |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|COMMIT TRANSACTION |
|END |
| |
|IF( @ErrorCode = 0 ) |
|SELECT @Password, @PasswordFormat |
| |
|RETURN @ErrorCode |
| |
|Cleanup: |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|ROLLBACK TRANSACTION |
|END |
| |
|RETURN @ErrorCode |
| |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_GetPassword] TO [aspnet_Membership_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Membership_GetPasswordWithFormat] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_GetPasswordWithFormat |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@UpdateLastLoginActivityDate |bit |1 |
|@CurrentTimeUtc |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_GetPasswordWithFormat |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256), |
|@UpdateLastLoginActivityDate bit, |
|@CurrentTimeUtc datetime |
|AS |
|BEGIN |
|DECLARE @IsLockedOut bit |
|DECLARE @UserId uniqueidentifier |
|DECLARE @Password nvarchar(128) |
|DECLARE @PasswordSalt nvarchar(128) |
|DECLARE @PasswordFormat int |
|DECLARE @FailedPasswordAttemptCount int |
|DECLARE @FailedPasswordAnswerAttemptCount int |
|DECLARE @IsApproved bit |
|DECLARE @LastActivityDate datetime |
|DECLARE @LastLoginDate datetime |
| |
|SELECT @UserId = NULL |
| |
|SELECT @UserId = u.UserId, @IsLockedOut = m.IsLockedOut, @Password=Password, @PasswordFormat=PasswordFormat, |
|@PasswordSalt=PasswordSalt, @FailedPasswordAttemptCount=FailedPasswordAttemptCount, |
|@FailedPasswordAnswerAttemptCount=FailedPasswordAnswerAttemptCount, @IsApproved=IsApproved, |
|@LastActivityDate = LastActivityDate, @LastLoginDate = LastLoginDate |
|FROM dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m |
|WHERE LOWER(@ApplicationName) = a.LoweredApplicationName AND |
|u.ApplicationId = a.ApplicationId AND |
|u.UserId = m.UserId AND |
|LOWER(@UserName) = u.LoweredUserName |
| |
|IF (@UserId IS NULL) |
|RETURN 1 |
| |
|IF (@IsLockedOut = 1) |
|RETURN 99 |
| |
|SELECT @Password, @PasswordFormat, @PasswordSalt, @FailedPasswordAttemptCount, |
|@FailedPasswordAnswerAttemptCount, @IsApproved, @LastLoginDate, @LastActivityDate |
| |
|IF (@UpdateLastLoginActivityDate = 1 AND @IsApproved = 1) |
|BEGIN |
|UPDATE dbo.aspnet_Membership |
|SET LastLoginDate = @CurrentTimeUtc |
|WHERE UserId = @UserId |
| |
|UPDATE dbo.aspnet_Users |
|SET LastActivityDate = @CurrentTimeUtc |
|WHERE @UserId = UserId |
|END |
| |
| |
|RETURN 0 |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_GetPasswordWithFormat] TO [aspnet_Membership_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Membership_GetUserByEmail] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_GetUserByEmail |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@Email |nvarchar(256) |512 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_BasicAccess |
|Grant |Execute |aspnet_Membership_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_GetUserByEmail |
|@ApplicationName nvarchar(256), |
|@Email nvarchar(256) |
|AS |
|BEGIN |
|IF( @Email IS NULL ) |
|SELECT u.UserName |
|FROM dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m |
|WHERE LOWER(@ApplicationName) = a.LoweredApplicationName AND |
|u.ApplicationId = a.ApplicationId AND |
|u.UserId = m.UserId AND |
|m.LoweredEmail IS NULL |
|ELSE |
|SELECT u.UserName |
|FROM dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m |
|WHERE LOWER(@ApplicationName) = a.LoweredApplicationName AND |
|u.ApplicationId = a.ApplicationId AND |
|u.UserId = m.UserId AND |
|LOWER(@Email) = m.LoweredEmail |
| |
|IF (@@rowcount = 0) |
|RETURN(1) |
|RETURN(0) |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_GetUserByEmail] TO [aspnet_Membership_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_GetUserByEmail] TO [aspnet_Membership_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Membership_GetUserByName] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_GetUserByName |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@CurrentTimeUtc |datetime |8 |
|@UpdateLastActivity |bit |1 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_BasicAccess |
|Grant |Execute |aspnet_Membership_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_GetUserByName |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256), |
|@CurrentTimeUtc datetime, |
|@UpdateLastActivity bit = 0 |
|AS |
|BEGIN |
|DECLARE @UserId uniqueidentifier |
| |
|IF (@UpdateLastActivity = 1) |
|BEGIN |
|SELECT TOP 1 m.Email, m.PasswordQuestion, ment, m.IsApproved, |
|m.CreateDate, m.LastLoginDate, @CurrentTimeUtc, m.LastPasswordChangedDate, |
|u.UserId, m.IsLockedOut,m.LastLockoutDate |
|FROM dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m |
|WHERE LOWER(@ApplicationName) = a.LoweredApplicationName AND |
|u.ApplicationId = a.ApplicationId AND |
|LOWER(@UserName) = u.LoweredUserName AND u.UserId = m.UserId |
| |
|IF (@@ROWCOUNT = 0) -- Username not found |
|RETURN -1 |
| |
|UPDATE dbo.aspnet_Users |
|SET LastActivityDate = @CurrentTimeUtc |
|WHERE @UserId = UserId |
|END |
|ELSE |
|BEGIN |
|SELECT TOP 1 m.Email, m.PasswordQuestion, ment, m.IsApproved, |
|m.CreateDate, m.LastLoginDate, u.LastActivityDate, m.LastPasswordChangedDate, |
|u.UserId, m.IsLockedOut,m.LastLockoutDate |
|FROM dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m |
|WHERE LOWER(@ApplicationName) = a.LoweredApplicationName AND |
|u.ApplicationId = a.ApplicationId AND |
|LOWER(@UserName) = u.LoweredUserName AND u.UserId = m.UserId |
| |
|IF (@@ROWCOUNT = 0) -- Username not found |
|RETURN -1 |
|END |
| |
|RETURN 0 |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_GetUserByName] TO [aspnet_Membership_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_GetUserByName] TO [aspnet_Membership_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Membership_GetUserByUserId] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_GetUserByUserId |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@UserId |uniqueidentifier |16 |
|@CurrentTimeUtc |datetime |8 |
|@UpdateLastActivity |bit |1 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_BasicAccess |
|Grant |Execute |aspnet_Membership_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_GetUserByUserId |
|@UserId uniqueidentifier, |
|@CurrentTimeUtc datetime, |
|@UpdateLastActivity bit = 0 |
|AS |
|BEGIN |
|IF ( @UpdateLastActivity = 1 ) |
|BEGIN |
|UPDATE dbo.aspnet_Users |
|SET LastActivityDate = @CurrentTimeUtc |
|FROM dbo.aspnet_Users |
|WHERE @UserId = UserId |
| |
|IF ( @@ROWCOUNT = 0 ) -- User ID not found |
|RETURN -1 |
|END |
| |
|SELECT m.Email, m.PasswordQuestion, ment, m.IsApproved, |
|m.CreateDate, m.LastLoginDate, u.LastActivityDate, |
|m.LastPasswordChangedDate, u.UserName, m.IsLockedOut, |
|m.LastLockoutDate |
|FROM dbo.aspnet_Users u, dbo.aspnet_Membership m |
|WHERE @UserId = u.UserId AND u.UserId = m.UserId |
| |
|IF ( @@ROWCOUNT = 0 ) -- User ID not found |
|RETURN -1 |
| |
|RETURN 0 |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_GetUserByUserId] TO [aspnet_Membership_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_GetUserByUserId] TO [aspnet_Membership_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Membership_ResetPassword] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_ResetPassword |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@NewPassword |nvarchar(128) |256 |
|@MaxInvalidPasswordAttempts |int |4 |
|@PasswordAttemptWindow |int |4 |
|@PasswordSalt |nvarchar(128) |256 |
|@CurrentTimeUtc |datetime |8 |
|@PasswordFormat |int |4 |
|@PasswordAnswer |nvarchar(128) |256 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_ResetPassword |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256), |
|@NewPassword nvarchar(128), |
|@MaxInvalidPasswordAttempts int, |
|@PasswordAttemptWindow int, |
|@PasswordSalt nvarchar(128), |
|@CurrentTimeUtc datetime, |
|@PasswordFormat int = 0, |
|@PasswordAnswer nvarchar(128) = NULL |
|AS |
|BEGIN |
|DECLARE @IsLockedOut bit |
|DECLARE @LastLockoutDate datetime |
|DECLARE @FailedPasswordAttemptCount int |
|DECLARE @FailedPasswordAttemptWindowStart datetime |
|DECLARE @FailedPasswordAnswerAttemptCount int |
|DECLARE @FailedPasswordAnswerAttemptWindowStart datetime |
| |
|DECLARE @UserId uniqueidentifier |
|SET @UserId = NULL |
| |
|DECLARE @ErrorCode int |
|SET @ErrorCode = 0 |
| |
|DECLARE @TranStarted bit |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
|ELSE |
|SET @TranStarted = 0 |
| |
|SELECT @UserId = u.UserId |
|FROM dbo.aspnet_Users u, dbo.aspnet_Applications a, dbo.aspnet_Membership m |
|WHERE LoweredUserName = LOWER(@UserName) AND |
|u.ApplicationId = a.ApplicationId AND |
|LOWER(@ApplicationName) = a.LoweredApplicationName AND |
|u.UserId = m.UserId |
| |
|IF ( @UserId IS NULL ) |
|BEGIN |
|SET @ErrorCode = 1 |
|GOTO Cleanup |
|END |
| |
|SELECT @IsLockedOut = IsLockedOut, |
|@LastLockoutDate = LastLockoutDate, |
|@FailedPasswordAttemptCount = FailedPasswordAttemptCount, |
|@FailedPasswordAttemptWindowStart = FailedPasswordAttemptWindowStart, |
|@FailedPasswordAnswerAttemptCount = FailedPasswordAnswerAttemptCount, |
|@FailedPasswordAnswerAttemptWindowStart = FailedPasswordAnswerAttemptWindowStart |
|FROM dbo.aspnet_Membership WITH ( UPDLOCK ) |
|WHERE @UserId = UserId |
| |
|IF( @IsLockedOut = 1 ) |
|BEGIN |
|SET @ErrorCode = 99 |
|GOTO Cleanup |
|END |
| |
|UPDATE dbo.aspnet_Membership |
|SET Password = @NewPassword, |
|LastPasswordChangedDate = @CurrentTimeUtc, |
|PasswordFormat = @PasswordFormat, |
|PasswordSalt = @PasswordSalt |
|WHERE @UserId = UserId AND |
|( ( @PasswordAnswer IS NULL ) OR ( LOWER( PasswordAnswer ) = LOWER( @PasswordAnswer ) ) ) |
| |
|IF ( @@ROWCOUNT = 0 ) |
|BEGIN |
|IF( @CurrentTimeUtc > DATEADD( minute, @PasswordAttemptWindow, @FailedPasswordAnswerAttemptWindowStart ) ) |
|BEGIN |
|SET @FailedPasswordAnswerAttemptWindowStart = @CurrentTimeUtc |
|SET @FailedPasswordAnswerAttemptCount = 1 |
|END |
|ELSE |
|BEGIN |
|SET @FailedPasswordAnswerAttemptWindowStart = @CurrentTimeUtc |
|SET @FailedPasswordAnswerAttemptCount = @FailedPasswordAnswerAttemptCount + 1 |
|END |
| |
|BEGIN |
|IF( @FailedPasswordAnswerAttemptCount >= @MaxInvalidPasswordAttempts ) |
|BEGIN |
|SET @IsLockedOut = 1 |
|SET @LastLockoutDate = @CurrentTimeUtc |
|END |
|END |
| |
|SET @ErrorCode = 3 |
|END |
|ELSE |
|BEGIN |
|IF( @FailedPasswordAnswerAttemptCount > 0 ) |
|BEGIN |
|SET @FailedPasswordAnswerAttemptCount = 0 |
|SET @FailedPasswordAnswerAttemptWindowStart = CONVERT( datetime, '17540101', 112 ) |
|END |
|END |
| |
|IF( NOT ( @PasswordAnswer IS NULL ) ) |
|BEGIN |
|UPDATE dbo.aspnet_Membership |
|SET IsLockedOut = @IsLockedOut, LastLockoutDate = @LastLockoutDate, |
|FailedPasswordAttemptCount = @FailedPasswordAttemptCount, |
|FailedPasswordAttemptWindowStart = @FailedPasswordAttemptWindowStart, |
|FailedPasswordAnswerAttemptCount = @FailedPasswordAnswerAttemptCount, |
|FailedPasswordAnswerAttemptWindowStart = @FailedPasswordAnswerAttemptWindowStart |
|WHERE @UserId = UserId |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
|END |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|COMMIT TRANSACTION |
|END |
| |
|RETURN @ErrorCode |
| |
|Cleanup: |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|ROLLBACK TRANSACTION |
|END |
| |
|RETURN @ErrorCode |
| |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_ResetPassword] TO [aspnet_Membership_FullAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Membership_SetPassword] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_SetPassword |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@NewPassword |nvarchar(128) |256 |
|@PasswordSalt |nvarchar(128) |256 |
|@CurrentTimeUtc |datetime |8 |
|@PasswordFormat |int |4 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_SetPassword |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256), |
|@NewPassword nvarchar(128), |
|@PasswordSalt nvarchar(128), |
|@CurrentTimeUtc datetime, |
|@PasswordFormat int = 0 |
|AS |
|BEGIN |
|DECLARE @UserId uniqueidentifier |
|SELECT @UserId = NULL |
|SELECT @UserId = u.UserId |
|FROM dbo.aspnet_Users u, dbo.aspnet_Applications a, dbo.aspnet_Membership m |
|WHERE LoweredUserName = LOWER(@UserName) AND |
|u.ApplicationId = a.ApplicationId AND |
|LOWER(@ApplicationName) = a.LoweredApplicationName AND |
|u.UserId = m.UserId |
| |
|IF (@UserId IS NULL) |
|RETURN(1) |
| |
|UPDATE dbo.aspnet_Membership |
|SET Password = @NewPassword, PasswordFormat = @PasswordFormat, PasswordSalt = @PasswordSalt, |
|LastPasswordChangedDate = @CurrentTimeUtc |
|WHERE @UserId = UserId |
|RETURN(0) |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_SetPassword] TO [aspnet_Membership_FullAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Membership_UnlockUser] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_UnlockUser |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_UnlockUser |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256) |
|AS |
|BEGIN |
|DECLARE @UserId uniqueidentifier |
|SELECT @UserId = NULL |
|SELECT @UserId = u.UserId |
|FROM dbo.aspnet_Users u, dbo.aspnet_Applications a, dbo.aspnet_Membership m |
|WHERE LoweredUserName = LOWER(@UserName) AND |
|u.ApplicationId = a.ApplicationId AND |
|LOWER(@ApplicationName) = a.LoweredApplicationName AND |
|u.UserId = m.UserId |
| |
|IF ( @UserId IS NULL ) |
|RETURN 1 |
| |
|UPDATE dbo.aspnet_Membership |
|SET IsLockedOut = 0, |
|FailedPasswordAttemptCount = 0, |
|FailedPasswordAttemptWindowStart = CONVERT( datetime, '17540101', 112 ), |
|FailedPasswordAnswerAttemptCount = 0, |
|FailedPasswordAnswerAttemptWindowStart = CONVERT( datetime, '17540101', 112 ), |
|LastLockoutDate = CONVERT( datetime, '17540101', 112 ) |
|WHERE @UserId = UserId |
| |
|RETURN 0 |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_UnlockUser] TO [aspnet_Membership_FullAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Membership_UpdateUser] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_UpdateUser |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@Email |nvarchar(256) |512 |
|@Comment |ntext |16 |
|@IsApproved |bit |1 |
|@LastLoginDate |datetime |8 |
|@LastActivityDate |datetime |8 |
|@UniqueEmail |int |4 |
|@CurrentTimeUtc |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_UpdateUser |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256), |
|@Email nvarchar(256), |
|@Comment ntext, |
|@IsApproved bit, |
|@LastLoginDate datetime, |
|@LastActivityDate datetime, |
|@UniqueEmail int, |
|@CurrentTimeUtc datetime |
|AS |
|BEGIN |
|DECLARE @UserId uniqueidentifier |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @UserId = NULL |
|SELECT @UserId = u.UserId, @ApplicationId = a.ApplicationId |
|FROM dbo.aspnet_Users u, dbo.aspnet_Applications a, dbo.aspnet_Membership m |
|WHERE LoweredUserName = LOWER(@UserName) AND |
|u.ApplicationId = a.ApplicationId AND |
|LOWER(@ApplicationName) = a.LoweredApplicationName AND |
|u.UserId = m.UserId |
| |
|IF (@UserId IS NULL) |
|RETURN(1) |
| |
|IF (@UniqueEmail = 1) |
|BEGIN |
|IF (EXISTS (SELECT * |
|FROM dbo.aspnet_Membership WITH (UPDLOCK, HOLDLOCK) |
|WHERE ApplicationId = @ApplicationId AND @UserId UserId AND LoweredEmail = LOWER(@Email))) |
|BEGIN |
|RETURN(7) |
|END |
|END |
| |
|DECLARE @TranStarted bit |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
|ELSE |
|SET @TranStarted = 0 |
| |
|UPDATE dbo.aspnet_Users WITH (ROWLOCK) |
|SET |
|LastActivityDate = @LastActivityDate |
|WHERE |
|@UserId = UserId |
| |
|IF( @@ERROR 0 ) |
|GOTO Cleanup |
| |
|UPDATE dbo.aspnet_Membership WITH (ROWLOCK) |
|SET |
|Email = @Email, |
|LoweredEmail = LOWER(@Email), |
|Comment = @Comment, |
|IsApproved = @IsApproved, |
|LastLoginDate = @LastLoginDate |
|WHERE |
|@UserId = UserId |
| |
|IF( @@ERROR 0 ) |
|GOTO Cleanup |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|COMMIT TRANSACTION |
|END |
| |
|RETURN 0 |
| |
|Cleanup: |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|ROLLBACK TRANSACTION |
|END |
| |
|RETURN -1 |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_UpdateUser] TO [aspnet_Membership_FullAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Membership_UpdateUserInfo] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Membership_UpdateUserInfo |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@IsPasswordCorrect |bit |1 |
|@UpdateLastLoginActivityDate |bit |1 |
|@MaxInvalidPasswordAttempts |int |4 |
|@PasswordAttemptWindow |int |4 |
|@CurrentTimeUtc |datetime |8 |
|@LastLoginDate |datetime |8 |
|@LastActivityDate |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Membership_UpdateUserInfo |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256), |
|@IsPasswordCorrect bit, |
|@UpdateLastLoginActivityDate bit, |
|@MaxInvalidPasswordAttempts int, |
|@PasswordAttemptWindow int, |
|@CurrentTimeUtc datetime, |
|@LastLoginDate datetime, |
|@LastActivityDate datetime |
|AS |
|BEGIN |
|DECLARE @UserId uniqueidentifier |
|DECLARE @IsApproved bit |
|DECLARE @IsLockedOut bit |
|DECLARE @LastLockoutDate datetime |
|DECLARE @FailedPasswordAttemptCount int |
|DECLARE @FailedPasswordAttemptWindowStart datetime |
|DECLARE @FailedPasswordAnswerAttemptCount int |
|DECLARE @FailedPasswordAnswerAttemptWindowStart datetime |
| |
|DECLARE @ErrorCode int |
|SET @ErrorCode = 0 |
| |
|DECLARE @TranStarted bit |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
|ELSE |
|SET @TranStarted = 0 |
| |
|SELECT @UserId = u.UserId, |
|@IsApproved = m.IsApproved, |
|@IsLockedOut = m.IsLockedOut, |
|@LastLockoutDate = m.LastLockoutDate, |
|@FailedPasswordAttemptCount = m.FailedPasswordAttemptCount, |
|@FailedPasswordAttemptWindowStart = m.FailedPasswordAttemptWindowStart, |
|@FailedPasswordAnswerAttemptCount = m.FailedPasswordAnswerAttemptCount, |
|@FailedPasswordAnswerAttemptWindowStart = m.FailedPasswordAnswerAttemptWindowStart |
|FROM dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m WITH ( UPDLOCK ) |
|WHERE LOWER(@ApplicationName) = a.LoweredApplicationName AND |
|u.ApplicationId = a.ApplicationId AND |
|u.UserId = m.UserId AND |
|LOWER(@UserName) = u.LoweredUserName |
| |
|IF ( @@rowcount = 0 ) |
|BEGIN |
|SET @ErrorCode = 1 |
|GOTO Cleanup |
|END |
| |
|IF( @IsLockedOut = 1 ) |
|BEGIN |
|GOTO Cleanup |
|END |
| |
|IF( @IsPasswordCorrect = 0 ) |
|BEGIN |
|IF( @CurrentTimeUtc > DATEADD( minute, @PasswordAttemptWindow, @FailedPasswordAttemptWindowStart ) ) |
|BEGIN |
|SET @FailedPasswordAttemptWindowStart = @CurrentTimeUtc |
|SET @FailedPasswordAttemptCount = 1 |
|END |
|ELSE |
|BEGIN |
|SET @FailedPasswordAttemptWindowStart = @CurrentTimeUtc |
|SET @FailedPasswordAttemptCount = @FailedPasswordAttemptCount + 1 |
|END |
| |
|BEGIN |
|IF( @FailedPasswordAttemptCount >= @MaxInvalidPasswordAttempts ) |
|BEGIN |
|SET @IsLockedOut = 1 |
|SET @LastLockoutDate = @CurrentTimeUtc |
|END |
|END |
|END |
|ELSE |
|BEGIN |
|IF( @FailedPasswordAttemptCount > 0 OR @FailedPasswordAnswerAttemptCount > 0 ) |
|BEGIN |
|SET @FailedPasswordAttemptCount = 0 |
|SET @FailedPasswordAttemptWindowStart = CONVERT( datetime, '17540101', 112 ) |
|SET @FailedPasswordAnswerAttemptCount = 0 |
|SET @FailedPasswordAnswerAttemptWindowStart = CONVERT( datetime, '17540101', 112 ) |
|SET @LastLockoutDate = CONVERT( datetime, '17540101', 112 ) |
|END |
|END |
| |
|IF( @UpdateLastLoginActivityDate = 1 ) |
|BEGIN |
|UPDATE dbo.aspnet_Users |
|SET LastActivityDate = @LastActivityDate |
|WHERE @UserId = UserId |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|UPDATE dbo.aspnet_Membership |
|SET LastLoginDate = @LastLoginDate |
|WHERE UserId = @UserId |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
|END |
| |
| |
|UPDATE dbo.aspnet_Membership |
|SET IsLockedOut = @IsLockedOut, LastLockoutDate = @LastLockoutDate, |
|FailedPasswordAttemptCount = @FailedPasswordAttemptCount, |
|FailedPasswordAttemptWindowStart = @FailedPasswordAttemptWindowStart, |
|FailedPasswordAnswerAttemptCount = @FailedPasswordAnswerAttemptCount, |
|FailedPasswordAnswerAttemptWindowStart = @FailedPasswordAnswerAttemptWindowStart |
|WHERE @UserId = UserId |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|COMMIT TRANSACTION |
|END |
| |
|RETURN @ErrorCode |
| |
|Cleanup: |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|ROLLBACK TRANSACTION |
|END |
| |
|RETURN @ErrorCode |
| |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Membership_UpdateUserInfo] TO [aspnet_Membership_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Paths_CreatePath] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Paths_CreatePath |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |Direction |
|@ApplicationId |uniqueidentifier |16 | |
|@Path |nvarchar(256) |512 | |
|@PathId |uniqueidentifier |16 |Out |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Paths_CreatePath |
|@ApplicationId UNIQUEIDENTIFIER, |
|@Path NVARCHAR(256), |
|@PathId UNIQUEIDENTIFIER OUTPUT |
|AS |
|BEGIN |
|BEGIN TRANSACTION |
|IF (NOT EXISTS(SELECT * FROM dbo.aspnet_Paths WHERE LoweredPath = LOWER(@Path) AND ApplicationId = @ApplicationId)) |
|BEGIN |
|INSERT dbo.aspnet_Paths (ApplicationId, Path, LoweredPath) VALUES (@ApplicationId, @Path, LOWER(@Path)) |
|END |
|COMMIT TRANSACTION |
|SELECT @PathId = PathId FROM dbo.aspnet_Paths WHERE LOWER(@Path) = LoweredPath AND ApplicationId = @ApplicationId |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Paths_CreatePath] TO [aspnet_Personalization_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Paths]
dbo
Used By
[dbo].[aspnet_PersonalizationAllUsers_SetPageSettings]
[dbo].[aspnet_PersonalizationPerUser_SetPageSettings]
|[pic] [dbo].[aspnet_Personalization_GetApplicationId] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Personalization_GetApplicationId |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |Direction |
|@ApplicationName |nvarchar(256) |512 | |
|@ApplicationId |uniqueidentifier |16 |Out |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Personalization_GetApplicationId ( |
|@ApplicationName NVARCHAR(256), |
|@ApplicationId UNIQUEIDENTIFIER OUT) |
|AS |
|BEGIN |
|SELECT @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Personalization_GetApplicationId] TO [aspnet_Personalization_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
dbo
Used By
[dbo].[aspnet_PersonalizationAdministration_DeleteAllState]
[dbo].[aspnet_PersonalizationAdministration_FindState]
[dbo].[aspnet_PersonalizationAdministration_GetCountOfState]
[dbo].[aspnet_PersonalizationAdministration_ResetSharedState]
[dbo].[aspnet_PersonalizationAdministration_ResetUserState]
[dbo].[aspnet_PersonalizationAllUsers_GetPageSettings]
[dbo].[aspnet_PersonalizationAllUsers_ResetPageSettings]
[dbo].[aspnet_PersonalizationPerUser_GetPageSettings]
[dbo].[aspnet_PersonalizationPerUser_ResetPageSettings]
|[pic] [dbo].[aspnet_PersonalizationAdministration_DeleteAllState] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_PersonalizationAdministration_DeleteAllState |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |Direction |
|@AllUsersScope |bit |1 | |
|@ApplicationName |nvarchar(256) |512 | |
|@Count |int |4 |Out |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_PersonalizationAdministration_DeleteAllState ( |
|@AllUsersScope bit, |
|@ApplicationName NVARCHAR(256), |
|@Count int OUT) |
|AS |
|BEGIN |
|DECLARE @ApplicationId UNIQUEIDENTIFIER |
|EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT |
|IF (@ApplicationId IS NULL) |
|SELECT @Count = 0 |
|ELSE |
|BEGIN |
|IF (@AllUsersScope = 1) |
|DELETE FROM aspnet_PersonalizationAllUsers |
|WHERE PathId IN |
|(SELECT Paths.PathId |
|FROM dbo.aspnet_Paths Paths |
|WHERE Paths.ApplicationId = @ApplicationId) |
|ELSE |
|DELETE FROM aspnet_PersonalizationPerUser |
|WHERE PathId IN |
|(SELECT Paths.PathId |
|FROM dbo.aspnet_Paths Paths |
|WHERE Paths.ApplicationId = @ApplicationId) |
| |
|SELECT @Count = @@ROWCOUNT |
|END |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_PersonalizationAdministration_DeleteAllState] TO [aspnet_Personalization_FullAccess] |
|GO |
Uses
[dbo].[aspnet_Paths]
[dbo].[aspnet_PersonalizationAllUsers]
[dbo].[aspnet_PersonalizationPerUser]
[dbo].[aspnet_Personalization_GetApplicationId]
dbo
|[pic] [dbo].[aspnet_PersonalizationAdministration_FindState] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_PersonalizationAdministration_FindState |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@AllUsersScope |bit |1 |
|@ApplicationName |nvarchar(256) |512 |
|@PageIndex |int |4 |
|@PageSize |int |4 |
|@Path |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@InactiveSinceDate |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_PersonalizationAdministration_FindState ( |
|@AllUsersScope bit, |
|@ApplicationName NVARCHAR(256), |
|@PageIndex INT, |
|@PageSize INT, |
|@Path NVARCHAR(256) = NULL, |
|@UserName NVARCHAR(256) = NULL, |
|@InactiveSinceDate DATETIME = NULL) |
|AS |
|BEGIN |
|DECLARE @ApplicationId UNIQUEIDENTIFIER |
|EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT |
|IF (@ApplicationId IS NULL) |
|RETURN |
| |
|-- Set the page bounds |
|DECLARE @PageLowerBound INT |
|DECLARE @PageUpperBound INT |
|DECLARE @TotalRecords INT |
|SET @PageLowerBound = @PageSize * @PageIndex |
|SET @PageUpperBound = @PageSize - 1 + @PageLowerBound |
| |
|-- Create a temp table to store the selected results |
|CREATE TABLE #PageIndex ( |
|IndexId int IDENTITY (0, 1) NOT NULL, |
|ItemId UNIQUEIDENTIFIER |
|) |
| |
|IF (@AllUsersScope = 1) |
|BEGIN |
|-- Insert into our temp table |
|INSERT INTO #PageIndex (ItemId) |
|SELECT Paths.PathId |
|FROM dbo.aspnet_Paths Paths, |
|((SELECT Paths.PathId |
|FROM dbo.aspnet_PersonalizationAllUsers AllUsers, dbo.aspnet_Paths Paths |
|WHERE Paths.ApplicationId = @ApplicationId |
|AND AllUsers.PathId = Paths.PathId |
|AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path)) |
|) AS SharedDataPerPath |
|FULL OUTER JOIN |
|(SELECT DISTINCT Paths.PathId |
|FROM dbo.aspnet_PersonalizationPerUser PerUser, dbo.aspnet_Paths Paths |
|WHERE Paths.ApplicationId = @ApplicationId |
|AND PerUser.PathId = Paths.PathId |
|AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path)) |
|) AS UserDataPerPath |
|ON SharedDataPerPath.PathId = UserDataPerPath.PathId |
|) |
|WHERE Paths.PathId = SharedDataPerPath.PathId OR Paths.PathId = UserDataPerPath.PathId |
|ORDER BY Paths.Path ASC |
| |
|SELECT @TotalRecords = @@ROWCOUNT |
| |
|SELECT Paths.Path, |
|SharedDataPerPath.LastUpdatedDate, |
|SharedDataPerPath.SharedDataLength, |
|UserDataPerPath.UserDataLength, |
|UserDataPerPath.UserCount |
|FROM dbo.aspnet_Paths Paths, |
|((SELECT PageIndex.ItemId AS PathId, |
|AllUsers.LastUpdatedDate AS LastUpdatedDate, |
|DATALENGTH(AllUsers.PageSettings) AS SharedDataLength |
|FROM dbo.aspnet_PersonalizationAllUsers AllUsers, #PageIndex PageIndex |
|WHERE AllUsers.PathId = PageIndex.ItemId |
|AND PageIndex.IndexId >= @PageLowerBound AND PageIndex.IndexId = @PageLowerBound AND PageIndex.IndexId Stored Procedures > dbo.aspnet_PersonalizationAdministration_GetCountOfState |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |Direction |
|@Count |int |4 |Out |
|@AllUsersScope |bit |1 | |
|@ApplicationName |nvarchar(256) |512 | |
|@Path |nvarchar(256) |512 | |
|@UserName |nvarchar(256) |512 | |
|@InactiveSinceDate |datetime |8 | |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_PersonalizationAdministration_GetCountOfState ( |
|@Count int OUT, |
|@AllUsersScope bit, |
|@ApplicationName NVARCHAR(256), |
|@Path NVARCHAR(256) = NULL, |
|@UserName NVARCHAR(256) = NULL, |
|@InactiveSinceDate DATETIME = NULL) |
|AS |
|BEGIN |
| |
|DECLARE @ApplicationId UNIQUEIDENTIFIER |
|EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT |
|IF (@ApplicationId IS NULL) |
|SELECT @Count = 0 |
|ELSE |
|IF (@AllUsersScope = 1) |
|SELECT @Count = COUNT(*) |
|FROM dbo.aspnet_PersonalizationAllUsers AllUsers, dbo.aspnet_Paths Paths |
|WHERE Paths.ApplicationId = @ApplicationId |
|AND AllUsers.PathId = Paths.PathId |
|AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path)) |
|ELSE |
|SELECT @Count = COUNT(*) |
|FROM dbo.aspnet_PersonalizationPerUser PerUser, dbo.aspnet_Users Users, dbo.aspnet_Paths Paths |
|WHERE Paths.ApplicationId = @ApplicationId |
|AND PerUser.UserId = Users.UserId |
|AND PerUser.PathId = Paths.PathId |
|AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path)) |
|AND (@UserName IS NULL OR Users.LoweredUserName LIKE LOWER(@UserName)) |
|AND (@InactiveSinceDate IS NULL OR Users.LastActivityDate aspnetdb > Stored Procedures > dbo.aspnet_PersonalizationAdministration_ResetSharedState |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |Direction |
|@Count |int |4 |Out |
|@ApplicationName |nvarchar(256) |512 | |
|@Path |nvarchar(256) |512 | |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_PersonalizationAdministration_ResetSharedState ( |
|@Count int OUT, |
|@ApplicationName NVARCHAR(256), |
|@Path NVARCHAR(256)) |
|AS |
|BEGIN |
|DECLARE @ApplicationId UNIQUEIDENTIFIER |
|EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT |
|IF (@ApplicationId IS NULL) |
|SELECT @Count = 0 |
|ELSE |
|BEGIN |
|DELETE FROM dbo.aspnet_PersonalizationAllUsers |
|WHERE PathId IN |
|(SELECT AllUsers.PathId |
|FROM dbo.aspnet_PersonalizationAllUsers AllUsers, dbo.aspnet_Paths Paths |
|WHERE Paths.ApplicationId = @ApplicationId |
|AND AllUsers.PathId = Paths.PathId |
|AND Paths.LoweredPath = LOWER(@Path)) |
| |
|SELECT @Count = @@ROWCOUNT |
|END |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_PersonalizationAdministration_ResetSharedState] TO [aspnet_Personalization_FullAccess] |
|GO |
Uses
[dbo].[aspnet_Paths]
[dbo].[aspnet_PersonalizationAllUsers]
[dbo].[aspnet_Personalization_GetApplicationId]
dbo
|[pic] [dbo].[aspnet_PersonalizationAdministration_ResetUserState] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_PersonalizationAdministration_ResetUserState |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |Direction |
|@Count |int |4 |Out |
|@ApplicationName |nvarchar(256) |512 | |
|@InactiveSinceDate |datetime |8 | |
|@UserName |nvarchar(256) |512 | |
|@Path |nvarchar(256) |512 | |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_PersonalizationAdministration_ResetUserState ( |
|@Count int OUT, |
|@ApplicationName NVARCHAR(256), |
|@InactiveSinceDate DATETIME = NULL, |
|@UserName NVARCHAR(256) = NULL, |
|@Path NVARCHAR(256) = NULL) |
|AS |
|BEGIN |
|DECLARE @ApplicationId UNIQUEIDENTIFIER |
|EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT |
|IF (@ApplicationId IS NULL) |
|SELECT @Count = 0 |
|ELSE |
|BEGIN |
|DELETE FROM dbo.aspnet_PersonalizationPerUser |
|WHERE Id IN (SELECT PerUser.Id |
|FROM dbo.aspnet_PersonalizationPerUser PerUser, dbo.aspnet_Users Users, dbo.aspnet_Paths Paths |
|WHERE Paths.ApplicationId = @ApplicationId |
|AND PerUser.UserId = Users.UserId |
|AND PerUser.PathId = Paths.PathId |
|AND (@InactiveSinceDate IS NULL OR Users.LastActivityDate aspnetdb > Stored Procedures > dbo.aspnet_PersonalizationAllUsers_GetPageSettings |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@Path |nvarchar(256) |512 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_PersonalizationAllUsers_GetPageSettings ( |
|@ApplicationName NVARCHAR(256), |
|@Path NVARCHAR(256)) |
|AS |
|BEGIN |
|DECLARE @ApplicationId UNIQUEIDENTIFIER |
|DECLARE @PathId UNIQUEIDENTIFIER |
| |
|SELECT @ApplicationId = NULL |
|SELECT @PathId = NULL |
| |
|EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT |
|IF (@ApplicationId IS NULL) |
|BEGIN |
|RETURN |
|END |
| |
|SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path) |
|IF (@PathId IS NULL) |
|BEGIN |
|RETURN |
|END |
| |
|SELECT p.PageSettings FROM dbo.aspnet_PersonalizationAllUsers p WHERE p.PathId = @PathId |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_PersonalizationAllUsers_GetPageSettings] TO [aspnet_Personalization_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Paths]
[dbo].[aspnet_PersonalizationAllUsers]
[dbo].[aspnet_Personalization_GetApplicationId]
dbo
|[pic] [dbo].[aspnet_PersonalizationAllUsers_ResetPageSettings] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_PersonalizationAllUsers_ResetPageSettings |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@Path |nvarchar(256) |512 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_PersonalizationAllUsers_ResetPageSettings ( |
|@ApplicationName NVARCHAR(256), |
|@Path NVARCHAR(256)) |
|AS |
|BEGIN |
|DECLARE @ApplicationId UNIQUEIDENTIFIER |
|DECLARE @PathId UNIQUEIDENTIFIER |
| |
|SELECT @ApplicationId = NULL |
|SELECT @PathId = NULL |
| |
|EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT |
|IF (@ApplicationId IS NULL) |
|BEGIN |
|RETURN |
|END |
| |
|SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path) |
|IF (@PathId IS NULL) |
|BEGIN |
|RETURN |
|END |
| |
|DELETE FROM dbo.aspnet_PersonalizationAllUsers WHERE PathId = @PathId |
|RETURN 0 |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_PersonalizationAllUsers_ResetPageSettings] TO [aspnet_Personalization_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Paths]
[dbo].[aspnet_PersonalizationAllUsers]
[dbo].[aspnet_Personalization_GetApplicationId]
dbo
|[pic] [dbo].[aspnet_PersonalizationAllUsers_SetPageSettings] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_PersonalizationAllUsers_SetPageSettings |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@Path |nvarchar(256) |512 |
|@PageSettings |image |16 |
|@CurrentTimeUtc |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_PersonalizationAllUsers_SetPageSettings ( |
|@ApplicationName NVARCHAR(256), |
|@Path NVARCHAR(256), |
|@PageSettings IMAGE, |
|@CurrentTimeUtc DATETIME) |
|AS |
|BEGIN |
|DECLARE @ApplicationId UNIQUEIDENTIFIER |
|DECLARE @PathId UNIQUEIDENTIFIER |
| |
|SELECT @ApplicationId = NULL |
|SELECT @PathId = NULL |
| |
|EXEC dbo.aspnet_Applications_CreateApplication @ApplicationName, @ApplicationId OUTPUT |
| |
|SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path) |
|IF (@PathId IS NULL) |
|BEGIN |
|EXEC dbo.aspnet_Paths_CreatePath @ApplicationId, @Path, @PathId OUTPUT |
|END |
| |
|IF (EXISTS(SELECT PathId FROM dbo.aspnet_PersonalizationAllUsers WHERE PathId = @PathId)) |
|UPDATE dbo.aspnet_PersonalizationAllUsers SET PageSettings = @PageSettings, LastUpdatedDate = @CurrentTimeUtc WHERE PathId = |
|@PathId |
|ELSE |
|INSERT INTO dbo.aspnet_PersonalizationAllUsers(PathId, PageSettings, LastUpdatedDate) VALUES (@PathId, @PageSettings, |
|@CurrentTimeUtc) |
|RETURN 0 |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_PersonalizationAllUsers_SetPageSettings] TO [aspnet_Personalization_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Paths]
[dbo].[aspnet_PersonalizationAllUsers]
[dbo].[aspnet_Applications_CreateApplication]
[dbo].[aspnet_Paths_CreatePath]
dbo
|[pic] [dbo].[aspnet_PersonalizationPerUser_GetPageSettings] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_PersonalizationPerUser_GetPageSettings |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@Path |nvarchar(256) |512 |
|@CurrentTimeUtc |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_PersonalizationPerUser_GetPageSettings ( |
|@ApplicationName NVARCHAR(256), |
|@UserName NVARCHAR(256), |
|@Path NVARCHAR(256), |
|@CurrentTimeUtc DATETIME) |
|AS |
|BEGIN |
|DECLARE @ApplicationId UNIQUEIDENTIFIER |
|DECLARE @PathId UNIQUEIDENTIFIER |
|DECLARE @UserId UNIQUEIDENTIFIER |
| |
|SELECT @ApplicationId = NULL |
|SELECT @PathId = NULL |
|SELECT @UserId = NULL |
| |
|EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT |
|IF (@ApplicationId IS NULL) |
|BEGIN |
|RETURN |
|END |
| |
|SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path) |
|IF (@PathId IS NULL) |
|BEGIN |
|RETURN |
|END |
| |
|SELECT @UserId = u.UserId FROM dbo.aspnet_Users u WHERE u.ApplicationId = @ApplicationId AND u.LoweredUserName = |
|LOWER(@UserName) |
|IF (@UserId IS NULL) |
|BEGIN |
|RETURN |
|END |
| |
|UPDATE dbo.aspnet_Users WITH (ROWLOCK) |
|SET LastActivityDate = @CurrentTimeUtc |
|WHERE UserId = @UserId |
|IF (@@ROWCOUNT = 0) -- Username not found |
|RETURN |
| |
|SELECT p.PageSettings FROM dbo.aspnet_PersonalizationPerUser p WHERE p.PathId = @PathId AND p.UserId = @UserId |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_PersonalizationPerUser_GetPageSettings] TO [aspnet_Personalization_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Paths]
[dbo].[aspnet_PersonalizationPerUser]
[dbo].[aspnet_Users]
[dbo].[aspnet_Personalization_GetApplicationId]
dbo
|[pic] [dbo].[aspnet_PersonalizationPerUser_ResetPageSettings] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_PersonalizationPerUser_ResetPageSettings |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@Path |nvarchar(256) |512 |
|@CurrentTimeUtc |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_PersonalizationPerUser_ResetPageSettings ( |
|@ApplicationName NVARCHAR(256), |
|@UserName NVARCHAR(256), |
|@Path NVARCHAR(256), |
|@CurrentTimeUtc DATETIME) |
|AS |
|BEGIN |
|DECLARE @ApplicationId UNIQUEIDENTIFIER |
|DECLARE @PathId UNIQUEIDENTIFIER |
|DECLARE @UserId UNIQUEIDENTIFIER |
| |
|SELECT @ApplicationId = NULL |
|SELECT @PathId = NULL |
|SELECT @UserId = NULL |
| |
|EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT |
|IF (@ApplicationId IS NULL) |
|BEGIN |
|RETURN |
|END |
| |
|SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path) |
|IF (@PathId IS NULL) |
|BEGIN |
|RETURN |
|END |
| |
|SELECT @UserId = u.UserId FROM dbo.aspnet_Users u WHERE u.ApplicationId = @ApplicationId AND u.LoweredUserName = |
|LOWER(@UserName) |
|IF (@UserId IS NULL) |
|BEGIN |
|RETURN |
|END |
| |
|UPDATE dbo.aspnet_Users WITH (ROWLOCK) |
|SET LastActivityDate = @CurrentTimeUtc |
|WHERE UserId = @UserId |
|IF (@@ROWCOUNT = 0) -- Username not found |
|RETURN |
| |
|DELETE FROM dbo.aspnet_PersonalizationPerUser WHERE PathId = @PathId AND UserId = @UserId |
|RETURN 0 |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_PersonalizationPerUser_ResetPageSettings] TO [aspnet_Personalization_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Paths]
[dbo].[aspnet_PersonalizationPerUser]
[dbo].[aspnet_Users]
[dbo].[aspnet_Personalization_GetApplicationId]
dbo
|[pic] [dbo].[aspnet_PersonalizationPerUser_SetPageSettings] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_PersonalizationPerUser_SetPageSettings |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@Path |nvarchar(256) |512 |
|@PageSettings |image |16 |
|@CurrentTimeUtc |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Personalization_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_PersonalizationPerUser_SetPageSettings ( |
|@ApplicationName NVARCHAR(256), |
|@UserName NVARCHAR(256), |
|@Path NVARCHAR(256), |
|@PageSettings IMAGE, |
|@CurrentTimeUtc DATETIME) |
|AS |
|BEGIN |
|DECLARE @ApplicationId UNIQUEIDENTIFIER |
|DECLARE @PathId UNIQUEIDENTIFIER |
|DECLARE @UserId UNIQUEIDENTIFIER |
| |
|SELECT @ApplicationId = NULL |
|SELECT @PathId = NULL |
|SELECT @UserId = NULL |
| |
|EXEC dbo.aspnet_Applications_CreateApplication @ApplicationName, @ApplicationId OUTPUT |
| |
|SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path) |
|IF (@PathId IS NULL) |
|BEGIN |
|EXEC dbo.aspnet_Paths_CreatePath @ApplicationId, @Path, @PathId OUTPUT |
|END |
| |
|SELECT @UserId = u.UserId FROM dbo.aspnet_Users u WHERE u.ApplicationId = @ApplicationId AND u.LoweredUserName = |
|LOWER(@UserName) |
|IF (@UserId IS NULL) |
|BEGIN |
|EXEC dbo.aspnet_Users_CreateUser @ApplicationId, @UserName, 0, @CurrentTimeUtc, @UserId OUTPUT |
|END |
| |
|UPDATE dbo.aspnet_Users WITH (ROWLOCK) |
|SET LastActivityDate = @CurrentTimeUtc |
|WHERE UserId = @UserId |
|IF (@@ROWCOUNT = 0) -- Username not found |
|RETURN |
| |
|IF (EXISTS(SELECT PathId FROM dbo.aspnet_PersonalizationPerUser WHERE UserId = @UserId AND PathId = @PathId)) |
|UPDATE dbo.aspnet_PersonalizationPerUser SET PageSettings = @PageSettings, LastUpdatedDate = @CurrentTimeUtc WHERE UserId = |
|@UserId AND PathId = @PathId |
|ELSE |
|INSERT INTO dbo.aspnet_PersonalizationPerUser(UserId, PathId, PageSettings, LastUpdatedDate) VALUES (@UserId, @PathId, |
|@PageSettings, @CurrentTimeUtc) |
|RETURN 0 |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_PersonalizationPerUser_SetPageSettings] TO [aspnet_Personalization_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Paths]
[dbo].[aspnet_PersonalizationPerUser]
[dbo].[aspnet_Users]
[dbo].[aspnet_Applications_CreateApplication]
[dbo].[aspnet_Paths_CreatePath]
[dbo].[aspnet_Users_CreateUser]
dbo
|[pic] [dbo].[aspnet_Profile_DeleteInactiveProfiles] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Profile_DeleteInactiveProfiles |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@ProfileAuthOptions |int |4 |
|@InactiveSinceDate |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Profile_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_Profile_DeleteInactiveProfiles |
|@ApplicationName nvarchar(256), |
|@ProfileAuthOptions int, |
|@InactiveSinceDate datetime |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|BEGIN |
|SELECT 0 |
|RETURN |
|END |
| |
|DELETE |
|FROM dbo.aspnet_Profile |
|WHERE UserId IN |
|( SELECT UserId |
|FROM dbo.aspnet_Users u |
|WHERE ApplicationId = @ApplicationId |
|AND (LastActivityDate aspnetdb > Stored Procedures > dbo.aspnet_Profile_DeleteProfiles |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserNames |nvarchar(4000) |8000 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Profile_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_Profile_DeleteProfiles |
|@ApplicationName nvarchar(256), |
|@UserNames nvarchar(4000) |
|AS |
|BEGIN |
|DECLARE @UserName nvarchar(256) |
|DECLARE @CurrentPos int |
|DECLARE @NextPos int |
|DECLARE @NumDeleted int |
|DECLARE @DeletedUser int |
|DECLARE @TranStarted bit |
|DECLARE @ErrorCode int |
| |
|SET @ErrorCode = 0 |
|SET @CurrentPos = 1 |
|SET @NumDeleted = 0 |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
|ELSE |
|SET @TranStarted = 0 |
| |
|WHILE (@CurrentPos 0) |
|BEGIN |
|SELECT @DeletedUser = 0 |
|EXEC dbo.aspnet_Users_DeleteUser @ApplicationName, @UserName, 4, @DeletedUser OUTPUT |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
|IF (@DeletedUser 0) |
|SELECT @NumDeleted = @NumDeleted + 1 |
|END |
|END |
|SELECT @NumDeleted |
|IF (@TranStarted = 1) |
|BEGIN |
|SET @TranStarted = 0 |
|COMMIT TRANSACTION |
|END |
|SET @TranStarted = 0 |
| |
|RETURN 0 |
| |
|Cleanup: |
|IF (@TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|ROLLBACK TRANSACTION |
|END |
|RETURN @ErrorCode |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Profile_DeleteProfiles] TO [aspnet_Profile_FullAccess] |
|GO |
Uses
[dbo].[aspnet_Users_DeleteUser]
dbo
|[pic] [dbo].[aspnet_Profile_GetNumberOfInactiveProfiles] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Profile_GetNumberOfInactiveProfiles |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@ProfileAuthOptions |int |4 |
|@InactiveSinceDate |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Profile_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_Profile_GetNumberOfInactiveProfiles |
|@ApplicationName nvarchar(256), |
|@ProfileAuthOptions int, |
|@InactiveSinceDate datetime |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|BEGIN |
|SELECT 0 |
|RETURN |
|END |
| |
|SELECT COUNT(*) |
|FROM dbo.aspnet_Users u, dbo.aspnet_Profile p |
|WHERE ApplicationId = @ApplicationId |
|AND u.UserId = p.UserId |
|AND (LastActivityDate aspnetdb > Stored Procedures > dbo.aspnet_Profile_GetProfiles |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@ProfileAuthOptions |int |4 |
|@PageIndex |int |4 |
|@PageSize |int |4 |
|@UserNameToMatch |nvarchar(256) |512 |
|@InactiveSinceDate |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Profile_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_Profile_GetProfiles |
|@ApplicationName nvarchar(256), |
|@ProfileAuthOptions int, |
|@PageIndex int, |
|@PageSize int, |
|@UserNameToMatch nvarchar(256) = NULL, |
|@InactiveSinceDate datetime = NULL |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|RETURN |
| |
|-- Set the page bounds |
|DECLARE @PageLowerBound int |
|DECLARE @PageUpperBound int |
|DECLARE @TotalRecords int |
|SET @PageLowerBound = @PageSize * @PageIndex |
|SET @PageUpperBound = @PageSize - 1 + @PageLowerBound |
| |
|-- Create a temp table TO store the select results |
|CREATE TABLE #PageIndexForUsers |
|( |
|IndexId int IDENTITY (0, 1) NOT NULL, |
|UserId uniqueidentifier |
|) |
| |
|-- Insert into our temp table |
|INSERT INTO #PageIndexForUsers (UserId) |
|SELECT u.UserId |
|FROM dbo.aspnet_Users u, dbo.aspnet_Profile p |
|WHERE ApplicationId = @ApplicationId |
|AND u.UserId = p.UserId |
|AND (@InactiveSinceDate IS NULL OR LastActivityDate = @PageLowerBound AND i.IndexId aspnetdb > Stored Procedures > dbo.aspnet_Profile_GetProperties |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@CurrentTimeUtc |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Profile_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_Profile_GetProperties |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256), |
|@CurrentTimeUtc datetime |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|RETURN |
| |
|DECLARE @UserId uniqueidentifier |
|SELECT @UserId = NULL |
| |
|SELECT @UserId = UserId |
|FROM dbo.aspnet_Users |
|WHERE ApplicationId = @ApplicationId AND LoweredUserName = LOWER(@UserName) |
| |
|IF (@UserId IS NULL) |
|RETURN |
|SELECT TOP 1 PropertyNames, PropertyValuesString, PropertyValuesBinary |
|FROM dbo.aspnet_Profile |
|WHERE UserId = @UserId |
| |
|IF (@@ROWCOUNT > 0) |
|BEGIN |
|UPDATE dbo.aspnet_Users |
|SET LastActivityDate=@CurrentTimeUtc |
|WHERE UserId = @UserId |
|END |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Profile_GetProperties] TO [aspnet_Profile_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Profile]
[dbo].[aspnet_Users]
dbo
|[pic] [dbo].[aspnet_Profile_SetProperties] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Profile_SetProperties |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@PropertyNames |ntext |16 |
|@PropertyValuesString |ntext |16 |
|@PropertyValuesBinary |image |16 |
|@UserName |nvarchar(256) |512 |
|@IsUserAnonymous |bit |1 |
|@CurrentTimeUtc |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Profile_BasicAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_Profile_SetProperties |
|@ApplicationName nvarchar(256), |
|@PropertyNames ntext, |
|@PropertyValuesString ntext, |
|@PropertyValuesBinary image, |
|@UserName nvarchar(256), |
|@IsUserAnonymous bit, |
|@CurrentTimeUtc datetime |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
| |
|DECLARE @ErrorCode int |
|SET @ErrorCode = 0 |
| |
|DECLARE @TranStarted bit |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
|ELSE |
|SET @TranStarted = 0 |
| |
|EXEC dbo.aspnet_Applications_CreateApplication @ApplicationName, @ApplicationId OUTPUT |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|DECLARE @UserId uniqueidentifier |
|DECLARE @LastActivityDate datetime |
|SELECT @UserId = NULL |
|SELECT @LastActivityDate = @CurrentTimeUtc |
| |
|SELECT @UserId = UserId |
|FROM dbo.aspnet_Users |
|WHERE ApplicationId = @ApplicationId AND LoweredUserName = LOWER(@UserName) |
|IF (@UserId IS NULL) |
|EXEC dbo.aspnet_Users_CreateUser @ApplicationId, @UserName, @IsUserAnonymous, @LastActivityDate, @UserId OUTPUT |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|UPDATE dbo.aspnet_Users |
|SET LastActivityDate=@CurrentTimeUtc |
|WHERE UserId = @UserId |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|IF (EXISTS( SELECT * |
|FROM dbo.aspnet_Profile |
|WHERE UserId = @UserId)) |
|UPDATE dbo.aspnet_Profile |
|SET PropertyNames=@PropertyNames, PropertyValuesString = @PropertyValuesString, |
|PropertyValuesBinary = @PropertyValuesBinary, LastUpdatedDate=@CurrentTimeUtc |
|WHERE UserId = @UserId |
|ELSE |
|INSERT INTO dbo.aspnet_Profile(UserId, PropertyNames, PropertyValuesString, PropertyValuesBinary, LastUpdatedDate) |
|VALUES (@UserId, @PropertyNames, @PropertyValuesString, @PropertyValuesBinary, @CurrentTimeUtc) |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|COMMIT TRANSACTION |
|END |
| |
|RETURN 0 |
| |
|Cleanup: |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|ROLLBACK TRANSACTION |
|END |
| |
|RETURN @ErrorCode |
| |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Profile_SetProperties] TO [aspnet_Profile_BasicAccess] |
|GO |
Uses
[dbo].[aspnet_Profile]
[dbo].[aspnet_Users]
[dbo].[aspnet_Applications_CreateApplication]
[dbo].[aspnet_Users_CreateUser]
dbo
|[pic] [dbo].[aspnet_RegisterSchemaVersion] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_RegisterSchemaVersion |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@Feature |nvarchar(128) |256 |
|@CompatibleSchemaVersion |nvarchar(128) |256 |
|@IsCurrentVersion |bit |1 |
|@RemoveIncompatibleSchema |bit |1 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_BasicAccess |
|Grant |Execute |aspnet_Membership_ReportingAccess |
|Grant |Execute |aspnet_Profile_BasicAccess |
|Grant |Execute |aspnet_Profile_ReportingAccess |
|Grant |Execute |aspnet_Roles_BasicAccess |
|Grant |Execute |aspnet_Roles_ReportingAccess |
|Grant |Execute |aspnet_Personalization_BasicAccess |
|Grant |Execute |aspnet_Personalization_ReportingAccess |
|Grant |Execute |aspnet_WebEvent_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE [dbo].aspnet_RegisterSchemaVersion |
|@Feature nvarchar(128), |
|@CompatibleSchemaVersion nvarchar(128), |
|@IsCurrentVersion bit, |
|@RemoveIncompatibleSchema bit |
|AS |
|BEGIN |
|IF( @RemoveIncompatibleSchema = 1 ) |
|BEGIN |
|DELETE FROM dbo.aspnet_SchemaVersions WHERE Feature = LOWER( @Feature ) |
|END |
|ELSE |
|BEGIN |
|IF( @IsCurrentVersion = 1 ) |
|BEGIN |
|UPDATE dbo.aspnet_SchemaVersions |
|SET IsCurrentVersion = 0 |
|WHERE Feature = LOWER( @Feature ) |
|END |
|END |
| |
|INSERT dbo.aspnet_SchemaVersions( Feature, CompatibleSchemaVersion, IsCurrentVersion ) |
|VALUES( LOWER( @Feature ), @CompatibleSchemaVersion, @IsCurrentVersion ) |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_RegisterSchemaVersion] TO [aspnet_Membership_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_RegisterSchemaVersion] TO [aspnet_Membership_ReportingAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_RegisterSchemaVersion] TO [aspnet_Personalization_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_RegisterSchemaVersion] TO [aspnet_Personalization_ReportingAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_RegisterSchemaVersion] TO [aspnet_Profile_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_RegisterSchemaVersion] TO [aspnet_Profile_ReportingAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_RegisterSchemaVersion] TO [aspnet_Roles_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_RegisterSchemaVersion] TO [aspnet_Roles_ReportingAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_RegisterSchemaVersion] TO [aspnet_WebEvent_FullAccess] |
|GO |
Uses
[dbo].[aspnet_SchemaVersions]
dbo
|[pic] [dbo].[aspnet_Roles_CreateRole] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Roles_CreateRole |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@RoleName |nvarchar(256) |512 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Roles_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_Roles_CreateRole |
|@ApplicationName nvarchar(256), |
|@RoleName nvarchar(256) |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
| |
|DECLARE @ErrorCode int |
|SET @ErrorCode = 0 |
| |
|DECLARE @TranStarted bit |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
|ELSE |
|SET @TranStarted = 0 |
| |
|EXEC dbo.aspnet_Applications_CreateApplication @ApplicationName, @ApplicationId OUTPUT |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|IF (EXISTS(SELECT RoleId FROM dbo.aspnet_Roles WHERE LoweredRoleName = LOWER(@RoleName) AND ApplicationId = @ApplicationId)) |
|BEGIN |
|SET @ErrorCode = 1 |
|GOTO Cleanup |
|END |
| |
|INSERT INTO dbo.aspnet_Roles |
|(ApplicationId, RoleName, LoweredRoleName) |
|VALUES (@ApplicationId, @RoleName, LOWER(@RoleName)) |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|COMMIT TRANSACTION |
|END |
| |
|RETURN(0) |
| |
|Cleanup: |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|ROLLBACK TRANSACTION |
|END |
| |
|RETURN @ErrorCode |
| |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Roles_CreateRole] TO [aspnet_Roles_FullAccess] |
|GO |
Uses
[dbo].[aspnet_Roles]
[dbo].[aspnet_Applications_CreateApplication]
dbo
|[pic] [dbo].[aspnet_Roles_DeleteRole] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Roles_DeleteRole |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@RoleName |nvarchar(256) |512 |
|@DeleteOnlyIfRoleIsEmpty |bit |1 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Roles_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_Roles_DeleteRole |
|@ApplicationName nvarchar(256), |
|@RoleName nvarchar(256), |
|@DeleteOnlyIfRoleIsEmpty bit |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|RETURN(1) |
| |
|DECLARE @ErrorCode int |
|SET @ErrorCode = 0 |
| |
|DECLARE @TranStarted bit |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
|ELSE |
|SET @TranStarted = 0 |
| |
|DECLARE @RoleId uniqueidentifier |
|SELECT @RoleId = NULL |
|SELECT @RoleId = RoleId FROM dbo.aspnet_Roles WHERE LoweredRoleName = LOWER(@RoleName) AND ApplicationId = @ApplicationId |
| |
|IF (@RoleId IS NULL) |
|BEGIN |
|SELECT @ErrorCode = 1 |
|GOTO Cleanup |
|END |
|IF (@DeleteOnlyIfRoleIsEmpty 0) |
|BEGIN |
|IF (EXISTS (SELECT RoleId FROM dbo.aspnet_UsersInRoles WHERE @RoleId = RoleId)) |
|BEGIN |
|SELECT @ErrorCode = 2 |
|GOTO Cleanup |
|END |
|END |
| |
| |
|DELETE FROM dbo.aspnet_UsersInRoles WHERE @RoleId = RoleId |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|DELETE FROM dbo.aspnet_Roles WHERE @RoleId = RoleId AND ApplicationId = @ApplicationId |
| |
|IF( @@ERROR 0 ) |
|BEGIN |
|SET @ErrorCode = -1 |
|GOTO Cleanup |
|END |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|COMMIT TRANSACTION |
|END |
| |
|RETURN(0) |
| |
|Cleanup: |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|ROLLBACK TRANSACTION |
|END |
| |
|RETURN @ErrorCode |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Roles_DeleteRole] TO [aspnet_Roles_FullAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Roles]
[dbo].[aspnet_UsersInRoles]
dbo
|[pic] [dbo].[aspnet_Roles_GetAllRoles] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Roles_GetAllRoles |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Roles_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_Roles_GetAllRoles ( |
|@ApplicationName nvarchar(256)) |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|RETURN |
|SELECT RoleName |
|FROM dbo.aspnet_Roles WHERE ApplicationId = @ApplicationId |
|ORDER BY RoleName |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Roles_GetAllRoles] TO [aspnet_Roles_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Roles]
dbo
|[pic] [dbo].[aspnet_Roles_RoleExists] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Roles_RoleExists |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@RoleName |nvarchar(256) |512 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Roles_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_Roles_RoleExists |
|@ApplicationName nvarchar(256), |
|@RoleName nvarchar(256) |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|RETURN(0) |
|IF (EXISTS (SELECT RoleName FROM dbo.aspnet_Roles WHERE LOWER(@RoleName) = LoweredRoleName AND ApplicationId = @ApplicationId ))|
|RETURN(1) |
|ELSE |
|RETURN(0) |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Roles_RoleExists] TO [aspnet_Roles_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Roles]
dbo
|[pic] [dbo].[aspnet_Setup_RemoveAllRoleMembers] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Setup_RemoveAllRoleMembers |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@name |sysname |256 |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE [dbo].aspnet_Setup_RemoveAllRoleMembers |
|@name sysname |
|AS |
|BEGIN |
|CREATE TABLE #aspnet_RoleMembers |
|( |
|Group_name sysname, |
|Group_id smallint, |
|Users_in_group sysname, |
|User_id smallint |
|) |
| |
|INSERT INTO #aspnet_RoleMembers |
|EXEC sp_helpuser @name |
| |
|DECLARE @user_id smallint |
|DECLARE @cmd nvarchar(500) |
|DECLARE c1 cursor FORWARD_ONLY FOR |
|SELECT User_id FROM #aspnet_RoleMembers |
| |
|OPEN c1 |
| |
|FETCH c1 INTO @user_id |
|WHILE (@@fetch_status = 0) |
|BEGIN |
|SET @cmd = 'EXEC sp_droprolemember ' + '''' + @name + ''', ''' + USER_NAME(@user_id) + '''' |
|EXEC (@cmd) |
|FETCH c1 INTO @user_id |
|END |
| |
|CLOSE c1 |
|DEALLOCATE c1 |
|END |
|GO |
Uses
dbo
|[pic] [dbo].[aspnet_Setup_RestorePermissions] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Setup_RestorePermissions |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@name |sysname |256 |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE [dbo].aspnet_Setup_RestorePermissions |
|@name sysname |
|AS |
|BEGIN |
|DECLARE @object sysname |
|DECLARE @protectType char(10) |
|DECLARE @action varchar(60) |
|DECLARE @grantee sysname |
|DECLARE @cmd nvarchar(500) |
|DECLARE c1 cursor FORWARD_ONLY FOR |
|SELECT Object, ProtectType, [Action], Grantee FROM #aspnet_Permissions where Object = @name |
| |
|OPEN c1 |
| |
|FETCH c1 INTO @object, @protectType, @action, @grantee |
|WHILE (@@fetch_status = 0) |
|BEGIN |
|SET @cmd = @protectType + ' ' + @action + ' on ' + @object + ' TO [' + @grantee + ']' |
|EXEC (@cmd) |
|FETCH c1 INTO @object, @protectType, @action, @grantee |
|END |
| |
|CLOSE c1 |
|DEALLOCATE c1 |
|END |
|GO |
Uses
dbo
|[pic] [dbo].[aspnet_UnRegisterSchemaVersion] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_UnRegisterSchemaVersion |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@Feature |nvarchar(128) |256 |
|@CompatibleSchemaVersion |nvarchar(128) |256 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_BasicAccess |
|Grant |Execute |aspnet_Membership_ReportingAccess |
|Grant |Execute |aspnet_Profile_BasicAccess |
|Grant |Execute |aspnet_Profile_ReportingAccess |
|Grant |Execute |aspnet_Roles_BasicAccess |
|Grant |Execute |aspnet_Roles_ReportingAccess |
|Grant |Execute |aspnet_Personalization_BasicAccess |
|Grant |Execute |aspnet_Personalization_ReportingAccess |
|Grant |Execute |aspnet_WebEvent_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE [dbo].aspnet_UnRegisterSchemaVersion |
|@Feature nvarchar(128), |
|@CompatibleSchemaVersion nvarchar(128) |
|AS |
|BEGIN |
|DELETE FROM dbo.aspnet_SchemaVersions |
|WHERE Feature = LOWER(@Feature) AND @CompatibleSchemaVersion = CompatibleSchemaVersion |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_UnRegisterSchemaVersion] TO [aspnet_Membership_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_UnRegisterSchemaVersion] TO [aspnet_Membership_ReportingAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_UnRegisterSchemaVersion] TO [aspnet_Personalization_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_UnRegisterSchemaVersion] TO [aspnet_Personalization_ReportingAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_UnRegisterSchemaVersion] TO [aspnet_Profile_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_UnRegisterSchemaVersion] TO [aspnet_Profile_ReportingAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_UnRegisterSchemaVersion] TO [aspnet_Roles_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_UnRegisterSchemaVersion] TO [aspnet_Roles_ReportingAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_UnRegisterSchemaVersion] TO [aspnet_WebEvent_FullAccess] |
|GO |
Uses
[dbo].[aspnet_SchemaVersions]
dbo
|[pic] [dbo].[aspnet_Users_CreateUser] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Users_CreateUser |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |Direction |
|@ApplicationId |uniqueidentifier |16 | |
|@UserName |nvarchar(256) |512 | |
|@IsUserAnonymous |bit |1 | |
|@LastActivityDate |datetime |8 | |
|@UserId |uniqueidentifier |16 |Out |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE [dbo].aspnet_Users_CreateUser |
|@ApplicationId uniqueidentifier, |
|@UserName nvarchar(256), |
|@IsUserAnonymous bit, |
|@LastActivityDate DATETIME, |
|@UserId uniqueidentifier OUTPUT |
|AS |
|BEGIN |
|IF( @UserId IS NULL ) |
|SELECT @UserId = NEWID() |
|ELSE |
|BEGIN |
|IF( EXISTS( SELECT UserId FROM dbo.aspnet_Users |
|WHERE @UserId = UserId ) ) |
|RETURN -1 |
|END |
| |
|INSERT dbo.aspnet_Users (ApplicationId, UserId, UserName, LoweredUserName, IsAnonymous, LastActivityDate) |
|VALUES (@ApplicationId, @UserId, @UserName, LOWER(@UserName), @IsUserAnonymous, @LastActivityDate) |
| |
|RETURN 0 |
|END |
|GO |
Uses
[dbo].[aspnet_Users]
dbo
Used By
[dbo].[aspnet_Membership_CreateUser]
[dbo].[aspnet_PersonalizationPerUser_SetPageSettings]
[dbo].[aspnet_Profile_SetProperties]
|[pic] [dbo].[aspnet_Users_DeleteUser] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_Users_DeleteUser |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |Direction |
|@ApplicationName |nvarchar(256) |512 | |
|@UserName |nvarchar(256) |512 | |
|@TablesToDeleteFrom |int |4 | |
|@NumTablesDeletedFrom |int |4 |Out |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Membership_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE [dbo].aspnet_Users_DeleteUser |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256), |
|@TablesToDeleteFrom int, |
|@NumTablesDeletedFrom int OUTPUT |
|AS |
|BEGIN |
|DECLARE @UserId uniqueidentifier |
|SELECT @UserId = NULL |
|SELECT @NumTablesDeletedFrom = 0 |
| |
|DECLARE @TranStarted bit |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
|ELSE |
|SET @TranStarted = 0 |
| |
|DECLARE @ErrorCode int |
|DECLARE @RowCount int |
| |
|SET @ErrorCode = 0 |
|SET @RowCount = 0 |
| |
|SELECT @UserId = u.UserId |
|FROM dbo.aspnet_Users u, dbo.aspnet_Applications a |
|WHERE u.LoweredUserName = LOWER(@UserName) |
|AND u.ApplicationId = a.ApplicationId |
|AND LOWER(@ApplicationName) = a.LoweredApplicationName |
| |
|IF (@UserId IS NULL) |
|BEGIN |
|GOTO Cleanup |
|END |
| |
|-- Delete from Membership table if (@TablesToDeleteFrom & 1) is set |
|IF ((@TablesToDeleteFrom & 1) 0 AND |
|(EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type = 'V')))) |
|BEGIN |
|DELETE FROM dbo.aspnet_Membership WHERE @UserId = UserId |
| |
|SELECT @ErrorCode = @@ERROR, |
|@RowCount = @@ROWCOUNT |
| |
|IF( @ErrorCode 0 ) |
|GOTO Cleanup |
| |
|IF (@RowCount 0) |
|SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1 |
|END |
| |
|-- Delete from aspnet_UsersInRoles table if (@TablesToDeleteFrom & 2) is set |
|IF ((@TablesToDeleteFrom & 2) 0 AND |
|(EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_UsersInRoles') AND (type = 'V'))) ) |
|BEGIN |
|DELETE FROM dbo.aspnet_UsersInRoles WHERE @UserId = UserId |
| |
|SELECT @ErrorCode = @@ERROR, |
|@RowCount = @@ROWCOUNT |
| |
|IF( @ErrorCode 0 ) |
|GOTO Cleanup |
| |
|IF (@RowCount 0) |
|SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1 |
|END |
| |
|-- Delete from aspnet_Profile table if (@TablesToDeleteFrom & 4) is set |
|IF ((@TablesToDeleteFrom & 4) 0 AND |
|(EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Profiles') AND (type = 'V'))) ) |
|BEGIN |
|DELETE FROM dbo.aspnet_Profile WHERE @UserId = UserId |
| |
|SELECT @ErrorCode = @@ERROR, |
|@RowCount = @@ROWCOUNT |
| |
|IF( @ErrorCode 0 ) |
|GOTO Cleanup |
| |
|IF (@RowCount 0) |
|SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1 |
|END |
| |
|-- Delete from aspnet_PersonalizationPerUser table if (@TablesToDeleteFrom & 8) is set |
|IF ((@TablesToDeleteFrom & 8) 0 AND |
|(EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_WebPartState_User') AND (type = 'V'))) ) |
|BEGIN |
|DELETE FROM dbo.aspnet_PersonalizationPerUser WHERE @UserId = UserId |
| |
|SELECT @ErrorCode = @@ERROR, |
|@RowCount = @@ROWCOUNT |
| |
|IF( @ErrorCode 0 ) |
|GOTO Cleanup |
| |
|IF (@RowCount 0) |
|SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1 |
|END |
| |
|-- Delete from aspnet_Users table if (@TablesToDeleteFrom & 1,2,4 & 8) are all set |
|IF ((@TablesToDeleteFrom & 1) 0 AND |
|(@TablesToDeleteFrom & 2) 0 AND |
|(@TablesToDeleteFrom & 4) 0 AND |
|(@TablesToDeleteFrom & 8) 0 AND |
|(EXISTS (SELECT UserId FROM dbo.aspnet_Users WHERE @UserId = UserId))) |
|BEGIN |
|DELETE FROM dbo.aspnet_Users WHERE @UserId = UserId |
| |
|SELECT @ErrorCode = @@ERROR, |
|@RowCount = @@ROWCOUNT |
| |
|IF( @ErrorCode 0 ) |
|GOTO Cleanup |
| |
|IF (@RowCount 0) |
|SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1 |
|END |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|COMMIT TRANSACTION |
|END |
| |
|RETURN 0 |
| |
|Cleanup: |
|SET @NumTablesDeletedFrom = 0 |
| |
|IF( @TranStarted = 1 ) |
|BEGIN |
|SET @TranStarted = 0 |
|ROLLBACK TRANSACTION |
|END |
| |
|RETURN @ErrorCode |
| |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_Users_DeleteUser] TO [aspnet_Membership_FullAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Membership]
[dbo].[aspnet_PersonalizationPerUser]
[dbo].[aspnet_Profile]
[dbo].[aspnet_Users]
[dbo].[aspnet_UsersInRoles]
dbo
Used By
[dbo].[aspnet_Profile_DeleteProfiles]
|[pic] [dbo].[aspnet_UsersInRoles_AddUsersToRoles] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_UsersInRoles_AddUsersToRoles |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserNames |nvarchar(4000) |8000 |
|@RoleNames |nvarchar(4000) |8000 |
|@CurrentTimeUtc |datetime |8 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Roles_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_UsersInRoles_AddUsersToRoles |
|@ApplicationName nvarchar(256), |
|@UserNames nvarchar(4000), |
|@RoleNames nvarchar(4000), |
|@CurrentTimeUtc datetime |
|AS |
|BEGIN |
|DECLARE @AppId uniqueidentifier |
|SELECT @AppId = NULL |
|SELECT @AppId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@AppId IS NULL) |
|RETURN(2) |
|DECLARE @TranStarted bit |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
| |
|DECLARE @tbNames table(Name nvarchar(256) NOT NULL PRIMARY KEY) |
|DECLARE @tbRoles table(RoleId uniqueidentifier NOT NULL PRIMARY KEY) |
|DECLARE @tbUsers table(UserId uniqueidentifier NOT NULL PRIMARY KEY) |
|DECLARE @Num int |
|DECLARE @Pos int |
|DECLARE @NextPos int |
|DECLARE @Name nvarchar(256) |
| |
|SET @Num = 0 |
|SET @Pos = 1 |
|WHILE(@Pos Stored Procedures > dbo.aspnet_UsersInRoles_FindUsersInRole |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@RoleName |nvarchar(256) |512 |
|@UserNameToMatch |nvarchar(256) |512 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Roles_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_UsersInRoles_FindUsersInRole |
|@ApplicationName nvarchar(256), |
|@RoleName nvarchar(256), |
|@UserNameToMatch nvarchar(256) |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|RETURN(1) |
|DECLARE @RoleId uniqueidentifier |
|SELECT @RoleId = NULL |
| |
|SELECT @RoleId = RoleId |
|FROM dbo.aspnet_Roles |
|WHERE LOWER(@RoleName) = LoweredRoleName AND ApplicationId = @ApplicationId |
| |
|IF (@RoleId IS NULL) |
|RETURN(1) |
| |
|SELECT u.UserName |
|FROM dbo.aspnet_Users u, dbo.aspnet_UsersInRoles ur |
|WHERE u.UserId = ur.UserId AND @RoleId = ur.RoleId AND u.ApplicationId = @ApplicationId AND LoweredUserName LIKE |
|LOWER(@UserNameToMatch) |
|ORDER BY u.UserName |
|RETURN(0) |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_UsersInRoles_FindUsersInRole] TO [aspnet_Roles_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Roles]
[dbo].[aspnet_Users]
[dbo].[aspnet_UsersInRoles]
dbo
|[pic] [dbo].[aspnet_UsersInRoles_GetRolesForUser] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_UsersInRoles_GetRolesForUser |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Roles_BasicAccess |
|Grant |Execute |aspnet_Roles_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_UsersInRoles_GetRolesForUser |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256) |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|RETURN(1) |
|DECLARE @UserId uniqueidentifier |
|SELECT @UserId = NULL |
| |
|SELECT @UserId = UserId |
|FROM dbo.aspnet_Users |
|WHERE LoweredUserName = LOWER(@UserName) AND ApplicationId = @ApplicationId |
| |
|IF (@UserId IS NULL) |
|RETURN(1) |
| |
|SELECT r.RoleName |
|FROM dbo.aspnet_Roles r, dbo.aspnet_UsersInRoles ur |
|WHERE r.RoleId = ur.RoleId AND r.ApplicationId = @ApplicationId AND ur.UserId = @UserId |
|ORDER BY r.RoleName |
|RETURN (0) |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_UsersInRoles_GetRolesForUser] TO [aspnet_Roles_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_UsersInRoles_GetRolesForUser] TO [aspnet_Roles_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Roles]
[dbo].[aspnet_Users]
[dbo].[aspnet_UsersInRoles]
dbo
|[pic] [dbo].[aspnet_UsersInRoles_GetUsersInRoles] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_UsersInRoles_GetUsersInRoles |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@RoleName |nvarchar(256) |512 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Roles_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_UsersInRoles_GetUsersInRoles |
|@ApplicationName nvarchar(256), |
|@RoleName nvarchar(256) |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|RETURN(1) |
|DECLARE @RoleId uniqueidentifier |
|SELECT @RoleId = NULL |
| |
|SELECT @RoleId = RoleId |
|FROM dbo.aspnet_Roles |
|WHERE LOWER(@RoleName) = LoweredRoleName AND ApplicationId = @ApplicationId |
| |
|IF (@RoleId IS NULL) |
|RETURN(1) |
| |
|SELECT u.UserName |
|FROM dbo.aspnet_Users u, dbo.aspnet_UsersInRoles ur |
|WHERE u.UserId = ur.UserId AND @RoleId = ur.RoleId AND u.ApplicationId = @ApplicationId |
|ORDER BY u.UserName |
|RETURN(0) |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_UsersInRoles_GetUsersInRoles] TO [aspnet_Roles_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Roles]
[dbo].[aspnet_Users]
[dbo].[aspnet_UsersInRoles]
dbo
|[pic] [dbo].[aspnet_UsersInRoles_IsUserInRole] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_UsersInRoles_IsUserInRole |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserName |nvarchar(256) |512 |
|@RoleName |nvarchar(256) |512 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Roles_BasicAccess |
|Grant |Execute |aspnet_Roles_ReportingAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_UsersInRoles_IsUserInRole |
|@ApplicationName nvarchar(256), |
|@UserName nvarchar(256), |
|@RoleName nvarchar(256) |
|AS |
|BEGIN |
|DECLARE @ApplicationId uniqueidentifier |
|SELECT @ApplicationId = NULL |
|SELECT @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@ApplicationId IS NULL) |
|RETURN(2) |
|DECLARE @UserId uniqueidentifier |
|SELECT @UserId = NULL |
|DECLARE @RoleId uniqueidentifier |
|SELECT @RoleId = NULL |
| |
|SELECT @UserId = UserId |
|FROM dbo.aspnet_Users |
|WHERE LoweredUserName = LOWER(@UserName) AND ApplicationId = @ApplicationId |
| |
|IF (@UserId IS NULL) |
|RETURN(2) |
| |
|SELECT @RoleId = RoleId |
|FROM dbo.aspnet_Roles |
|WHERE LoweredRoleName = LOWER(@RoleName) AND ApplicationId = @ApplicationId |
| |
|IF (@RoleId IS NULL) |
|RETURN(3) |
| |
|IF (EXISTS( SELECT * FROM dbo.aspnet_UsersInRoles WHERE UserId = @UserId AND RoleId = @RoleId)) |
|RETURN(1) |
|ELSE |
|RETURN(0) |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_UsersInRoles_IsUserInRole] TO [aspnet_Roles_BasicAccess] |
|GRANT EXECUTE ON [dbo].[aspnet_UsersInRoles_IsUserInRole] TO [aspnet_Roles_ReportingAccess] |
|GO |
Uses
[dbo].[aspnet_Applications]
[dbo].[aspnet_Roles]
[dbo].[aspnet_Users]
[dbo].[aspnet_UsersInRoles]
dbo
|[pic] [dbo].[aspnet_UsersInRoles_RemoveUsersFromRoles] |
|(local) > aspnetdb > Stored Procedures > dbo.aspnet_UsersInRoles_RemoveUsersFromRoles |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@ApplicationName |nvarchar(256) |512 |
|@UserNames |nvarchar(4000) |8000 |
|@RoleNames |nvarchar(4000) |8000 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_Roles_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
| |
|CREATE PROCEDURE dbo.aspnet_UsersInRoles_RemoveUsersFromRoles |
|@ApplicationName nvarchar(256), |
|@UserNames nvarchar(4000), |
|@RoleNames nvarchar(4000) |
|AS |
|BEGIN |
|DECLARE @AppId uniqueidentifier |
|SELECT @AppId = NULL |
|SELECT @AppId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName |
|IF (@AppId IS NULL) |
|RETURN(2) |
| |
| |
|DECLARE @TranStarted bit |
|SET @TranStarted = 0 |
| |
|IF( @@TRANCOUNT = 0 ) |
|BEGIN |
|BEGIN TRANSACTION |
|SET @TranStarted = 1 |
|END |
| |
|DECLARE @tbNames table(Name nvarchar(256) NOT NULL PRIMARY KEY) |
|DECLARE @tbRoles table(RoleId uniqueidentifier NOT NULL PRIMARY KEY) |
|DECLARE @tbUsers table(UserId uniqueidentifier NOT NULL PRIMARY KEY) |
|DECLARE @Num int |
|DECLARE @Pos int |
|DECLARE @NextPos int |
|DECLARE @Name nvarchar(256) |
|DECLARE @CountAll int |
|DECLARE @CountU int |
|DECLARE @CountR int |
| |
| |
|SET @Num = 0 |
|SET @Pos = 1 |
|WHILE(@Pos Stored Procedures > dbo.aspnet_WebEvent_LogEvent |
Properties
|Property |Value |
|ANSI Nulls On |⎫ |
|Quoted Identifier On |⎦ |
Parameters
|Name |Data Type |Max Length (Bytes) |
|@EventId |char(32) |32 |
|@EventTimeUtc |datetime |8 |
|@EventTime |datetime |8 |
|@EventType |nvarchar(256) |512 |
|@EventSequence |decimal(19,0) |9 |
|@EventOccurrence |decimal(19,0) |9 |
|@EventCode |int |4 |
|@EventDetailCode |int |4 |
|@Message |nvarchar(1024) |2048 |
|@ApplicationPath |nvarchar(256) |512 |
|@ApplicationVirtualPath |nvarchar(256) |512 |
|@MachineName |nvarchar(256) |512 |
|@RequestUrl |nvarchar(1024) |2048 |
|@ExceptionType |nvarchar(256) |512 |
|@Details |ntext |16 |
Permissions
|Type |Action |Owning Principal |
|Grant |Execute |aspnet_WebEvent_FullAccess |
SQL Script
|SET QUOTED_IDENTIFIER OFF |
|GO |
|CREATE PROCEDURE dbo.aspnet_WebEvent_LogEvent |
|@EventId char(32), |
|@EventTimeUtc datetime, |
|@EventTime datetime, |
|@EventType nvarchar(256), |
|@EventSequence decimal(19,0), |
|@EventOccurrence decimal(19,0), |
|@EventCode int, |
|@EventDetailCode int, |
|@Message nvarchar(1024), |
|@ApplicationPath nvarchar(256), |
|@ApplicationVirtualPath nvarchar(256), |
|@MachineName nvarchar(256), |
|@RequestUrl nvarchar(1024), |
|@ExceptionType nvarchar(256), |
|@Details ntext |
|AS |
|BEGIN |
|INSERT |
|dbo.aspnet_WebEvent_Events |
|( |
|EventId, |
|EventTimeUtc, |
|EventTime, |
|EventType, |
|EventSequence, |
|EventOccurrence, |
|EventCode, |
|EventDetailCode, |
|Message, |
|ApplicationPath, |
|ApplicationVirtualPath, |
|MachineName, |
|RequestUrl, |
|ExceptionType, |
|Details |
|) |
|VALUES |
|( |
|@EventId, |
|@EventTimeUtc, |
|@EventTime, |
|@EventType, |
|@EventSequence, |
|@EventOccurrence, |
|@EventCode, |
|@EventDetailCode, |
|@Message, |
|@ApplicationPath, |
|@ApplicationVirtualPath, |
|@MachineName, |
|@RequestUrl, |
|@ExceptionType, |
|@Details |
|) |
|END |
|GO |
|GRANT EXECUTE ON [dbo].[aspnet_WebEvent_LogEvent] TO [aspnet_WebEvent_FullAccess] |
|GO |
Uses
[dbo].[aspnet_WebEvent_Events]
dbo
|[pic] Users |
|(local) > aspnetdb > Users |
|Name |
|BIGBLUE\Ben Hall |
|[pic] BIGBLUE\Ben Hall |
|(local) > aspnetdb > Users > BIGBLUE\Ben Hall |
Properties
|Property |Value |
|Type |WindowsUser |
|Login Name |BIGBLUE\Ben Hall |
|Default Schema |dbo |
Database Level Permissions
|Type |Action |
|CONNECT |Grant |
SQL Script
|IF NOT EXISTS (SELECT * FROM master.dbo.syslogins WHERE loginname = N'BIGBLUE\Ben Hall') |
|CREATE LOGIN [BIGBLUE\Ben Hall] FROM WINDOWS |
|GO |
|CREATE USER [BIGBLUE\Ben Hall] FOR LOGIN [BIGBLUE\Ben Hall] WITH DEFAULT_SCHEMA=[dbo] |
|GO |
|GRANT CONNECT TO [BIGBLUE\Ben Hall] |
Uses
dbo
Used By
db_owner
|[pic] Database Roles |
|(local) > aspnetdb > Database Roles |
|Name |
|dbo.aspnet_Membership_BasicAccess |
|dbo.aspnet_Membership_FullAccess |
|dbo.aspnet_Membership_ReportingAccess |
|dbo.aspnet_Personalization_BasicAccess |
|dbo.aspnet_Personalization_FullAccess |
|dbo.aspnet_Personalization_ReportingAccess |
|dbo.aspnet_Profile_BasicAccess |
|dbo.aspnet_Profile_FullAccess |
|dbo.aspnet_Profile_ReportingAccess |
|dbo.aspnet_Roles_BasicAccess |
|dbo.aspnet_Roles_FullAccess |
|dbo.aspnet_Roles_ReportingAccess |
|dbo.aspnet_WebEvent_FullAccess |
|dbo.db_accessadmin |
|dbo.db_backupoperator |
|dbo.db_datareader |
|dbo.db_datawriter |
|dbo.db_ddladmin |
|dbo.db_denydatareader |
|dbo.db_denydatawriter |
|dbo.db_owner |
|dbo.db_securityadmin |
|dbo.public |
|[pic] aspnet_Membership_BasicAccess |
|(local) > aspnetdb > Database Roles > aspnet_Membership_BasicAccess |
Properties
|Property |Value |
|Owner |dbo |
Members
• aspnet_Membership_FullAccess
SQL Script
|CREATE ROLE [aspnet_Membership_BasicAccess] |
|AUTHORIZATION [dbo] |
|GO |
|EXEC sp_addrolemember N'aspnet_Membership_BasicAccess', N'aspnet_Membership_FullAccess' |
|GO |
Uses
aspnet_Membership_FullAccess
dbo
|[pic] aspnet_Membership_FullAccess |
|(local) > aspnetdb > Database Roles > aspnet_Membership_FullAccess |
Properties
|Property |Value |
|Owner |dbo |
SQL Script
|CREATE ROLE [aspnet_Membership_FullAccess] |
|AUTHORIZATION [dbo] |
|GO |
Uses
dbo
Used By
aspnet_Membership_BasicAccess
aspnet_Membership_ReportingAccess
|[pic] aspnet_Membership_ReportingAccess |
|(local) > aspnetdb > Database Roles > aspnet_Membership_ReportingAccess |
Properties
|Property |Value |
|Owner |dbo |
Members
• aspnet_Membership_FullAccess
SQL Script
|CREATE ROLE [aspnet_Membership_ReportingAccess] |
|AUTHORIZATION [dbo] |
|GO |
|EXEC sp_addrolemember N'aspnet_Membership_ReportingAccess', N'aspnet_Membership_FullAccess' |
|GO |
Uses
aspnet_Membership_FullAccess
dbo
|[pic] aspnet_Personalization_BasicAccess |
|(local) > aspnetdb > Database Roles > aspnet_Personalization_BasicAccess |
Properties
|Property |Value |
|Owner |dbo |
Members
• aspnet_Personalization_FullAccess
SQL Script
|CREATE ROLE [aspnet_Personalization_BasicAccess] |
|AUTHORIZATION [dbo] |
|GO |
|EXEC sp_addrolemember N'aspnet_Personalization_BasicAccess', N'aspnet_Personalization_FullAccess' |
|GO |
Uses
aspnet_Personalization_FullAccess
dbo
|[pic] aspnet_Personalization_FullAccess |
|(local) > aspnetdb > Database Roles > aspnet_Personalization_FullAccess |
Properties
|Property |Value |
|Owner |dbo |
SQL Script
|CREATE ROLE [aspnet_Personalization_FullAccess] |
|AUTHORIZATION [dbo] |
|GO |
Uses
dbo
Used By
aspnet_Personalization_BasicAccess
aspnet_Personalization_ReportingAccess
|[pic] aspnet_Personalization_ReportingAccess |
|(local) > aspnetdb > Database Roles > aspnet_Personalization_ReportingAccess |
Properties
|Property |Value |
|Owner |dbo |
Members
• aspnet_Personalization_FullAccess
SQL Script
|CREATE ROLE [aspnet_Personalization_ReportingAccess] |
|AUTHORIZATION [dbo] |
|GO |
|EXEC sp_addrolemember N'aspnet_Personalization_ReportingAccess', N'aspnet_Personalization_FullAccess' |
|GO |
Uses
aspnet_Personalization_FullAccess
dbo
|[pic] aspnet_Profile_BasicAccess |
|(local) > aspnetdb > Database Roles > aspnet_Profile_BasicAccess |
Properties
|Property |Value |
|Owner |dbo |
Members
• aspnet_Profile_FullAccess
SQL Script
|CREATE ROLE [aspnet_Profile_BasicAccess] |
|AUTHORIZATION [dbo] |
|GO |
|EXEC sp_addrolemember N'aspnet_Profile_BasicAccess', N'aspnet_Profile_FullAccess' |
|GO |
Uses
aspnet_Profile_FullAccess
dbo
|[pic] aspnet_Profile_FullAccess |
|(local) > aspnetdb > Database Roles > aspnet_Profile_FullAccess |
Properties
|Property |Value |
|Owner |dbo |
SQL Script
|CREATE ROLE [aspnet_Profile_FullAccess] |
|AUTHORIZATION [dbo] |
|GO |
Uses
dbo
Used By
aspnet_Profile_BasicAccess
aspnet_Profile_ReportingAccess
|[pic] aspnet_Profile_ReportingAccess |
|(local) > aspnetdb > Database Roles > aspnet_Profile_ReportingAccess |
Properties
|Property |Value |
|Owner |dbo |
Members
• aspnet_Profile_FullAccess
SQL Script
|CREATE ROLE [aspnet_Profile_ReportingAccess] |
|AUTHORIZATION [dbo] |
|GO |
|EXEC sp_addrolemember N'aspnet_Profile_ReportingAccess', N'aspnet_Profile_FullAccess' |
|GO |
Uses
aspnet_Profile_FullAccess
dbo
|[pic] aspnet_Roles_BasicAccess |
|(local) > aspnetdb > Database Roles > aspnet_Roles_BasicAccess |
Properties
|Property |Value |
|Owner |dbo |
Members
• aspnet_Roles_FullAccess
SQL Script
|CREATE ROLE [aspnet_Roles_BasicAccess] |
|AUTHORIZATION [dbo] |
|GO |
|EXEC sp_addrolemember N'aspnet_Roles_BasicAccess', N'aspnet_Roles_FullAccess' |
|GO |
Uses
aspnet_Roles_FullAccess
dbo
|[pic] aspnet_Roles_FullAccess |
|(local) > aspnetdb > Database Roles > aspnet_Roles_FullAccess |
Properties
|Property |Value |
|Owner |dbo |
SQL Script
|CREATE ROLE [aspnet_Roles_FullAccess] |
|AUTHORIZATION [dbo] |
|GO |
Uses
dbo
Used By
aspnet_Roles_BasicAccess
aspnet_Roles_ReportingAccess
|[pic] aspnet_Roles_ReportingAccess |
|(local) > aspnetdb > Database Roles > aspnet_Roles_ReportingAccess |
Properties
|Property |Value |
|Owner |dbo |
Members
• aspnet_Roles_FullAccess
SQL Script
|CREATE ROLE [aspnet_Roles_ReportingAccess] |
|AUTHORIZATION [dbo] |
|GO |
|EXEC sp_addrolemember N'aspnet_Roles_ReportingAccess', N'aspnet_Roles_FullAccess' |
|GO |
Uses
aspnet_Roles_FullAccess
dbo
|[pic] aspnet_WebEvent_FullAccess |
|(local) > aspnetdb > Database Roles > aspnet_WebEvent_FullAccess |
Properties
|Property |Value |
|Owner |dbo |
SQL Script
|CREATE ROLE [aspnet_WebEvent_FullAccess] |
|AUTHORIZATION [dbo] |
|GO |
Uses
dbo
|[pic] db_accessadmin |
|(local) > aspnetdb > Database Roles > db_accessadmin |
Properties
|Property |Value |
|Owner |dbo |
Uses
dbo
|[pic] db_backupoperator |
|(local) > aspnetdb > Database Roles > db_backupoperator |
Properties
|Property |Value |
|Owner |dbo |
Uses
dbo
|[pic] db_datareader |
|(local) > aspnetdb > Database Roles > db_datareader |
Properties
|Property |Value |
|Owner |dbo |
Uses
dbo
|[pic] db_datawriter |
|(local) > aspnetdb > Database Roles > db_datawriter |
Properties
|Property |Value |
|Owner |dbo |
Uses
dbo
|[pic] db_ddladmin |
|(local) > aspnetdb > Database Roles > db_ddladmin |
Properties
|Property |Value |
|Owner |dbo |
Uses
dbo
|[pic] db_denydatareader |
|(local) > aspnetdb > Database Roles > db_denydatareader |
Properties
|Property |Value |
|Owner |dbo |
Uses
dbo
|[pic] db_denydatawriter |
|(local) > aspnetdb > Database Roles > db_denydatawriter |
Properties
|Property |Value |
|Owner |dbo |
Uses
dbo
|[pic] db_owner |
|(local) > aspnetdb > Database Roles > db_owner |
Properties
|Property |Value |
|Owner |dbo |
Members
• BIGBLUE\Ben Hall
SQL Script
|EXEC sp_addrolemember N'db_owner', N'BIGBLUE\Ben Hall' |
|GO |
Uses
BIGBLUE\Ben Hall
dbo
|[pic] db_securityadmin |
|(local) > aspnetdb > Database Roles > db_securityadmin |
Properties
|Property |Value |
|Owner |dbo |
Uses
dbo
|[pic] public |
|(local) > aspnetdb > Database Roles > public |
Properties
|Property |Value |
|Owner |dbo |
Uses
dbo
|[pic] Schemas |
|(local) > aspnetdb > Schemas |
|Name |
|aspnet_Membership_BasicAccess.aspnet_Membership_BasicAccess |
|aspnet_Membership_FullAccess.aspnet_Membership_FullAccess |
|aspnet_Membership_ReportingAccess.aspnet_Membership_ReportingAccess |
|aspnet_Personalization_BasicAccess.aspnet_Personalization_BasicAccess |
|aspnet_Personalization_FullAccess.aspnet_Personalization_FullAccess |
|aspnet_Personalization_ReportingAccess.aspnet_Personalization_ReportingAccess |
|aspnet_Profile_BasicAccess.aspnet_Profile_BasicAccess |
|aspnet_Profile_FullAccess.aspnet_Profile_FullAccess |
|aspnet_Profile_ReportingAccess.aspnet_Profile_ReportingAccess |
|aspnet_Roles_BasicAccess.aspnet_Roles_BasicAccess |
|aspnet_Roles_FullAccess.aspnet_Roles_FullAccess |
|aspnet_Roles_ReportingAccess.aspnet_Roles_ReportingAccess |
|aspnet_WebEvent_FullAccess.aspnet_WebEvent_FullAccess |
|[pic] aspnet_Membership_BasicAccess |
|(local) > aspnetdb > Schemas > aspnet_Membership_BasicAccess |
Properties
|Property |Value |
|Owner |aspnet_Membership_BasicAccess |
SQL Script
|CREATE SCHEMA [aspnet_Membership_BasicAccess] |
|AUTHORIZATION [aspnet_Membership_BasicAccess] |
|GO |
|[pic] aspnet_Membership_FullAccess |
|(local) > aspnetdb > Schemas > aspnet_Membership_FullAccess |
Properties
|Property |Value |
|Owner |aspnet_Membership_FullAccess |
SQL Script
|CREATE SCHEMA [aspnet_Membership_FullAccess] |
|AUTHORIZATION [aspnet_Membership_FullAccess] |
|GO |
|[pic] aspnet_Membership_ReportingAccess |
|(local) > aspnetdb > Schemas > aspnet_Membership_ReportingAccess |
Properties
|Property |Value |
|Owner |aspnet_Membership_ReportingAccess |
SQL Script
|CREATE SCHEMA [aspnet_Membership_ReportingAccess] |
|AUTHORIZATION [aspnet_Membership_ReportingAccess] |
|GO |
|[pic] aspnet_Personalization_BasicAccess |
|(local) > aspnetdb > Schemas > aspnet_Personalization_BasicAccess |
Properties
|Property |Value |
|Owner |aspnet_Personalization_BasicAccess |
SQL Script
|CREATE SCHEMA [aspnet_Personalization_BasicAccess] |
|AUTHORIZATION [aspnet_Personalization_BasicAccess] |
|GO |
|[pic] aspnet_Personalization_FullAccess |
|(local) > aspnetdb > Schemas > aspnet_Personalization_FullAccess |
Properties
|Property |Value |
|Owner |aspnet_Personalization_FullAccess |
SQL Script
|CREATE SCHEMA [aspnet_Personalization_FullAccess] |
|AUTHORIZATION [aspnet_Personalization_FullAccess] |
|GO |
|[pic] aspnet_Personalization_ReportingAccess |
|(local) > aspnetdb > Schemas > aspnet_Personalization_ReportingAccess |
Properties
|Property |Value |
|Owner |aspnet_Personalization_ReportingAccess |
SQL Script
|CREATE SCHEMA [aspnet_Personalization_ReportingAccess] |
|AUTHORIZATION [aspnet_Personalization_ReportingAccess] |
|GO |
|[pic] aspnet_Profile_BasicAccess |
|(local) > aspnetdb > Schemas > aspnet_Profile_BasicAccess |
Properties
|Property |Value |
|Owner |aspnet_Profile_BasicAccess |
SQL Script
|CREATE SCHEMA [aspnet_Profile_BasicAccess] |
|AUTHORIZATION [aspnet_Profile_BasicAccess] |
|GO |
|[pic] aspnet_Profile_FullAccess |
|(local) > aspnetdb > Schemas > aspnet_Profile_FullAccess |
Properties
|Property |Value |
|Owner |aspnet_Profile_FullAccess |
SQL Script
|CREATE SCHEMA [aspnet_Profile_FullAccess] |
|AUTHORIZATION [aspnet_Profile_FullAccess] |
|GO |
|[pic] aspnet_Profile_ReportingAccess |
|(local) > aspnetdb > Schemas > aspnet_Profile_ReportingAccess |
Properties
|Property |Value |
|Owner |aspnet_Profile_ReportingAccess |
SQL Script
|CREATE SCHEMA [aspnet_Profile_ReportingAccess] |
|AUTHORIZATION [aspnet_Profile_ReportingAccess] |
|GO |
|[pic] aspnet_Roles_BasicAccess |
|(local) > aspnetdb > Schemas > aspnet_Roles_BasicAccess |
Properties
|Property |Value |
|Owner |aspnet_Roles_BasicAccess |
SQL Script
|CREATE SCHEMA [aspnet_Roles_BasicAccess] |
|AUTHORIZATION [aspnet_Roles_BasicAccess] |
|GO |
|[pic] aspnet_Roles_FullAccess |
|(local) > aspnetdb > Schemas > aspnet_Roles_FullAccess |
Properties
|Property |Value |
|Owner |aspnet_Roles_FullAccess |
SQL Script
|CREATE SCHEMA [aspnet_Roles_FullAccess] |
|AUTHORIZATION [aspnet_Roles_FullAccess] |
|GO |
|[pic] aspnet_Roles_ReportingAccess |
|(local) > aspnetdb > Schemas > aspnet_Roles_ReportingAccess |
Properties
|Property |Value |
|Owner |aspnet_Roles_ReportingAccess |
SQL Script
|CREATE SCHEMA [aspnet_Roles_ReportingAccess] |
|AUTHORIZATION [aspnet_Roles_ReportingAccess] |
|GO |
|[pic] aspnet_WebEvent_FullAccess |
|(local) > aspnetdb > Schemas > aspnet_WebEvent_FullAccess |
Properties
|Property |Value |
|Owner |aspnet_WebEvent_FullAccess |
SQL Script
|CREATE SCHEMA [aspnet_WebEvent_FullAccess] |
|AUTHORIZATION [aspnet_WebEvent_FullAccess] |
|GO |
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- روالهای ذخیره شده
- c we want to hear from you
- hello friends
- relational database rdbms via odbc interface to pi system
- local ben hall
- msdn authoring template
- in 1973 bank of america wanted to put their thousand
- tallan blog tallan s experts share their knowledge on
- relational database rdbms via odbc interface to the pi