Find Out Orphaned Users in the Database.

To know about the orphaned users in the database we can run below query and find out.

Use DatabaseName
go
sp_change_users_login 'Report'---This procedure used to give the details of orphaned users in the database. After you find the orphaned users take the users type two times the sameway mentioned below
EXEC sp_change_users_login 'Update_One','ramesh','ramesh'
EXEC sp_change_users_login 'Update_One','kiran','kiran'
EXEC sp_change_users_login 'Update_One','RequestDB','RequestDB'

Comments

Popular posts from this blog

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

Pre login Handshake or Connection Timeout Period

Transparent Data Encryption(TDE) with Master Key and Certificate in SQL Server