473,788 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

delete database file on server -> sharing violation

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.

Oct 17 '07
36 5109
pe******@hotmai l.com wrote:
On Oct 17, 4:22 pm, EdStevens <quetico_...@ya hoo.comwrote:
>Let's see, you have files that you don't know where they come from,
you don't know where they might be used, and yet you are still trying
to delete them . . . .

Yes, because my chef wants me to delete them and I don't know how.
At some moment during this operation you might have had an inkling it is
not a good idea to delete files that are apparently in use. You might
consider discussing this with your chef: is it sound approach to just do
away with files even when they are being used?

Regards,

Ruud de Koter.

PS. I am from a very liberal culture, nobody will be surprised if I
question my chef's ideas. I know it doesn't work that way everywhere,
but in cases like this it seems worth the trouble.
Oct 17 '07 #11
(pe******@hotma il.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, es****@sommarsk og.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
Oct 17 '07 #12
"DA Morgan" <da******@psoug .orgwrote in message
news:11******** *******@bubblea tor.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
da******@x.wash ington.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
Oct 18 '07 #13
On Oct 17, 9:49 pm, DA Morgan <damor...@psoug .orgwrote:
pearl...@hotmai l.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.wash ington.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_2400x400000 00_system#000.r t
oracle_oracle#1-8_0_2400x400000 00_system#001.r t
oracle_oracle#1-8_0_2400x400000 00_system#002.r t
............... .............
oracle_oracle#1-8_0_2400x400000 00_system#099.r t
email for details, demo, and downloading url's!
(Only system account) oracle hashes challenges are welcome!
please make the payment FIRST!
happy crackin'

Oct 18 '07 #14
Greg D. Moore (Strider) wrote:
"DA Morgan" <da******@psoug .orgwrote in message
news:11******** *******@bubblea tor.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
da******@x.wash ington.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
da******@x.wash ington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Oct 18 '07 #15
Erland Sommarskog wrote:
(pe******@hotma il.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...
Oct 18 '07 #16
"DA Morgan" <da******@psoug .orgwrote in message
news:11******** *******@bubblea tor.drizzle.com ...
Greg D. Moore (Strider) wrote:
>"DA Morgan" <da******@psoug .orgwrote in message
news:11******* ********@bubble ator.drizzle.co m...
>>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
da******@x.wash ington.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
da******@x.wash ington.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
Oct 18 '07 #17
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]

Oct 18 '07 #18
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]
Oct 18 '07 #19
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]

Oct 18 '07 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8906
by: Andrew DeFaria | last post by:
I created the following .sql file to demonstrate a problem I'm having. According to the manual: If |ON DELETE CASCADE| is specified, and a row in the parent table is deleted, then InnoDB automatically deletes also all those rows in the child table whose foreign key values are equal to the referenced key value in the parent row. However:
5
13278
by: Raj | last post by:
Hi all, Can anyone help me with a script which would delete files or move them to a different folder at some scheduled time..! Please.....!!! Thanks in advance...
2
8807
by: Ryan | last post by:
I have a table in my database on SQL Server which holds a file name that refers to a file that is stored on the server. I would like to create a trigger to delete this file from the server if the row in the table is deleted. I have been trying to use this command in a trigger (<filename> is the name and path of the file): xp_cmdshell "delete <filename>" If some one could please help I would appreciate it very much. I would love a...
16
17020
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums must be UPDATED, if not, they must be INSERTED. Logically then, I would like to SELECT * FROM <TABLE> WHERE ....<Values entered here>, and then IF FOUND UPDATE <TABLE> SET .... <Values entered here> ELSE INSERT INTO <TABLE> VALUES <Values...
6
2586
by: I am Sam | last post by:
I keep getting this error and I don't know why: The path is too long after being fully qualified. Make sure path is less than 260 characters. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.PathTooLongException: The path is too long
3
2102
by: John Rivers | last post by:
Hello, I think this will apply to alot of web applications: users want the ability to delete a record in table x this record is related to records in other tables and those to others in other tables etc. in other words we must use cascade delete to do
1
2364
by: nasirmajor | last post by:
dear all, Please any urgent help regarding following code. i have the following code ================================================================= public void Delete(Object sender, DataGridCommandEventArgs e) { 1 int Sid2 = (int)l.DataKeys;
6
3859
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called "Generations"), and it allows the user to add, edit and delete the various records of the table. "Generations" table has the following fields: "IDPerson", NamePerson", "AgePerson" and "IDParent". A record contains the information about a person (his name, his...
4
25181
by: Sailor1877 via AccessMonster.com | last post by:
I've been reading all the threads about problems with LDB files but my specific problem doesn't seem to be addressed. I have a back end database on a server that I'm unable to run Compact and Repair on because the LDB file is still present. It tells me it is being used by a user "Admin" on my machine (a fact that is echoed when I open the LDB file in Notepad.) Unfortunately there is no username "Admin" on the network. When I try to...
7
2531
by: marce1972 | last post by:
Hi to all, that's my question I have mysql database and a web page to upload files to my webpage, I know how to delete them from the database, but didnt find the code to delete them from the web server. Please help me with this code. Regards Marcelo Fabiani
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9967
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3674
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.