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
 General SQL Server Forums
 New to SQL Server Programming
 Transaction log size question

Author  Topic 

Camper66
Starting Member

13 Posts

Posted - 2008-08-20 : 17:26:35
Hi again and thank you,

I have the the database recovery option to simple and fixed the transaction log file to x mb ;yet both the used and file size still fluctuates.

I was under the understanding that in simple recover mode the log file is not written to so why does the size keep changing ?


regards..

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-20 : 17:30:15
That is not true. The transaction log is used in all recovery models. In SIMPLE recovery model though, they are cleared after the transaction completes whether it be a commit or a rollback. In the other recovery models, they are stored there until you back it up or truncate it.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Camper66
Starting Member

13 Posts

Posted - 2008-08-20 : 17:42:18
Thanks tkizer; I understand that now, but if I set the log file at x mb why does the allocated size change ?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-20 : 17:44:07
I don't understand your question.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Camper66
Starting Member

13 Posts

Posted - 2008-08-20 : 17:53:43
I go to Enterprise manager > Select the database > Space allocation > Transaction log > and the set the log file size to 5 MB...

A short time later the size I set will have become 2 MB or 1 MB
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-20 : 17:57:44
Do you have autoshrink enabled or a shrink job?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Camper66
Starting Member

13 Posts

Posted - 2008-08-20 : 18:01:50
yes, I did , thank you very much
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-20 : 18:05:44
Disable it as it affects performance. That option should never be checked as you can't control when it kicks off. If you must shrink the database, which I don't recommend except in special circumstances, then do it as a scheduled job so that it happens during off-hours.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -