SQL Request control error: Login failed for user... (Trying to access SQL Server that isn't for SP)

  • 8 October 2020
  • 7 replies
  • 46 views

Badge +4

Hello!  I am trying to access a table in a SQL Server that isn't the SharePoint SQL Server Database Engine.  I am able to use the SQL Request control to access our SharePoint SQL Server Database Engine but not any other one.  Is there something I'm missing?  I know the control has found the server, but it is giving me a "Login failed" error.  Is this something I have to change within the SQL Server itself or in the control settings?

Any help is appreciated!!!

Owen


7 replies

Userlevel 6
Badge +22
Hi,

The error is very clear that this is a permissions issue.
Add the webapplication service to the database that you want to access by the control and see if that helps.
Badge +4

Hello @SimonMuntz,

Thank you for the response!  I'm a little new to SQL Server, so I apologize for asking further questions.  Do you add the webapplication service in SQL Server Management Studio?  Or is there a different way to add it?

Thank you!

Owen

Userlevel 6
Badge +22
Yes, add the user via SQL management studio to the permissions section of the database you want to access.
Badge +4

Thank you @SimonMuntz!  I really appreciate the help.  I have added the user to the database and have granted them the "Connect" permission, but I'm still getting the same error.  Is there another specific permission that the user needs to be given?  Also, why did I need to create the user?

Userlevel 6
Badge +22
Hi,

What happens if you give the account full control?
Badge +4

@SimonMuntz,

I do not have full control (I'm not allowed), so I've had to ask someone else to do things for me.  When they added the new user, I saw that they had the user in their list but I cannot see them...

Badge +4

Turns out, it was an issue with my Secure Store target application.  I had to make a new one to apply it to the user in the new SQL Server I was trying to connect to.  the user that had the failed login only existed in the previous SQL Server. Thanks!

Reply