Script through which we cannot store data into ldf file

  • Query:I delete a table in sql server 2008,and,i do not want this entry to go to our ldf(log files).In this way,my purpose is that,the size of ldf should remain constant.

    Requirement:Now I want a script through which I can make the above feature, available in my procedures.

    NOTE:Please don't answer out that the above feature can be made available by recovery models.I want a script in this regard.

  • ajay6789 (12/24/2012)


    Query:I delete a table in sql server 2008,and,i do not want this entry to go to our ldf(log files).In this way,my purpose is that,the size of ldf should remain constant.

    Requirement:Now I want a script through which I can make the above feature, available in my procedures.

    NOTE:Please don't answer out that the above feature can be made available by recovery models.I want a script in this regard.

    Not possible.

    All transactions in a database are logged (one way or another). That's kinda the core functionality of the database system. You could truncate the table -- which logs the pages that get deallocated. See this thread: http://www.sqlservercentral.com/Forums/Topic648742-338-1.aspx

    Rob

  • Transaction log is a critical component of the database system, if there is a system failure, the transaction log might be required to bring back the database to a consistent state.

    Every transaction which is made in the database is logged in the transaction log for recovery/rollback purpose. So, it is not possible to stop logging any specific transaction(s).

    You can truncate the table instead of deleting the rows, truncate operation is minimally logged when compared to delete operation. This helps you keeping your Tlog size small.

    Regards,
    Ravi.

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

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