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
FrederikBonteAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.