0

I have a SharePoint server which is using service account "spsharepoint".

For some reason this user has started giving 'Login failed for user DOMAIN\spsharepoint' when I checked SQL Server logs. Turns out it is trying to access 'master' database on which it doesn't have access so the error.

I gave read only access to this user on master database but error is still coming. What could be the issue and how do I fix this?

1

Verify if your user has permision to connect to database Engine. Right click on Logins -> Properties -> Status.

Or grant CONNECT for user.

CREATE LOGIN [mydomain\mygroup] FROM WINDOWS;
GRANT CONNECT SQL TO [mydomain\mygroup]
| improve this answer | |
1

View the default database in user's properties, may be it is master, if so, then change it

| improve this answer | |
1

One option is create login with default database option and add role member to login user in database

USE [master]
GO

CREATE LOGIN [CUREMD\NewLogin] FROM WINDOWS WITH DEFAULT_DATABASE=[AdventureWorks]
GO

USE [AdventureWorks]--- Change DB name to Sharepoint DB Name
GO

CREATE USER [CUREMD\NewLogin] FOR LOGIN [CUREMD\NewLogin]
GO

USE [AdventureWorks]   --- Change DB name to Sharepoint DB Name
GO
EXEC sp_addrolemember N'db_owner', N'CUREMD\NewLogin' -- add role according to requirement.
GO
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.