views:

71

answers:

2

Hello, Stackoverflow!

I'm new to SQL. I have created a new database in SQL Server Management Studio, and am now trying to attach it to a windows forms project in Visual Studio via the built in Data Configuration Wizard.

Currently, whenever I try to attach the database file, I get a permissions error:

"You don't have permission to open this file. Contact file owner or administrator to obtain permission"

So, simple question -- how do I modify the permissions of my database to allow this?

A: 

Running Visual Studio "as Administrator" appears to have solved this.

Raven Dreamer
A: 

If you are using SQL 2008 most likely you need to set your windows user account as an adminstrator for SQL. This is done either when installing it or maybe using the SQL Server Installation Center. This was most likely done incorrectly when you installed SQL server on your machine. You running it as adminstrator is showing to me this exactly as I have no need to do so on either my Vista or W7 machines with a properly configured SQL 2008 server.

Tim Meers