The EXECUTE permission was denied on the object ‘aspnet_CheckSchemaVersion’, database ‘<>’

After copying a database the ASP.Net Membership permissions might  not be set for the user you are trying to connect to resulting in the error:

The EXECUTE permission was denied on the object ‘aspnet_CheckSchemaVersion’, database ‘<<database name>>’

Solution: Running the following SQL will assign the needed permissions without having to assign the user as the owner:

GRANT SELECT, EXECUTE, UPDATE, INSERT ON SCHEMA :: dbo TO [<<user id>>]

Source: http://stackoverflow.com/questions/16134262/execute-permission-denied-aspnet-roles-roleexists?answertab=active#tab-top

UPDATE

Brad put together scripts for granting and revoking access to the asp.net membership stored procedures:

GRANT
-- #####   Select the database from the drop-down above!   ##### --
-- #####   Set the value of @USERNAME to the username you've created for this hosted client!   ##### --
DECLARE @USERNAME VARCHAR(255)
SET @USERNAME = '[<>]'

DECLARE @TO_TEMPLATE VARCHAR(MAX)
DECLARE @SQL_SCRIPT_USER VARCHAR(MAX)
DECLARE @SQL_SCRIPT_GRANT VARCHAR(MAX)
DECLARE @SQL_SCRIPT_PERM VARCHAR(MAX)

SET @TO_TEMPLATE = 'TO {USERNAME}'
SET @SQL_SCRIPT_USER = REPLACE(@TO_TEMPLATE, '{USERNAME}', @USERNAME)
SET @SQL_SCRIPT_GRANT = 'GRANT EXECUTE ON '

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_AnyDataInTables] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Applications_CreateApplication] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_CheckSchemaVersion] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_CreateUser] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_FindUsersByEmail] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_FindUsersByName] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_GetAllUsers] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_GetNumberOfUsersOnline] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_GetPassword] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_GetPasswordWithFormat] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_GetUserByEmail] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_GetUserByName] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_GetUserByUserId] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_ResetPassword] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_SetPassword] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_UnlockUser] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_UpdateUser] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Membership_UpdateUserInfo] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Paths_CreatePath] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Personalization_GetApplicationId] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_PersonalizationAdministration_DeleteAllState] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_PersonalizationAdministration_FindState] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_PersonalizationAdministration_GetCountOfState] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_PersonalizationAdministration_ResetSharedState] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_PersonalizationAdministration_ResetUserState] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_PersonalizationAllUsers_GetPageSettings] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_PersonalizationAllUsers_ResetPageSettings] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_PersonalizationAllUsers_SetPageSettings] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_PersonalizationPerUser_GetPageSettings] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_PersonalizationPerUser_ResetPageSettings] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_PersonalizationPerUser_SetPageSettings] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Profile_DeleteInactiveProfiles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Profile_DeleteProfiles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Profile_GetNumberOfInactiveProfiles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Profile_GetProfiles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Profile_GetProperties] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Profile_SetProperties] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_RegisterSchemaVersion] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Roles_CreateRole] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Roles_DeleteRole] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Roles_GetAllRoles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Roles_RoleExists] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Setup_RemoveAllRoleMembers] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Setup_RestorePermissions] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_UnRegisterSchemaVersion] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Users_CreateUser] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_Users_DeleteUser] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_UsersInRoles_AddUsersToRoles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_UsersInRoles_FindUsersInRole] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_UsersInRoles_GetRolesForUser] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_UsersInRoles_GetUsersInRoles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_UsersInRoles_IsUserInRole] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_UsersInRoles_RemoveUsersFromRoles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_GRANT + '[dbo].[aspnet_WebEvent_LogEvent] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

 

REVOKE:
-- #####   Select the database from the drop-down above!   ##### --
-- #####   Set the value of @USERNAME to the username you've created for this hosted client!   ##### --

DECLARE @USERNAME VARCHAR(255)
SET @USERNAME = '[<>]'

DECLARE @TO_TEMPLATE VARCHAR(MAX)
DECLARE @SQL_SCRIPT_USER VARCHAR(MAX)
DECLARE @SQL_SCRIPT_REVOKE VARCHAR(MAX)
DECLARE @SQL_SCRIPT_PERM VARCHAR(MAX)

SET @TO_TEMPLATE = 'TO {USERNAME}'
SET @SQL_SCRIPT_USER = REPLACE(@TO_TEMPLATE, '{USERNAME}', @USERNAME)
SET @SQL_SCRIPT_REVOKE = 'REVOKE EXECUTE ON '

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_AnyDataInTables] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Applications_CreateApplication] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_CheckSchemaVersion] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_CreateUser] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_FindUsersByEmail] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_FindUsersByName] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_GetAllUsers] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_GetNumberOfUsersOnline] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_GetPassword] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_GetPasswordWithFormat] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_GetUserByEmail] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_GetUserByName] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_GetUserByUserId] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_ResetPassword] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_SetPassword] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_UnlockUser] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_UpdateUser] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Membership_UpdateUserInfo] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Paths_CreatePath] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Personalization_GetApplicationId] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_PersonalizationAdministration_DeleteAllState] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_PersonalizationAdministration_FindState] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_PersonalizationAdministration_GetCountOfState] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_PersonalizationAdministration_ResetSharedState] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_PersonalizationAdministration_ResetUserState] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_PersonalizationAllUsers_GetPageSettings] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_PersonalizationAllUsers_ResetPageSettings] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_PersonalizationAllUsers_SetPageSettings] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_PersonalizationPerUser_GetPageSettings] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_PersonalizationPerUser_ResetPageSettings] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_PersonalizationPerUser_SetPageSettings] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Profile_DeleteInactiveProfiles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Profile_DeleteProfiles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Profile_GetNumberOfInactiveProfiles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Profile_GetProfiles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Profile_GetProperties] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Profile_SetProperties] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_RegisterSchemaVersion] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Roles_CreateRole] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Roles_DeleteRole] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Roles_GetAllRoles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Roles_RoleExists] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Setup_RemoveAllRoleMembers] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Setup_RestorePermissions] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_UnRegisterSchemaVersion] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Users_CreateUser] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_Users_DeleteUser] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_UsersInRoles_AddUsersToRoles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_UsersInRoles_FindUsersInRole] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_UsersInRoles_GetRolesForUser] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_UsersInRoles_GetUsersInRoles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_UsersInRoles_IsUserInRole] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_UsersInRoles_RemoveUsersFromRoles] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

SET @SQL_SCRIPT_PERM = @SQL_SCRIPT_REVOKE + '[dbo].[aspnet_WebEvent_LogEvent] ' + @SQL_SCRIPT_USER
EXECUTE (@SQL_SCRIPT_PERM)

 

Related Posts

Leave a thought

%d bloggers like this: