SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On



how to reduce LOGFILES entry ? Expand / Collapse
Author
Message
Posted Wednesday, February 18, 2009 10:11 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 1:57 AM
Points: 18, Visits: 48

In my database logfiles is incresing very fast.

I am using Shink Command for this.

but some time it Crash the system.

Problem is we had some Activity done

in our application like

by opening the form (in window applicaiton)
we put entry on the table and after closing
the form we delete the entry in the table.
Is there any other way that i can put the entry
in the data base without using hardcode table ?

one thing that table is use by another user
on another system that he get the message that
this form will open.

our system i use by more than 30 user 24 hour so
log files is incresing very much,

any solution for that then please give me.
Post #660043
Posted Wednesday, February 18, 2009 10:49 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 2:20 AM
Points: 1,327, Visits: 3,233
I have to admit that I didn’t understand the part about your application, but there are few remarks about your log file. First of all stop shrinking it. If you shrink it and it grows to its size again, then let it stay at the size that he got. You will gain nothing at all by shrinking it all the time. The second thing is to read about recovery models (you can find details in BOL or just do a search in Google about recovery model SQL server). After you’ll understand what Recovery model is, you’ll have to decide what recovery model to use. If you’ll use simple, then most chances that your log will not grow very much. If you’ll use another recovery model, then most chances that you’ll have to increase the number of log backups.

Adi


--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #660056
Posted Wednesday, February 18, 2009 11:04 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 2:04 AM
Points: 1,725, Visits: 2,366
you can also check if some bulk upload is happening.... if yes, you can switch the recovery to bulk-logged for the period of bulk upload to prevent the log file from growing heavily.

as suggested, the first option to look is the recovery model and log backup frequency (if its full mode).. increase the frequency of log backups....






Pradeep Singh
Post #660062
Posted Thursday, February 19, 2009 1:35 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:58 AM
Points: 17,110, Visits: 12,214
Please read through this - Managing Transaction Logs


Gail Shaw

We walk in the dark places no others will enter
We stand on the bridge and none may pass

Post #660097
Posted Thursday, February 19, 2009 2:10 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 1:57 AM
Points: 18, Visits: 48
that is nice article.thnks for it.
but one thing is i dotn want recover from
log.

i need solution for how i can not inert in to
the log files

is there any way that i can not insert entry in the log files?
Post #660114
Posted Thursday, February 19, 2009 2:21 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 2:04 AM
Points: 1,725, Visits: 2,366
keep recovery model of the database Simple. this will keep on removing inactive log entries at regular frequent intervals.






Pradeep Singh
Post #660117
Posted Thursday, February 19, 2009 5:52 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:58 AM
Points: 17,110, Visits: 12,214
kuldip.bhatt (2/19/2009)
is there any way that i can not insert entry in the log files?


No. Changes are always logged and there's no way to stop logging. Logs are used to ensure that the DB is transactionally consistent all the time.

If you don't need point-in-time recovery, switch to simple recovery model.



Gail Shaw

We walk in the dark places no others will enter
We stand on the bridge and none may pass

Post #660201
« Prev Topic | Next Topic »


Permissions Expand / Collapse