# MSSQL Express with Window Authentication

**URL:** <https://forum.inductiveautomation.com/t/mssql-express-with-window-authentication/20297>\
**Category:** General Discussion\
**Created:** [October 22, 2018, 2:40pm UTC](https://forum.inductiveautomation.com/t/mssql-express-with-window-authentication/20297 "2018-10-22T14:40:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon.ong](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@simon.ong](https://forum.inductiveautomation.com/u/simon.ong)\
**Post date:** [October 22, 2018, 2:40pm UTC](https://forum.inductiveautomation.com/t/mssql-express-with-window-authentication/20297/1 "2018-10-22T14:40:17Z")

</div>

I am facing problem trying to set up connection with MSSQL Express  
here is the Error code

```auto
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (This driver is not configured for integrated authentication.)
	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
	at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:242)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:196)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.lambda$newRetryRunnable$0(DatasourceManagerImpl.java:998)
	at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$TrackedTask.run(BasicExecutionEngine.java:565)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:170)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2338)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:1929)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:1917)
	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1061)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716)
	at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841)
	at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
	at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
	at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
	... 12 more

7.9.9 (b2018081621)
Oracle Corporation 1.8.0_191

```

I had downloaded the driver and copy to C:\Program Files\Inductive Automation\Ignition\lib\

the documentation said

The account used to connect will be the account that Ignition is running under in the services menu. To setup Ignition to logon using the right Windows account, open the Services Control Panel from Start \> Control Panel \> Administrative Tools \> Services

Right-click the Ignition service and choose Properties.

Select the Log On tab.

Choose the This account radio button and enter in your Windows username and password. --\> ???

Click OK to save.

Now restart the Ignition service to make this change take effect. Click the Action \> Restart button in the menubar to restart the Ignition service (or your can stop and start from the right-click menu).

Note :I am using trial version

Simon

---

<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:** [October 22, 2018, 4:48pm UTC](https://forum.inductiveautomation.com/t/mssql-express-with-window-authentication/20297/2 "2018-10-22T16:48:51Z")

</div>

You need to add the Microsoft authentication libraries to your gateway to add support for integrated authentication.  
Download the SQL Server JDBC driver package from Microsoft that matches the JDBC driver running on the Gateway.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e6988a2e5ffc1f062cd7b75193ca7ad4bf7dbc20.png)

In the driver you download there should be an **auth** folder with a dll **sqljdbc\_auth.dll**. Drop this into your lib\ folder of your gateway install and restart the gateway. You only need to put the auth dll in the lib folder.

That will configure the driver. After that you should add the correct properties to the connection settings.

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/29d4106829b61a02d51b8a264a9b7ada327f8195.png)

After restarting the Gateway, Ignition will then connect to the DB as whatever account the Ignition service is running as.

---

<div class="post-metadata">

**Author:** ![simon.ong](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@simon.ong](https://forum.inductiveautomation.com/u/simon.ong)\
**Post date:** [October 24, 2018, 8:29am UTC](https://forum.inductiveautomation.com/t/mssql-express-with-window-authentication/20297/3 "2018-10-24T08:29:44Z")

</div>

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/69fc20e21f4c2ee979672c01c1df05b60d200f6d.png)

I don’t see any Jar file listed. Any setting I need to do?

Simon

---

<div class="post-metadata">

**Author:** ![simon.ong](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@simon.ong](https://forum.inductiveautomation.com/u/simon.ong)\
**Post date:** [October 24, 2018, 9:30am UTC](https://forum.inductiveautomation.com/t/mssql-express-with-window-authentication/20297/4 "2018-10-24T09:30:58Z")

</div>

Ok:  
Now I have different error

Cannot create PoolableConnectionFactory (Cannot open database “IgnitionTest” requested by the login. The login failed. ClientConnectionId:2f8351e1-7865-480e-8f72-bcc587b992d9)

Anyone

---

<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:** [October 24, 2018, 11:04am UTC](https://forum.inductiveautomation.com/t/mssql-express-with-window-authentication/20297/5 "2018-10-24T11:04:12Z")

</div>

That is an error direct from MSSQL server. You need to configure the login account (Ignition service account) to have access to the “IgnitionTest” database. SQL server permissions have lots of layers and are annoying.

---

<div class="post-metadata">

**Author:** ![simon.ong](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@simon.ong](https://forum.inductiveautomation.com/u/simon.ong)\
**Post date:** [October 24, 2018, 11:25am UTC](https://forum.inductiveautomation.com/t/mssql-express-with-window-authentication/20297/6 "2018-10-24T11:25:18Z")

</div>

> [@ryanjmclaughlin](#):
>
> You need to configure the login account (Ignition service account)

Where is this suppose to be?

I had been struggling to learn Inductive Scada

Thanks

Simon

---

<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:** [October 24, 2018, 12:06pm UTC](https://forum.inductiveautomation.com/t/mssql-express-with-window-authentication/20297/7 "2018-10-24T12:06:44Z")

</div>

> [@simon.ong](#):
>
> set up connection with MSSQL Express

You need to configure the account you are using to connect in SQL Server. This is outside of Ignition. It appears you setup Ignition connect to the server, but on the database server you need to setup that users permissions. You would need to refer to the Microsoft docs for this.

This video shows the basic process, but every environment is a bit different. [https://www.youtube.com/watch?v=dU3lMPrrSRs](https://www.youtube.com/watch?v=dU3lMPrrSRs)

---

<div class="post-metadata">

**Author:** ![simon.ong](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@simon.ong](https://forum.inductiveautomation.com/u/simon.ong)\
**Post date:** [October 24, 2018, 1:09pm UTC](https://forum.inductiveautomation.com/t/mssql-express-with-window-authentication/20297/8 "2018-10-24T13:09:13Z")

</div>

The sqlserver express is set up with window authentication, not mixed mode or sqlmode.

---

<div class="post-metadata">

**Author:** ![simon.ong](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@simon.ong](https://forum.inductiveautomation.com/u/simon.ong)\
**Post date:** [October 24, 2018, 1:44pm UTC](https://forum.inductiveautomation.com/t/mssql-express-with-window-authentication/20297/9 "2018-10-24T13:44:16Z")

</div>

Never Mind. I git it done with the Ignition service with Sql Window Authentication.

Thanks Ryan for your help.
