SQL Server Performance

Log with sql stmts

Discussion in 'SQL Server 2005 General Developer Questions' started by isa, Apr 26, 2008.

  1. isa New Member

    Hello everyone, is there any SQL stmt to access log? Can i go into log file just as we go in MDF file "select , delete from xyz..... "
    As i want to delete the last 7 days log so is there any way to do this with the sql stmt, as with the help of sql stmt we can shrink the log but if i want to delete the last 7 days log by using sql stmts than how can i do this without using the Job Schedulers ?
    Thanx in Advance.
  2. madhuottapalam New Member

  3. Luis Martin Moderator

    Take a look of ours sponsors. They have tools for that.
  4. satya Moderator

    The main issue here is either you don't have the regular Transaction log backups or any update/insert scripts performed against huge number of rows, may be you will be thinking that keeping the DATABASE in SIMPLE mode would take care of such actions, but it is not.
    You must have adopted a nominal size to the transaction log file and perform regular backups, in case if you need not worry about point in time recovery then keep it SIMPLE mode then perform regular backups, atleast once in 4 hours.
    As referred by Madhu go through the links that will help you to understand what it is with, also I promote my blog http://sqlserver-qa.net/blogs/tools/archive/tags/transaction log/default.aspx in this regard.

Share This Page