Restoring database file from backup file vb.net
Disable the emails in tblUsers by changing @ to #
update tblUsers
set Email = replace(Email, '%@%', '%#%')
where Email like '%@%'
update tblusers
set email = replace(email,'@','#')
Connection error:
USE MASTER
GO
SELECT name as SQLServerLogIn,SID as SQLServerSID FROM sys.syslogins
WHERE [name] = 'user'
GO
USE sdip
GO
SELECT name DataBaseID,SID as DatabaseSID FROM sysusers
WHERE [name] = 'user'
GO
EXEC sp_users_login 'Auto_Fix', 'user'
GO
// https://www.mssqltips.com/sqlservertip/1590/understanding-and-dealing-with-orphaned-users-in-a-sql-server-database/