vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| pearl146@hotmail.com wrote: > 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? Assuming this is MS SQL (I don't know what extensions Oracle uses), you need to detach the database from SQL. Can be done via GUI or CHUI. For a GUI, use Enterprise Manager (SQL 2000) or Management Studio (2005). |
| |||
| pearl146@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 damorgan@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org |
| |||
| see sqlservr.exe <pearl146@hotmail.com> a écrit dans le message de news: 1192646183.822289.234660@e34g2000pro.googlegroups. com... > 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. > |
| |||
| On Oct 17, 3:02 pm, Ed Murphy <emurph...@socal.rr.com> wrote: > pearl...@hotmail.com wrote: > > 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? > > Assuming this is MS SQL (I don't know what extensions Oracle uses), you > need to detach the database from SQL. Can be done via GUI or CHUI. For > a GUI, use Enterprise Manager (SQL 2000) or Management Studio (2005). Thanks Ed, but what do I need to do in Enterprise Manager? How can I delete the file from there? |
| |||
| On Oct 17, 1:36 pm, pearl...@hotmail.com wrote: > Hi, > > I have some database files ... on the server. When I try > to delete them. . . > > Since I am new to the environment I don't know where the files come > from and where they might be used. > <snip> 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 . . . . |
| |||
| 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...s/default.mspx http://www.microsoft.com/technet/sys...t.svl=featured You have backups of the databases of interest on this server, right? hth. -bdbafh |
| |||
| On Oct 17, 4:22 pm, EdStevens <quetico_...@yahoo.com> wrote: > On Oct 17, 1:36 pm, pearl...@hotmail.com wrote:> Hi, > > > I have some database files ... on the server. When I try > > to delete them. . . > > > Since I am new to the environment I don't know where the files come > > from and where they might be used. > > <snip> > > 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. |
| |||
| pearl146@hotmail.com wrote: > On Oct 17, 3:02 pm, Ed Murphy <emurph...@socal.rr.com> wrote: >> pearl...@hotmail.com wrote: >>> 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? >> Assuming this is MS SQL (I don't know what extensions Oracle uses), you >> need to detach the database from SQL. Can be done via GUI or CHUI. For >> a GUI, use Enterprise Manager (SQL 2000) or Management Studio (2005). > > Thanks Ed, > but what do I need to do in Enterprise Manager? How can I delete the > file from there? Find the database on the left-hand side, generally like so: Console Root + Microsoft SQL Servers + SQL Server Group + (name of database server) + Databases + (name of database) then right-click on the database -> All Tasks -> Detach Database What is your company using SQL for? Is there anyone else there who is familiar with it? |
| ||||
| pearl146@hotmail.com wrote: > On Oct 17, 4:22 pm, EdStevens <quetico_...@yahoo.com> wrote: >> 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. |