transaction LOG size

  • I have a transaction log with 3 GIGA of size

    and I need to change to 1 GIGA well,

    I try this:

    alter database ITHD

    MODIFY FILE (NAME = 'ITHD_LOG',

    SIZE = 1000 MB)

    GO

    and I'm getting this error:

    MODIFY FILE failed. Specified size is less than current size.

    what should I do to fix that problem?

    thanks

  • If you are using 6.5 I think there is nothing you can do. If 7 there is a script here http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=26 that will shirnk the log, once done with and below 1 gig you can then expand. If using 2000 then in EM you can right click the database, select tasks, select shrink database and then in advance on that specify a size to shirnk the log file to.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • It is SQL 2000 and I did go in EM and right click the database, select tasks, select shrink database and then in advance on that specify a size to shrink the log file to.

    It says sucessfully but nothing happens

    ??????????????

    do you know why??

    thanks

  • You may need to truncate the transaction log. I usually do it this way since I have it as part of a process on a SQL 7 server but there is options on the first shrink database task screen to reorganize and move the data pages to the front which can do it easy for you. Here is what I use as code.

    BACKUP LOG DBNAMEHERE

    WITH TRUNCATE_ONLY

    But you may want to do a TO DISK or TO FILE if you do not have a full backup for safety.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • That one works very well

    thank you very much

Viewing 5 posts - 1 through 4 (of 4 total)

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