I have an SQL Express 2008 R2 instance running under the "Local System" account. I have written a windows service that also runs under the "Local System" account. The windows service uses the following connection string to connect to the sql server.
Data Source=.\sqlexpress;Initial Catalog=mydatabase;Integrated Security=True
When the application is installed I create the database with a simple SQL script which does not set any permissions or roles...it just creates the database and tables.
How does my windows service running as "Local System" manage to access the database? What rights is it getting in the SQL database? How is it getting these rights?
Andrew
If you expand the tree on the left (Object Explorer) in SSMS to Security, then Logins, you will see "NT AUTHORITY\SYSTEM". By default provisioning after installing SQL Server 2008 R2 Express, this account is added to the sysadmin role.
FYI - Your service running as Local System + Integrated Security means it is authenticating with SQL Server as the Windows account NT AUTHORITY\SYSTEM.
http://msdn.microsoft.com/en-us/library/ms188659.aspx
sysadmin Members of the sysadmin fixed server role can perform any activity in the server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With