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
Remove all non-integers from a cell in Excel
invalid argument error prevents logging into web page in Internet Explorer
How do i create a new GAL in MS exchange 2007??
Get the process id and exe filename and path of an active window in XP
How do I delete a Mailbox in Exchange 2003
Range of records
Bulk updates in SYBASE using Java Batch Updates
OS X 3.3.4 losing file association
Issue with "Active Directory Users and Computers" client, with non Domain administrator
SMTP internal mail stuck in Queue; External mail delivers...