• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1475
  • Last Modified:

transaction log disable

Hi, is it possible to disable the transaction log, so that if I delete a whole pack of records he doesn't write transctions. I don't need them, I have a backup, and they take way to much space. Thx in advance
0
FrederikBonte
Asked:
FrederikBonte
1 Solution
 
david_levineCommented:
If you can delete all records in the table, using TRUNCATE.

Otherwise, you can either delete all records in a batch which would require log space, or delete them in sets of say 5000 records. If you set Truncate Log on Checkpoint, after each batch of 5000 records, the log will truncate and you can then re-run the next 5000.

There is no way to turn off logging though.

David
0
 
FrederikBonteAuthor Commented:
I'm sorry but I have to delete a lot of records, and while doing that my transaction log gets full and the query stops. I can not delete the data in little pieces, thats not acceptable. Are you sure I can not reduce or stop the transaction log on a certain query
0
 
david_levineCommented:
Nope - no way to do stop the transaction log.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Gandalf32Commented:
I agree with david_levine. It cannot be stopped, because in SQL server all operations are atomic. This means that an operation either completes in full, or is cancelled in full. For this to work, the server has to keep the transaction log at least for the duration of the operation.
0
 
mingweiCommented:
Hi FrederikBonte
  If you want to stop log,you can do this below:
  SQL Enterprise Manager->YourDatabase->Edit->Options->Truncate log on checkpoint
Be sure the chose Truncate log on checkpoint checkbox,then you will not worry about your log again.
This chose truncate your log after checkpoint,so it will not take your space now.
Hope it will help you!

0
 
david_levineCommented:
mingwei,

The answer you gave is one that I suggested in my initial answer. It's not acceptable to FrederikBonte because he wants to process the entire unit of work and his transaction log space isn't large enough to do that.

David
0
 
mingweiCommented:
david levine,
The automatic checkpoint interval is calculated by SQL Server on the basis of system activity and the recovery interval value in the syscurconfigs system table. The recovery interval determines checkpoint frequency by specifying the amount of time it should take the system to recover. Reset this value by executing the sp_configure system stored procedure and the RECONFIGURE statement.-----from Books Online.
So,I think checkpoint frequency is not care about your work.


Mingwei
0
 
david_levineCommented:
Mingwei,

Truncate log on Checkpoint might do what you wrote, but it only truncates back until the first open transaction it hits. And since his 1 SQL statement is 1 logical unit of work, and is not completed, it's an open transaction and nothing will be truncated.

David
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now