Results 1 to 5 of 5

Thread: T Log backup

  1. #1
    Join Date
    Jul 2003
    Posts
    23

    T Log backup

    If i restrict the size of trans. log to say, 3o MB , then how do i schedule its backup inorder to prevent getting the error "LOG FULL"

  2. #2
    Join Date
    Jan 2003
    Location
    UK
    Posts
    277
    Use a performance counter to monitor it. When it is say 80% full then back it up which will empty most if not all of it out.

  3. #3
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Create a performance condition alert using SQLServeratabases - Log File Used Size counter reaches 80% of your file size, and go to response tab, create a new job that backs up transaction log and define it as a response.

  4. #4
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    1. do checkpoint and backup the log often. (with NO_LOG)

    or

    2. change the recovery mode to simple

    or

    3. follow skhanal's and knookie's advice

    or

    4. dont restrict the log size.

  5. #5
    Join Date
    Aug 2003
    Location
    Naples, FL
    Posts
    6
    Try this, plated with a little but it works

    create procedure mylog @dbname varchar(50)
    as
    declare @logspace int
    truncate table tempdb..logspace
    insert tempdb..logspace (dbname,logsize,percentused,status)
    execute('dbcc perflog')
    set @logspace = (select percentused from tempdb..logspace where dbname = @dbname)
    print @logspace
    if @logspace > 50
    backup log northwind with truncate_only
    else
    return

    This will run a backup log with truncate if your percentage used is over 50%.

    HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •