Home Forums SQL Server 2005 T-SQL (SS2K5) delete records in sql without entry in transaction log RE: delete records in sql without entry in transaction log

  • Hi Danky,

    I think in your case the problem is that you're deleting all records in a single delete statement. SQL treats is as a single transaction and it's logged all together.

    If your database is (or can be set) in simple recovery model you can try to split the deletion in smaller transactions. One way would be to use "set rowcount " to limit the number of records affected by a single statement execution. Then you run the statement over and over again until all the records are gone. You can check for @@rowcount=0 to see if there are no more records being deleted. Transaction log will be automatically truncated after each run.