Hi all,
In a database under Full Recovery option, can I run a DML statement and specify that for just that statement, that I don't want every row logged?
Thanks,
--Jim
You may want to create a script that changes the recovery mode, runs your statement, then changes it back. Of course, all other processes running in parallel will be affected as well.
Unfortunately, there is no way to change the logging options per DML statement, although I think there may be a Connect item already. If you find this Connect item, please post a link so others can vote. If you will not, you can create one.
mrdenny,
I have an Update statement over a table of a bit over 200M rows. I'd rather not have to change the recovery mode from Full (which I believe requires a restart correct?) and then change it back to Full.
I just want to be able to isolate this statement so that: A. It runs faster. and B. The translog and resulting backups of the logs aren't so huge.
In a situation like this, I would recommend that you do your updates in batches. Updating 200M rows is likely to be slow and cause your TLog to explode. Updating in small batches will likely be faster and your TLog will probably grow less (it will still grow).
Take a look here for tips on how to do this: faq183-3141
-George
Microsoft SQL Server MVP My Blogs SQLCop
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.