Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Recovery mode full and not writing to log file

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2010-01-04 : 17:03:25
if i have a db that it's recovery mode set to full,
is there a way that when i run a certin Stored Procedure,
the insert/update and so on will not be written to the log file?

Thanks
Peleg

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-01-04 : 17:10:24
Is that was has happened or is that what you would like?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-01-04 : 17:50:17
peleg, I don't think you understand what the log file is or what it's purpose is.

the short answer is "no, not possible."

the longer answer is that ALL updates and inserts occur first in memory, then are written to the log file, then eventually to the data file (assuming they succeed and the server doesn't crash b4 it gets written).

if you are inserting a very large amount of data, and you want to keep log file growth down, try changing the recovery model to bulk=logged or simple b4 performing the insert.

do a search on recovery models and bulk logged operations
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-01-05 : 02:07:28
All data modification operations in SQL are logged, regardless of recovery model. There is no way to change this.

If it were possible to do an unlogged operation then, should that operation fail, the database would have to be marked suspect. Since that's not usually what people what when they ask for unlogged operations, what exactly do you want?

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -