I'm using Windows Server 2003 to run a server application which utilizes SQL Express 2008. I'm also using Windows Terminal Services to host a bunch of thin clients, so I've had no need for active directory domain server and other stuff like that.
Now I have "small" problem regarding logging in to the SQL Server. Only the Administrator account can do this, even if I give my other (test) user administrator privileges by adding him to the Administrators group.
This is the error received: Cannot attach db file to database [Client 127.0.0.1]
开发者_运维问答I've already checked that the filepath is accessible by the user in question, and like I said, this works perfectly fine for the administrator user.
What account is the SQL Server itself running under? Often it may be running under a domain service account, and it may not have permission to certain folders. Also, the C: drive has progressively become more locked down in Windows with regard to SQL Server database files.
Seems I found the answer. Using SQL Management Studio i gave the "Users" group sysadmin permission for the database, now everything works as expected.
精彩评论