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
unzipping multiple zips to multiple folders in a batch file
Save attachment to Disk from Linux/Postfix
Sync multiple subforms
What could cause the amount of time to save a file go from 1 second to 20 seconds, every day starting at 1pm?
os.system and shell aliases
Offline files behaviour
Running g++ on AIX 5.2.0.0
Positioning dynamic text fields in a 9-slice movie clip [example attached]
Installing Exchange 2003 on new hardware in an existing Exchange 2000 envoinrment
Current Recordset does not support bookmarks