# CData Sync error when creating a source connection to SQL Server

**URL:** <https://community.cdata.com/t/cdata-sync-error-when-creating-a-source-connection-to-sql-server/897>\
**Category:** CData Sync\
**Tags:** sql, question, cdata-sync\
**Created:** [September 10, 2024, 2:01am UTC](https://community.cdata.com/t/cdata-sync-error-when-creating-a-source-connection-to-sql-server/897 "2024-09-10T02:01:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ella.evio](https://avatars.discourse-cdn.com/v4/letter/e/f19dbf/32.png) [@ella.evio](https://community.cdata.com/u/ella.evio)\
**Post date:** [September 10, 2024, 2:01am UTC](https://community.cdata.com/t/cdata-sync-error-when-creating-a-source-connection-to-sql-server/897/1 "2024-09-10T02:01:38Z")

</div>

I’m encountering an error in CData Sync when I try to create and test a source connection. The complete error message is Connection open failed: [500] Failed to login ‘SERVERNAME’, Cannot open database ‘DBNAME’ requested by the login. The login failed. Login failed for user ‘user’.

What is the requirement for&nbsp;the SQL server so that CData can establish a connection? Also, are there any logs in CData we can check that has more details about the error?

The documentation does not say anything required from the source other than the server and login credentials.

---

<div class="post-metadata">

**Author:** ![Luçjano\_Capo](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/lu%C3%A7jano_capo/32/1638_2.png) [@Luçjano\_Capo](https://community.cdata.com/u/Lu%C3%A7jano_Capo)\
**Post date:** [September 10, 2024, 9:58am UTC](https://community.cdata.com/t/cdata-sync-error-when-creating-a-source-connection-to-sql-server/897/2 "2024-09-10T09:58:46Z")

</div>

Hi @ella.evio ,

Thank you for reaching out.

Firstly, I would suggest confirming the credentials for User and Password are correct, and please ensure that the user has read/write permissions for the data source. Your Database Administrator should be able to confirm that the user has these correct permissions. You can additionally try to connect using the admin user (sa).

Another thing to keep in mind is to enable the TCP/IP protocol for the server instance by going to SQL Server Configuration Manager, and under SQL Server Network Configurations locate your SQL Server and enable the TCP/IP:

 ![b18022ca-5996-44ed-8c3f-0e054c099039.png](https://us1.discourse-cdn.com/cdata/original/1X/1d204b6c6d37c3766f6424e0766c2a72ad74211c.png)

Make sure the server and database name you are trying to connect is correctly spelled.

 ![edc7a317-0a47-4fa3-944d-d98767e877fe.png](https://us1.discourse-cdn.com/cdata/original/2X/e/e6f910cdc1ee18ee1a2298acbd758f4c4e0d90c2.png)

And you will be able to successfully connect to your SQL Server instance.

 ![b839cbec-2ef3-4733-a8a7-b204ae12eb9a.png](https://us1.discourse-cdn.com/cdata/original/2X/b/bba9f4bea75e7305aed93f26d58bda6025e39786.png)

If any issues occur, please reach out to [support@cdata.com](mailto:support@cdata.com)

---

<div class="post-metadata">

**Author:** ![ella.evio](https://avatars.discourse-cdn.com/v4/letter/e/f19dbf/32.png) [@ella.evio](https://community.cdata.com/u/ella.evio)\
**Post date:** [September 10, 2024, 10:06am UTC](https://community.cdata.com/t/cdata-sync-error-when-creating-a-source-connection-to-sql-server/897/3 "2024-09-10T10:06:36Z")

</div>

Thank you @Luçjano_Capo &nbsp;for the prompt and detailed response. The connection was established when the source (from another team) gave a different database name.&nbsp;I’m guessing the cause&nbsp;is a wrong db name. Thanks for your help anyway!

---

<div class="post-metadata">

**Author:** ![Luçjano\_Capo](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/lu%C3%A7jano_capo/32/1638_2.png) [@Luçjano\_Capo](https://community.cdata.com/u/Lu%C3%A7jano_Capo)\
**Post date:** [September 10, 2024, 10:11am UTC](https://community.cdata.com/t/cdata-sync-error-when-creating-a-source-connection-to-sql-server/897/4 "2024-09-10T10:11:49Z")

</div>

I am glad your issue is resolved @ella.evio !

Hope you have a great day&nbsp;😊
