Sql-server – write to SQL server from another server

permissionssql serversql-server-2008

I have 2 Windows 2012 virtual machines set up in Virtualbox – one called "AppServer" where I'll be installing applications, and another called "DatabaseServer" – where the application databases will be stored, using SQL Server 2008.

I'm running some install files on the application server to create a corresponding database on the database server, but it is just hanging, most likely due to permissions.

The VMs are connected using the Internal Network function of Virtualbox, and they can successfully ping each other.

How do i set up permissions on the database server to allow accounts from the application server to create databases, etc. on it?

Best Answer

Unfortunately using application pool identities between two different servers is not possible. App Pool identities are located on their host machines only - SQL server will be unaware of the application pool accounts - so you cannot add them explicitly to logon to the SQL server. They do however run as the Local Machine account over the network - in a domain environment you could give the application server's machine account permissions to the SQL server.

If you have a domain they could be joined to you could run the application pools under a domain identity; granting the domain account access to the SQL server.

This is my preferred method for a dev environment: Enable the "Local Account Token Filter Policy" using group policy. Cross create your accounts on both servers with same username/passwords. Run the application pools under the created accounts; you can grant the same account access on the SQL server; since the account exists on both servers you shouldn't have any issues.