delete old data and log files

  • I see our log drive almost full.And I see there is an old log file named ITSM_old, I think that is the old copy of database log file, I checked in SSMS there is no database bound to this log file. But when I tried to delete either the database fil or the log file, I got an error: disk either is write protected or access denied. Why is that, how can I delete it?

    Thanks

  • I have to go with the obvious first, did you look at the properties of the file?

    Chris Powell

    George: You're kidding.
    Elroy: Nope.
    George: Then lie to me and say you're kidding.

  • I checked the propery, there is no check box on read-only.Where else should I check?

    Thanks

  • Do you have a 2nd instance of sql server running (or sql express).

    Also keep in mind that the filename and db name can be different. So maybe it's not really "old" and unused.

  • I am not aware of another instance existing on the server.

    How can I find out that?

    I did check in our program drive there is only one folder called MSSQL.1, no other MSSQL.number, does it mean there is only one instance?

    And I did check each database and their physical file name, no database connected to it, I also checked in activity monitor and also did a SP_WHO2, there are not process connected to the file.

    What else could I check?

    Thanks

  • You can go in the list of services to find a second instance.

    Next on the list is output the list of physical files for the dbs and see if it comes out.

  • When you say the list, do you mean it is from sql server configuration manager, I can see only one sql server instance (MSSQLServer) running.

    What else could I check?

    Thank you

  • Windows admin tools, services.

  • Double check the the files are not located in the sys.master_files - if not, then restart SQL Server and see if that takes care of it.

    Chris Powell

    George: You're kidding.
    Elroy: Nope.
    George: Then lie to me and say you're kidding.

  • Thank you, it's not.

    I will do a restart. By the way, is there other useful queries for DBA using select .. from sys.?

    Thanks

  • I figured out with a windows guy.

    When I right click the file, only one person is shown on the list- old dba has full control to that file. No one else can.

    Not why it was setup like that, then I added administrators to full control, and then I can delete it.

    Thanks

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply