I am trying to grant a domain user to SQL Server 2008. This user should be able to login to the DB using server management studio, and run PowerShell scripts doing SELECT queries to a database. My problem is my settings does not persist.
In server management studio, I right click on Security->Logins->right click on ->Properties->User mappings-> tick my database which happens to be the first one, granted 'db_datareader' and 'public'. Click OK.
No error pops up. But when I check the user mappings again, my database is no longer ticked! What have I missed? Really puzzled... must be something very simple...
--update--:
soved: deleted the login+user, added them back,and the rest.. now ok. many thx!
It happens sometimes when user has no connect permission or the permission has been revoked.
Grant connect to [user]
use master;
GO
create login [<domain\user>] from windows;
GO
use [<yourdb>];
GO
create user [<domain\user>] for login [<domain\user>];
GO
ALTER ROLE db_datareader ADD MEMBER [<domain\user>];
GO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With