Sometimes you will face error like: Server Principal already exist while creating a Login.
1.Run the below query
SELECT SUSER_SID('dev')
GO
2.it will give an hexadecimal number like:
0x06EB61AB7AF713448F09FA5103282D43
3.Execute the following query
Select * from sys.server_principals where SID=0x06EB61AB7AF713448F09FA5103282D43
It wil give an out put like:
dev1 266 0x06EB61AB7AF713448F09FA5103282D43 S SQL_LOGIN 0 2012-10-17 18:02:05.353 2012-10-17 18:47:58.287 master us_english NULL
Remove the login "dev1: and corresponding database users and recreate the login "dev" once again
1.Run the below query
SELECT SUSER_SID('dev')
GO
2.it will give an hexadecimal number like:
0x06EB61AB7AF713448F09FA5103282D43
3.Execute the following query
Select * from sys.server_principals where SID=0x06EB61AB7AF713448F09FA5103282D43
It wil give an out put like:
dev1 266 0x06EB61AB7AF713448F09FA5103282D43 S SQL_LOGIN 0 2012-10-17 18:02:05.353 2012-10-17 18:47:58.287 master us_english NULL
Remove the login "dev1: and corresponding database users and recreate the login "dev" once again
No comments:
Post a Comment