Need help deleting a second log file.

  • Hi All,

    I aquired a SQL Server database from another department and somehow someone had a second log file attached to this database. Does anyone know how to get rid of the second log file? I have scrunk it to .13 mb and can not get it any smaller and it will not let me delete it until it is empty. The other one has .5 mb in it and that is as small as I can get it! Any help would be greatly appreciated . . .

    Rick

  • Hi,

    try this:

    use "database"

    go

    DBCC SHRINKFILE

    ( "logfilename" , EMPTYFILE )

    go

    alter database "databasename" remove file "logfilename"

    go

    regards

  • YOU ARE THE MAN!!! THAT DID THE TRICK, WITHA BACKUP AFTER THE LAST STEP!!! THANKS SO MUCH 😛

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

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