Log files ate the server

  • A consultant visited our developers last month and updated a database that they were testing. It is on a development server. In the process the consultant stopped services including SQL Services agent and all backups. They did not re-instate any backups.

    I have discovered this, started the services again and have reinstated the backups. We now need to shrink the physical size of the log files which have eaten the server.

    One technique we used in SQL 2000 was to take the database off line,detach it, delete the log and then re-attach the database. A new log file was created and the space retrieved.

    I have found the command dbcc shrinkfile and wonder if this is a more appropriate technique in SQL 2005.

    Any advice would be gratefully recieved

    Madame Artois

  • Yes

    It works as follows

    The unit of the size reduction is the virtual log file. For example, if you have a 600 megabyte (MB) log file that has been divided into six 100 MB virtual logs, the size of the log file can only be reduced in 100 MB increments. The file size can be reduced to sizes such as 500 MB or 400 MB, but the file cannot be reduced to sizes such as 433 MB or 525 MB.

Viewing 2 posts - 1 through 1 (of 1 total)

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