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
Accidentally "rm -r /etc". How to recover?
Outlook Express issue
Error "The text, ntext, and image data types cannot be used"...
Sysvol Replication
after sp2 update for my sbs 2003 i can not connect to the server by RDP
Unkown error 0x80040119 While sending/receiving
MAPI Error: Exceeded Maximum of 32 objects of type "Session"
Sybase Stored Procedure Performance
Partition in Sybase for record insertion & select query
How can I list the privileges assigned to a user in Oracle 10g?