cancel
Showing results for 
Search instead for 
Did you mean: 

How to create connection string for Unity script database connection using an ODBC with Windows Authentication?

Brian_Arthurs
Champ on-the-rise
Champ on-the-rise

Our customer needs us to create an external AFKS to accomplish a lookup against an MS SQL database. But the database is not configured to allow SQL Authentication. So in order to use Windows Authentication I will need to create and reference an ODBC. In order for the AFKS to be executed on a Unity Form, would the ODBC only need to be configured on the application server? Would the app pool need to be running with impersonation, using a domain account that has access to the database? In order for the AFKS to be executed on a document by a workflow timer service, would the service need to be running with such a domain account?

Also - we need to do something very similar with a Unity script Connection String. The script gets run on a Unity form. The form will be used in the web client and Unity client. Can the connection string be set to use the ODBC that is configured for Windows Authentication? Does anyone have an example of a connection string for connecting to an MS SQL database using Windows Authentication? Would the ODBC need to be set up on both the application server and web server (for the web client usage)? And would this again be the app pool impersonation account that would be making the actual connection?

Any tips and/or examples that anyone has regarding accomplishing what we are trying to do, or something similar, would be greatly appreciated! Thanks!

1 ACCEPTED ANSWER

Scott_McLean
Elite Collaborator
Elite Collaborator

Hi Brian,

The standard format for a SQL Server connection string using Windows authentication is this:

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

You can find many examples, including those for more esoteric cases at https://www.connectionstrings.com

Hope that helps,

Scott

View answer in original post

2 REPLIES 2

Scott_McLean
Elite Collaborator
Elite Collaborator

Hi Brian,

The standard format for a SQL Server connection string using Windows authentication is this:

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

You can find many examples, including those for more esoteric cases at https://www.connectionstrings.com

Hope that helps,

Scott

Brian_Arthurs
Champ on-the-rise
Champ on-the-rise

Thanks, Scott.  That worked well for me.