# Ignition connection to Azure SQL Database

**URL:** <https://forum.inductiveautomation.com/t/ignition-connection-to-azure-sql-database/16063>\
**Category:** Ignition\
**Tags:** database\
**Created:** [November 21, 2017, 2:29am UTC](https://forum.inductiveautomation.com/t/ignition-connection-to-azure-sql-database/16063 "2017-11-21T02:29:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JT1](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@JT1](https://forum.inductiveautomation.com/u/JT1)\
**Post date:** [November 21, 2017, 2:29am UTC](https://forum.inductiveautomation.com/t/ignition-connection-to-azure-sql-database/16063/1 "2017-11-21T02:29:17Z")

</div>

Hi,

I’m having trouble connecting to an Azure SQL database from a separate Igniton server. This is how I set it up:  
Microsoft SQLServer JDBC Driver  
Connect URL: jdbc:sqlserver://SQL server [name.database.windows.net](http://name.database.windows.net)  
Username: SQL user name  
databaseName=Existing database in SQL server

What should I use as the instanceName?  
Do I also need to allow port 1433 or 1434 as a firewall outbound rule on the Ignition server?  
I can connect to the database via SQL management studio on the Ignition server, so the Azure SQL server is allowing connections from the Ignition server.

Thanks!  
JT

---

<div class="post-metadata">

**Author:** ![Paullys50](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paullys50/32/3324_2.png) [@Paullys50](https://forum.inductiveautomation.com/u/Paullys50)\
**Post date:** [November 21, 2017, 4:11pm UTC](https://forum.inductiveautomation.com/t/ignition-connection-to-azure-sql-database/16063/2 "2017-11-21T16:11:17Z")

</div>

Haha I just dealt with this the other week. It’s your user name.

username needs to be in the format of: username@hostname

**username@SQL server [name.database.windows.net](http://name.database.windows.net)**

---

<div class="post-metadata">

**Author:** ![JT1](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@JT1](https://forum.inductiveautomation.com/u/JT1)\
**Post date:** [November 21, 2017, 9:50pm UTC](https://forum.inductiveautomation.com/t/ignition-connection-to-azure-sql-database/16063/3 "2017-11-21T21:50:03Z")

</div>

Oh great! @Paullys50 Thanks for your reply! It’s working for me now.

Some updates:  
Connect URL: jdbc:sqlserver://SQL server [name.database.windows.net:1433](http://name.database.windows.net:1433) (no , port optional)  
Username works without the “.database.windows.net” as well  
No port configuration required on the Ignition server

Cheers,  
JT

---

<div class="post-metadata">

**Author:** ![dan.wiebe](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@dan.wiebe](https://forum.inductiveautomation.com/u/dan.wiebe)\
**Post date:** [January 25, 2019, 8:08am UTC](https://forum.inductiveautomation.com/t/ignition-connection-to-azure-sql-database/16063/4 "2019-01-25T08:08:55Z")

</div>

Thanks Again Paully (im on [plctalk.net](http://plctalk.net) as well)

I found that azure gives a good JDBC Connection string to start with in the portal you can get them.  
thought i would add that for anyone else.
