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 18, 4:42 am, "Greg D. Moore \(Strider\)" <mooregr_deletet...@greenms.com> wrote: > "DA Morgan" <damor...@psoug.org> wrote in message > ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Oct 18, 4:42 am, "Greg D. Moore \(Strider\)" <mooregr_deletet...@greenms.com> wrote: > "DA Morgan" <damor...@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? Well, I would hope most chefs consider flies something to be deleted, unless maybe they're trying to get in the new Michelin Guide for Frogs. So, why was it this was posted to cdos? jg -- @home.com is bogus. "KRMTLGS" - vanity plate, couldn't see if driver was green. http://www.amazon.com/Michelin-Guide.../dp/2067129902 |
| |||
| DA Morgan (damorgan@psoug.org) writes: > Fix the problem. Half the time, with Windows, the correct solution to a > problem is a reboot. This is one of those times. Maybe. If SQL Server is not set to auto-start it will work, in so far that you will get rid of the files. But since the databases will still be in master.sys.databases, it's not a very pretty solution. And in most cases, SQL Server is set to auto-start, in which case rebooting the box is not going to help at all. But your answer is interesting. I take it that to get rid of database files with Oracle, DROP DATABASE is not the way to go, or at least it is not sufficient. But do you really have to reboot to get Oracle to let go of the files? -- 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 |
| |||
| On Thu, 18 Oct 2007 19:35:59 +0100, "Tony Rogerson" <tonyrogerson@torver.net> wrote: > >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. It was crossposted to an Oracle Usenet group, was it. By the way, if you are such an eminent sqlserver guru why don't you just post the correct answer instead of this useless flame? Could it be you don't know the correct answer? Why sqlserver 'gurus' promote sqlserver by flaming Oracle users? Is this the most recent Microsoft sqlserver promotion campaign, or is this just the personal lack of ethics of an arrogant self-apporinted sqlserver 'guru'? Because on the other hand Oracle users aren't visiting sqlserver Usenet groups to bash sqlserver! -- Sybrand Bakker Senior Oracle DBA |
| |||
| On Thu, 18 Oct 2007 13:25:45 -0400, "Greg D. Moore \(Strider\)" <mooregr_deleteth1s@greenms.com> wrote: >No, this is clearly one of those times when that would almost certainly NOT >work. If it doesn't work, acknowledging the OP crossposted this to a sqlserver AND an Oracle forum. why flame an Oracle DBA instead of posting the correct response? Because you don't know the correct response? -- Sybrand Bakker Senior Oracle DBA |
| |||
| On Thu, 18 Oct 2007 21:15:21 +0000 (UTC), Erland Sommarskog <esquel@sommarskog.se> wrote: >But your answer is interesting. I take it that to get rid of database >files with Oracle, DROP DATABASE is not the way to go, or at least it is >not sufficient. But do you really have to reboot to get Oracle to let go >of the files? Unix (you know the OS people blinded by Microsoft know nothing about) will keep the inode of the file open, even if you deleted the file. -- Sybrand Bakker Senior Oracle DBA |
| |||
| Tony Rogerson wrote: >> Given that this is Windows reboot the machine. Then delete the files. > > Totally clueless. I don't see you offering a solution to the original poster. Go ahead ... here's your chance ... if you don't like my answer then by all means tell everyone, including the person asking for help how to solve the problem. I've never seen a Windows problem yet solved by cross-posting to an irrelevant usenet group followed up with an insult. If you have a solution ... why are you incapable of posting it? -- Daniel A. Morgan University of Washington damorgan@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org |
| |||
| DA Morgan wrote: > Tony Rogerson wrote: >>> Given that this is Windows reboot the machine. Then delete the files. >> >> Totally clueless. > > I don't see you offering a solution to the original poster. > > Go ahead ... here's your chance ... if you don't like my answer then > by all means tell everyone, including the person asking for help how > to solve the problem. > > I've never seen a Windows problem yet solved by cross-posting to an > irrelevant usenet group followed up with an insult. > > If you have a solution ... why are you incapable of posting it? He probably chose not to post it, because a couple of adequate solutions have already been posted. However, they've been a bit scattered and lacking context, so here's a comprehensive answer: The files are presumably in use by MS SQL. They may or may not be needed by the users. If not, then you can get rid of them in any of the following ways: 1) SQL CHUI (Query Analyzer or Enterprise Manager for SQL 2000, Management Studio for SQL 2005) - execute a DROP DATABASE command, e.g. DROP DATABASE foobar This requires knowing the name of the database, which is usually identical or at least similar to the filenames, e.g. database foobar may have filenames foobar.mdf and foobar.ldf 2) SQL GUI (Enterprise Manager or Management Studio) - find the database in the Explorer-style tree on the left, right-click and select "Delete Database". This deletes the physical files. Detaching the database (via CHUI or GUI) does not delete the physical files, but makes SQL forget about the database until/unless you re-attach them. You can then delete the physical files in the usual fashion, which accomplishes the same as the above, but in a more roundabout fashion. You can also delete the physical files in the usual fashion while the SQL service is stopped (or before it starts). Rebooting is insufficient if the service auto-starts. In addition, SQL will complain about the files being missing; this probably won't interfere with its other databases, but why do it the messy way when the clean way is easier? |
| |||
| > By the way, if you are such an eminent sqlserver guru why don't you > just post the correct answer instead of this useless flame? > Could it be you don't know the correct answer? I replied in the ms-sqlserver group and gave the correct reply to the OP instead of this useless unprofessional diatribe. -- 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 don't see you offering a solution to the original poster. I posted the answer in the ms-sqlserver group where it belonged - go check. FYI LDF/MDF's are related to the databases on a SQL Server instance and as such he obviously has SQL Server running and a database using those files that is online. To solve the problem drop the database - there, wasn;t difficult being polite was it. A bit far from a reboot / warm start the OS which woudl do absolutely nothing except ccost the OP's business outage while the box reboots and things come back online, and he would still have the problem. -- 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] |
| ||||
| On 18 Okt., 18:23, sybra...@hccnet.nl wrote: > On Thu, 18 Oct 2007 19:35:59 +0100, "Tony Rogerson" > > <tonyroger...@torver.net> wrote: > > >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. > > It was crossposted to an Oracle Usenet group, was it. > By the way, if you are such an eminent sqlserver guru why don't you > just post the correct answer instead of this useless flame? > Could it be you don't know the correct answer? > > Why sqlserver 'gurus' promote sqlserver by flaming Oracle users? > Is this the most recent Microsoft sqlserver promotion campaign, or is > this just the personal lack of ethics of an arrogant self-apporinted > sqlserver 'guru'? > Because on the other hand Oracle users aren't visiting sqlserver > Usenet groups to bash sqlserver! > > -- > Sybrand Bakker > Senior Oracle DBA Thank you all for the various suggestions. I decided not to delete the files. And I am sorry for having posted my question in the oracle forum but I just hoped someone at all could help me. Regards Pearl |