December 8, 2005 at 9:41 am
Hello, I have a huge issue and I need help URGENT !!!
I imported a sp that calculates alot of things, it has more than 9000 lines of code. Before I had it in my server the database log file wasnt bigger than 2 mb, now I has reached 80 gb size !!!
I need this procedure to report some data, but the space will kill my server eventually, so I need help in shrinking the log file every day after the procedure has run, how can I do this?
Thanks and regards, AC.
December 8, 2005 at 1:57 pm
Get rid of that procedure.
Look on UPDATES and INSERTs inside of it. It must be lack of WHERE in those statements.
If you need some degug information create dedicated table dbo.tmp_ThisF<..>gSP_debug and record results of every step into it. Including error code = @@Error and number of affected rows = @@Rowcount.
Don't forgert to drop and recreate the table at the begin of the SP.
_____________
Code for TallyGenerator
December 9, 2005 at 2:24 pm
WHat is your database recovery mode ? Are you executing a maintenace plan against the database ?
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
December 13, 2005 at 8:09 am
Yes, every day, but I havent found a way to reduce the log file.
December 13, 2005 at 7:27 pm
Try to find out what's causing such a big number of records in log file.
Type in Query Analizer EXECUTE <your SP name here>
and press CTRL+L.
It will show you estimated execution plan.
Find out most "fat" lines and try to figure out if you can modify related statements to reduce number of affected rows.
_____________
Code for TallyGenerator
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply