Configure SQL Server database for Windows Authentication
Here is how you execute the script that allows the server's computer account to access a SQL Server database.
Before you begin
The task applies for SQL Server database when the connection string used integrated authentication.
The task requires sysadmin rights on the SQL Server
Procedure
- Locate the script GrantComputerAccountPermissions.sql in the \InfoShare\App\Database\Common\ depending on your version of SQL Server
- For SQL Server 2012 the script path is \InfoShare\App<Projectsuffix>\Database\Common\SQLServer2012\Tools\GrantComputerAccountPermissions.sql
- For SQL Server 2014 the script path is \InfoShare\App<Projectsuffix>\Database\Common\SQLServer2014\Tools\GrantComputerAccountPermissions.sql
- Execute the script on the target sql server instance
SQL Server script that grants necessary permissions
If the target database is INFOSHAREDB and the computer account is TESTDOMAIN\SERVER01$ then the script looks like this.
USE [master]
GO
CREATE LOGIN [TESTDOMAIN\SERVER01$] FROM WINDOWS WITH DEFAULT_DATABASE=[INFOSHAREDB]
GO
USE [INFOSHAREDB]
GO
CREATE USER [GLOBAL\MEDEVASARAFIA01$] FOR LOGIN [TESTDOMAIN\SERVER01$]
GO
USE [INFOSHAREDB]
GO
GRANT SELECT TO [TESTDOMAIN\SERVER01$]
GO