External Content Type - Cannot connect to SQL server with user's identity
-
04-10-2020 - |
Question
I'm trying to get some data from external content type from SQL server by using my windows identity, but when I add a new connection in SPD, and choose user's identity to connect, a error message pop up stating this:
I confirmed there were no typo in sever name and DB name as I used them in data source page(I was able to add my SQL server as a data source with a user's sql login).
I confirmed my windows identity has permission to access my SQL server since I was able to log in to SQL server management studio and view tables with my windows authentication.
So, what's potentially causing this problem, and how should I troubleshoot/fix it? Thank you!
Solution
You need to check the Uls Logs(may be enable the verbos for BCS) and also check the Application logs on sharepoint server as well as on the SQL server.
- Most common reason for not being able to get to the database, apart from someone forgetting to plug it into the network or switch it on, is permissions. And usually the database is SQL Server and we don't have permissions set up in SQL Server
- add
network service user
in Database - if you are using Secure store service account to connect to LOB system then setting your credential there would work
- http://blog.rafelo.com/2010/02/13/bcs-external-list-error-%E2%80%93-cannot-connect-to-the-lobsystems-external-system/