• I agree with others who've posted that this approach, as listed, is bad practice.

    Instead, I would direct readers to the links below, which explain how to shrink a log file in stages after deciding (1) that it is unavoidable and (2) that it will be done not automatically but as part of a careful and approved change request. As I understand it, this kind of log management should be a last resort for a situation where the log file or disk space usage is out of control, and a stopgap measure is needed. Otherwise, the log file size needs to be planned as carefully as possible ahead of time, including growth increments, and never made part of a continuous shrink plan.

    http://www.sqlservercentral.com/Forums/Topic617680-146-1.aspx

    http://www.sqlservercentral.com/Forums/Attachment1915.aspx

    Good luck,

    webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html