views:

29

answers:

1

The snapshot says is it all - I used to be able to attach a database, but after i detached today then tried to attach, i kept getting this error:

http://img197.imageshack.us/img197/2574/attacht.jpg

http://img197.imageshack.us/img197/2574/attacht.jpg

+3  A: 

Error 5 means Access Denied. The account running SQL Server has no access to the file GMATech.mdf. Grant the necessary rights:

cacls "c:\Program...\GMATech.mdf" /E /G SQLServerMSSQLUser$<hostname>$<instancename>:F

where hostname is the name of the mahcine running SQL and instancename is the name of the SQL instance (MSSQLSERVER for default instance).

Remus Rusanu