You cannot create an identical user and mapping the user to the database, and you cannot delete the database user: DemoUser.
Please run the following script and then you can delete the user: DemoUser. Then create the user (DemoUser.) and mapping to the database.
Script:
Copy Code code as follows:
Go
ALTER AUTHORIZATION on role::[aspnet_membership_basicaccess] to [dbo]
Go
Go
ALTER AUTHORIZATION on role::[aspnet_membership_fullaccess] to [dbo]
Go
Go
ALTER AUTHORIZATION on role::[aspnet_membership_reportingaccess] to [dbo]
Go
Go
ALTER AUTHORIZATION on role::[aspnet_profile_basicaccess] to [dbo]
Go
Go
ALTER AUTHORIZATION on role::[aspnet_profile_fullaccess] to [dbo]
Go
Go
ALTER AUTHORIZATION on role::[aspnet_profile_reportingaccess] to [dbo]
Go
Go
ALTER AUTHORIZATION on role::[aspnet_roles_basicaccess] to [dbo]
Go
Go
ALTER AUTHORIZATION on role::[aspnet_roles_fullaccess] to [dbo]
Go
Go
ALTER AUTHORIZATION on role::[aspnet_roles_reportingaccess] to [dbo]
Go
Go
ALTER AUTHORIZATION on Schema::[db_owner] to [dbo]
Go
Go
ALTER AUTHORIZATION on Schema::[db_owner] to [db_owner]
Go