# Linked servers connection

**URL:** <https://forum.inductiveautomation.com/t/linked-servers-connection/34012>\
**Category:** General Discussion\
**Created:** [April 17, 2020, 3:11pm UTC](https://forum.inductiveautomation.com/t/linked-servers-connection/34012 "2020-04-17T15:11:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![f1\_beto](https://avatars.discourse-cdn.com/v4/letter/f/e5b9ba/32.png) [@f1\_beto](https://forum.inductiveautomation.com/u/f1_beto)\
**Post date:** [April 17, 2020, 3:11pm UTC](https://forum.inductiveautomation.com/t/linked-servers-connection/34012/1 "2020-04-17T15:11:32Z")

</div>

I try do database connections used Microsoft SQLServer JDBC Driver with linked servers of SQL SERVER 2012 EXPRESS but i can’t.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [April 17, 2020, 3:17pm UTC](https://forum.inductiveautomation.com/t/linked-servers-connection/34012/2 "2020-04-17T15:17:36Z")

</div>

What error are you getting? SQL Server is a little more complicated than setting up other databases with Ignition. Follow this and see if it fixes it -

[https://docs.inductiveautomation.com/display/DOC/Connecting+to+Microsoft+SQL+Server+Express](https://docs.inductiveautomation.com/display/DOC/Connecting+to+Microsoft+SQL+Server+Express)

---

<div class="post-metadata">

**Author:** ![f1\_beto](https://avatars.discourse-cdn.com/v4/letter/f/e5b9ba/32.png) [@f1\_beto](https://forum.inductiveautomation.com/u/f1_beto)\
**Post date:** [April 17, 2020, 4:16pm UTC](https://forum.inductiveautomation.com/t/linked-servers-connection/34012/3 "2020-04-17T16:16:38Z")

</div>

i did it, but not worked. is not database in my server is a database that is on other server and I only have a linked server

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [April 17, 2020, 5:15pm UTC](https://forum.inductiveautomation.com/t/linked-servers-connection/34012/4 "2020-04-17T17:15:20Z")

</div>

If its a linked server, you just use an OPENQUERY to query through the main connection, you should not be setting up a separate connection in Ignition unless you want a direct connection (not linked server) to the other DB instance.

---

<div class="post-metadata">

**Author:** ![f1\_beto](https://avatars.discourse-cdn.com/v4/letter/f/e5b9ba/32.png) [@f1\_beto](https://forum.inductiveautomation.com/u/f1_beto)\
**Post date:** [April 17, 2020, 8:02pm UTC](https://forum.inductiveautomation.com/t/linked-servers-connection/34012/5 "2020-04-17T20:02:04Z")

</div>

> [@ryanjmclaughlin](#):
>
> OPENQUERY

thanks ryan.  
i have this error when run the table : Exception: Error running query:  
SQLQuery(query=SELECT \* FROM OPENQUERY (KANSAS,'SELECT \* FROM Mont\_Tags'), database=)@0ms  
On: Carga de modelos.Root Container.Container.Table 3.data  
caused by GatewayException: Login failed for user 'sa'.  
caused by SQLServerException: Login failed for user 'sa'.

how i can login with windows authentication

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [April 18, 2020, 2:06pm UTC](https://forum.inductiveautomation.com/t/linked-servers-connection/34012/6 "2020-04-18T14:06:40Z")

</div>

I don’t know much about linked servers outside of querying them, I leave that stuff up to our DBA, but I believe when you setup the linked server in SQL you need to configure the authentication. My guess is this is something SQL server side, your just seeing the error echo’d back to Ignition from the query.

---

<div class="post-metadata">

**Author:** ![f1\_beto](https://avatars.discourse-cdn.com/v4/letter/f/e5b9ba/32.png) [@f1\_beto](https://forum.inductiveautomation.com/u/f1_beto)\
**Post date:** [April 20, 2020, 7:45pm UTC](https://forum.inductiveautomation.com/t/linked-servers-connection/34012/7 "2020-04-20T19:45:02Z")

</div>

Ready, only change to windows authentication  
[https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/5/0/microsoft-sql-server-mssql-connection-guide-for-ignition](https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/5/0/microsoft-sql-server-mssql-connection-guide-for-ignition)  
thanks
