Microsoft
Software
Hardware
Network
Question : SQL Server Detach/Attach database problem
I have a SQL 2005 database that is located on the F:\ drive of a specific database server. I detached the database in SSMS. During the detach it stated there were 2 connections. I selected the check box to drop connections in the detach wizard. Now when I try to use the attach wizard to attach back to sql server I am receiving the following error:
CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'F:\{DataPath}\{DataFile}.
mdf'. (Microsoft SQL Server, Error: 5123)
The database is in the same location with the same name, no changes have occurred but something still has a hold on the files. I am logged into the server as domain admin and that account has sysadmin permissions to the database server. The SQL Service runs under the same domain admin account.
I have tried restarting the SQL service and rebooting the server but nothing seems to resolve. I tried to rename the mdf file and I receive access denied, like something else has ahold of it. I can rename other files in that same folder fine though.
Any help is greatly appreciated.
Answer : SQL Server Detach/Attach database problem
Go to the file's properties and check for the permission it has...
Add a Everyone to it and try again..
Random Solutions
Bold, Underline and array
Could not find row in sysindexes for database ID 7, object ID 1, Run DBCC CHECKTABLE on sysindexes.
Windows XP Pro Screensaver does not run.
Replace New Page Character in multiple text files - want something I can schedule
Windows has blocked access to these files to help to protect your computer ...
How to create Batch File to Add Entires to Host File?
msxml3.dll is not able to be registered
Correcting a blurred image in Photoshop
Integrating a WordPress blog into a Website
Expired OWA certificate