Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 error while deleting .mdf File

Author  Topic 

arorarahul.0688
Posting Yak Master

125 Posts

Posted - 2008-04-15 : 07:08:24
can some one please help me to delete a File with extension .mdf, as its continously giving error that file can't be deleted its being used by any other program or user.

Rahul Arora
07 Batch
NCCE Israna,


######################
IMPOSSIBLE = I+M+POSSIBLE

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2008-04-15 : 07:11:14
Why are you trying to delete a database from file manager in the first place?

If you really want to get rid of the database, drop it first.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-04-15 : 07:11:53
You have to stop the SQL Server service that the file belongs to, first.


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-04-15 : 09:32:37
I hope the file is not master.mdf?


elsasoft.org
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2008-04-15 : 11:15:23
I'd make sure you had a backup before attempting to do what your planning on doing. BUT, that's just me!

Terry
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-04-15 : 13:25:14
format c: works great!


_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-15 : 13:41:20
This is just priceless.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2008-04-15 : 15:44:06
Couldn't agree more Tara. Great response spirit1!! You know, one of these fine OPs is actually going to use a suggestion like that someday and wonder what exactly they did wrong. "I was simply following your advice...and now I can't access my data. Can you help?"

Terry
Go to Top of Page

Haywood
Posting Yak Master

221 Posts

Posted - 2008-04-15 : 16:40:38
<90°-OT>

I used to work with a guy at an ISP who would get people to format thier boot drives, because we (tech suppt.) had spent enough time already trying to get them connected and the issue had to be with the o/s.

It'd never fail, that, after he gave instructions on how to format the boot drive, they would call up and not have install media or something-other that prevented them from re-installing the o/s - usually to the sound of us laughing like hyenas.

His response was "Bring in the machine, and for $40, we'll re-install the o/s and make sure that it connects to the internet when you leave". We made more money at $40/pop than we did on $20/month dialup accounts....

Some days, I really miss that job. :)

</OT>
Go to Top of Page
   

- Advertisement -