You have just created a new Windows account (Domain\BobH) for a new employee. You create a new SQL login for BobH using the following command:
sp_addlogin ‘domain\BobH’, ‘password’, ‘accounting’But Bob now complains he cannot access SQL Server when he logs in with his Windows account. Why not?
Answer: – The sp_addlogin command creates standard login accounts, not mapped login accounts. You need to map Bob’s account to a SQL login with the sp_grantlogin stored procedure.
(You must use sp_grantlogin to map a SQL Server login to a Windows login. The sp_ addlogin stored procedure creates standard logins.)