Unix Technical Forum

delete database file on server -> sharing violation

This is a discussion on delete database file on server -> sharing violation within the SQL Server forums, part of the Microsoft SQL Server category; --> On Oct 17, 5:05 pm, bdbafh <bdb...@gmail.com> wrote: > pearl...@hotmail.com wrote: > > Hi, > > > I have ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 03-01-2008, 03:43 PM
pearl146@hotmail.com
 
Posts: n/a
Default Re: delete database file on server -> sharing violation

On Oct 17, 5:05 pm, bdbafh <bdb...@gmail.com> wrote:
> pearl...@hotmail.com wrote:
> > Hi,

>
> > I have some database files (.MDF, .LDF,...) on the server. When I try
> > to delete them, the warning "Cannot delete file: There has been a
> > sharing violation. The source or destination file may be in use."
> > appears.

>
> > Since I am new to the environment I don't know where the files come
> > from and where they might be used.

>
> > Can anybody tell me what to do to delete those files?

>
> > Thank you.

>
> If you were running on Linux, the operating system would dutifully
> obey your command.
> The files would remain accessible to existing processes which already
> had handles.
> After the last handle on the file(s) has been released, the file(s)
> would no longer exist.
>
> Be glad that the OS that you are using has training wheels.
>
> There are utilities from SysInternals (since acquired by Microsoft)
> for locating processes holding handles on files. Handle.exe would be
> one, process monitor is another.
>
> try here:http://www.microsoft.com/technet/sys...andthreadsutil...
>
> You have backups of the databases of interest on this server, right?
>
> hth.
>
> -bdbafh


I don't know if there are backups.

Thanks, I will try Handle.exe.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 03-01-2008, 03:43 PM
Erland Sommarskog
 
Posts: n/a
Default Re: delete database file on server -> sharing violation

(pearl146@hotmail.com) writes:
> I don't know if there are backups.
>
> Thanks, I will try Handle.exe.


But that is the wrong way. The right way is to drop the databases. But
since you very clearly don't know what you are doing, you should not do,
not matter what your boss tells you. The risk is too big that you delete
the wrong file and cause a disaster.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 03-01-2008, 03:43 PM
Greg D. Moore \(Strider\)
 
Posts: n/a
Default Re: delete database file on server -> sharing violation

"DA Morgan" <damorgan@psoug.org> wrote in message
news:1192650569.162054@bubbleator.drizzle.com...
>
> Given that this is Windows reboot the machine. Then delete the files.


And what exactly is that supposed to do other than waste the poster's time?


> --
> Daniel A. Morgan
> University of Washington
> damorgan@x.washington.edu (replace x with u to respond)
> Puget Sound Oracle Users Group
> www.psoug.org




--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 03-01-2008, 03:43 PM
daoudamjad@emailmiser.com
 
Posts: n/a
Default Re: delete database file on server -> sharing violation

On Oct 17, 9:49 pm, DA Morgan <damor...@psoug.org> wrote:
> pearl...@hotmail.com wrote:
> > Hi,

>
> > I have some database files (.MDF, .LDF,...) on the server. When I try
> > to delete them, the warning "Cannot delete file: There has been a
> > sharing violation. The source or destination file may be in use."
> > appears.

>
> > Since I am new to the environment I don't know where the files come
> > from and where they might be used.

>
> > Can anybody tell me what to do to delete those files?

>
> > Thank you.

>
> Oracle is not a Microsoft product.
>
> Given that this is Windows reboot the machine. Then delete the files.
> --
> Daniel A. Morgan
> University of Washington
> damor...@x.washington.edu (replace x with u to respond)
> Puget Sound Oracle Users Groupwww.psoug.org


Rainbow Tables for CAIN:

- only for system account
- up to 8 characters passwords;
- 100 torrent files;
- Total: 625 MB* 100;
- success rate 100%
- Maximum crack time: 5 seconds for each file; check CAIN for
details;
- generated by winrtgen


parameters are given below:


oracle_oracle#1-8_0_2400x40000000_system#000.rt
oracle_oracle#1-8_0_2400x40000000_system#001.rt
oracle_oracle#1-8_0_2400x40000000_system#002.rt
............................
oracle_oracle#1-8_0_2400x40000000_system#099.rt


email for details, demo, and downloading url's!


(Only system account) oracle hashes challenges are welcome!
please make the payment FIRST!


happy crackin'

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 03-01-2008, 03:43 PM
DA Morgan
 
Posts: n/a
Default Re: delete database file on server -> sharing violation

Greg D. Moore (Strider) wrote:
> "DA Morgan" <damorgan@psoug.org> wrote in message
> news:1192650569.162054@bubbleator.drizzle.com...
>> Given that this is Windows reboot the machine. Then delete the files.

>
> And what exactly is that supposed to do other than waste the poster's time?
>
>
>> --
>> Daniel A. Morgan
>> University of Washington
>> damorgan@x.washington.edu (replace x with u to respond)
>> Puget Sound Oracle Users Group
>> www.psoug.org


Fix the problem. Half the time, with Windows, the correct solution to a
problem is a reboot. This is one of those times.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 03-01-2008, 03:43 PM
Frank van Bortel
 
Posts: n/a
Default Re: delete database file on server -> sharing violation

Erland Sommarskog wrote:
> (pearl146@hotmail.com) writes:
>> I don't know if there are backups.
>>
>> Thanks, I will try Handle.exe.

>
> But that is the wrong way. The right way is to drop the databases.



Would you mind NOT posting that in an Oracle newsgroup?!?


--
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 03-01-2008, 03:43 PM
Greg D. Moore \(Strider\)
 
Posts: n/a
Default Re: delete database file on server -> sharing violation

"DA Morgan" <damorgan@psoug.org> wrote in message
news:1192720293.955947@bubbleator.drizzle.com...
> Greg D. Moore (Strider) wrote:
>> "DA Morgan" <damorgan@psoug.org> wrote in message
>> news:1192650569.162054@bubbleator.drizzle.com...
>>> Given that this is Windows reboot the machine. Then delete the files.

>>
>> And what exactly is that supposed to do other than waste the poster's
>> time?
>>
>>
>>> --
>>> Daniel A. Morgan
>>> University of Washington
>>> damorgan@x.washington.edu (replace x with u to respond)
>>> Puget Sound Oracle Users Group
>>> www.psoug.org

>
> Fix the problem. Half the time, with Windows, the correct solution to a
> problem is a reboot.


Only to those who are clueless.

> This is one of those times.


No, this is clearly one of those times when that would almost certainly NOT
work.


> --
> Daniel A. Morgan
> University of Washington
> damorgan@x.washington.edu (replace x with u to respond)
> Puget Sound Oracle Users Group
> www.psoug.org




--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 03-01-2008, 03:43 PM
Tony Rogerson
 
Posts: n/a
Default Re: delete database file on server -> sharing violation

> Given that this is Windows reboot the machine. Then delete the files.

Totally clueless.

If you don't know then just keep quiet instead of posting totally misleading
advice that may (probably) cause business outage to the OP.

--
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 03-01-2008, 03:43 PM
Tony Rogerson
 
Posts: n/a
Default Re: delete database file on server -> sharing violation

> I have some database files (.MDF, .LDF,...) on the server. When I try
> to delete them, the warning "Cannot delete file: There has been a
> sharing violation. The source or destination file may be in use."
> appears.


these are files associated with a SQL Server database - you need to isolate
the database and if you don't need it anymore then DROP DATABASE it through
SQL Server management tools

--
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 03-01-2008, 03:43 PM
Tony Rogerson
 
Posts: n/a
Default Re: delete database file on server -> sharing violation

If you saw a pan of potatoes cooking on the stove would you lift it up and
put it in the bin?

No, they are in use and as such there is a purpose.

Find out what database these are for, undoubtedly it will be some important
database.

--
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:18 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com