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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| (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 |
| |||
| "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 |
| |||
| 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' |
| |||
| 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 |
| |||
| 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... |
| |||
| "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 |
| |||
| > 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] |
| |||
| > 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] |
| ||||
| 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] |