2014-11-21 104 views
2

我的公司有一個網站,我們管理我們在ASP.NET 2.0中開發的時間表。最近,我們決定使用LDAP身份驗證,而不是使用先前使用的SQL成員身份。 現在這會產生各種各樣的問題,因爲成員資格數據是沿着某些依賴於aspnet_Users的表上GUID FKs的一些最重要的表散佈的。從網站刪除SQL成員資格

就認證而言,我們沒有任何問題,但我們希望刪除引用與SQL成員關係相關的任何內容的每個表和列。 因爲我需要首先刪除asp_ *表,所以我還沒有做到這一點。我試過了網絡管理工具(我能夠刪除一些數據但不是所有東西),我仍然需要刪除所有這些與會員相關的數據。

任何人都可以指出我怎樣才能達到預期的結果?我真的迷失在這裏了。

回答

5

現在,如果您有數據說引用放置訂單的用戶(並且在您的成員資格用戶表和訂單表之間有關係)的「訂單」表中, drop語句將失敗 - 您如何計算將當前歸因於用戶的數據更新到新的用戶存儲?

發現這個從https://gist.github.com/dmorrison/942148

-- Removes all objects (in the correct order) added to 
-- SQL Server by the stock ASP.NET membership provider 
drop table aspnet_PersonalizationAllUsers 
drop table aspnet_PersonalizationPerUser 
drop table aspnet_Profile 
drop table aspnet_SchemaVersions 
drop table aspnet_UsersInRoles 
drop table aspnet_WebEvent_Events 
drop table aspnet_Paths 
drop table aspnet_Membership 
drop table aspnet_Roles 
drop table aspnet_Users 
drop table aspnet_Applications 

drop view vw_aspnet_Applications 
drop view vw_aspnet_MembershipUsers 
drop view vw_aspnet_Profiles 
drop view vw_aspnet_Roles 
drop view vw_aspnet_Users 
drop view vw_aspnet_UsersInRoles 
drop view vw_aspnet_WebPartState_Paths 
drop view vw_aspnet_WebPartState_Shared 
drop view vw_aspnet_WebPartState_User 

drop procedure aspnet_AnyDataInTables 
drop procedure aspnet_Applications_CreateApplication 
drop procedure aspnet_CheckSchemaVersion 
drop procedure aspnet_Membership_ChangePasswordQuestionAndAnswer 
drop procedure aspnet_Membership_CreateUser 
drop procedure aspnet_Membership_FindUsersByEmail 
drop procedure aspnet_Membership_FindUsersByName 
drop procedure aspnet_Membership_GetAllUsers 
drop procedure aspnet_Membership_GetNumberOfUsersOnline 
drop procedure aspnet_Membership_GetPassword 
drop procedure aspnet_Membership_GetPasswordWithFormat 
drop procedure aspnet_Membership_GetUserByEmail 
drop procedure aspnet_Membership_GetUserByName 
drop procedure aspnet_Membership_GetUserByUserId 
drop procedure aspnet_Membership_ResetPassword 
drop procedure aspnet_Membership_SetPassword 
drop procedure aspnet_Membership_UnlockUser 
drop procedure aspnet_Membership_UpdateUser 
drop procedure aspnet_Membership_UpdateUserInfo 
drop procedure aspnet_Paths_CreatePath 
drop procedure aspnet_Personalization_GetApplicationId 
drop procedure aspnet_PersonalizationAdministration_DeleteAllState 
drop procedure aspnet_PersonalizationAdministration_FindState 
drop procedure aspnet_PersonalizationAdministration_GetCountOfState 
drop procedure aspnet_PersonalizationAdministration_ResetSharedState 
drop procedure aspnet_PersonalizationAdministration_ResetUserState 
drop procedure aspnet_PersonalizationAllUsers_GetPageSettings 
drop procedure aspnet_PersonalizationAllUsers_ResetPageSettings 
drop procedure aspnet_PersonalizationAllUsers_SetPageSettings 
drop procedure aspnet_PersonalizationPerUser_GetPageSettings 
drop procedure aspnet_PersonalizationPerUser_ResetPageSettings 
drop procedure aspnet_PersonalizationPerUser_SetPageSettings 
drop procedure aspnet_Profile_DeleteInactiveProfiles 
drop procedure aspnet_Profile_DeleteProfiles 
drop procedure aspnet_Profile_GetNumberOfInactiveProfiles 
drop procedure aspnet_Profile_GetProfiles 
drop procedure aspnet_Profile_GetProperties 
drop procedure aspnet_Profile_SetProperties 
drop procedure aspnet_RegisterSchemaVersion 
drop procedure aspnet_Roles_CreateRole 
drop procedure aspnet_Roles_DeleteRole 
drop procedure aspnet_Roles_GetAllRoles 
drop procedure aspnet_Roles_RoleExists 
drop procedure aspnet_Setup_RemoveAllRoleMembers 
drop procedure aspnet_Setup_RestorePermissions 
drop procedure aspnet_UnRegisterSchemaVersion 
drop procedure aspnet_Users_CreateUser 
drop procedure aspnet_Users_DeleteUser 
drop procedure aspnet_UsersInRoles_AddUsersToRoles 
drop procedure aspnet_UsersInRoles_FindUsersInRole 
drop procedure aspnet_UsersInRoles_GetRolesForUser 
drop procedure aspnet_UsersInRoles_GetUsersInRoles 
drop procedure aspnet_UsersInRoles_IsUserInRole 
drop procedure aspnet_UsersInRoles_RemoveUsersFromRoles 
drop procedure aspnet_WebEvent_LogEvent 

drop schema aspnet_Membership_FullAccess 
drop schema aspnet_Membership_BasicAccess 
drop schema aspnet_Membership_ReportingAccess 
drop schema aspnet_Personalization_BasicAccess 
drop schema aspnet_Personalization_FullAccess 
drop schema aspnet_Personalization_ReportingAccess 
drop schema aspnet_Profile_BasicAccess 
drop schema aspnet_Profile_FullAccess 
drop schema aspnet_Profile_ReportingAccess 
drop schema aspnet_Roles_BasicAccess 
drop schema aspnet_Roles_FullAccess 
drop schema aspnet_Roles_ReportingAccess 
drop schema aspnet_WebEvent_FullAccess 

drop role aspnet_Membership_FullAccess 
drop role aspnet_Membership_BasicAccess 
drop role aspnet_Membership_ReportingAccess 
drop role aspnet_Personalization_FullAccess 
drop role aspnet_Personalization_BasicAccess 
drop role aspnet_Personalization_ReportingAccess 
drop role aspnet_Profile_FullAccess 
drop role aspnet_Profile_BasicAccess 
drop role aspnet_Profile_ReportingAccess 
drop role aspnet_Roles_FullAccess 
drop role aspnet_Roles_BasicAccess 
drop role aspnet_Roles_ReportingAccess 
drop role aspnet_WebEvent_FullAccess 
+0

複製我知道我來晚了。那不是全分辨率我的問題,但它肯定是朝着它的一個重要推.. – 2014-12-09 23:39:55