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 2000 Forums
 SQL Server Administration (2000)
 transaction log

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-17 : 21:24:23
writes "What do you do when your transaction log is full? Truncate and Shrink? Clarify steps."

chadmat
The Chadinator

1974 Posts

Posted - 2002-04-18 : 02:29:40
If it is full, why would you want to shrink? That means it will actually auto grow. You should either set your recovery model so that the log gets truncated automatically (Simple), or actively backup the log so it gets truncated.

If you want the steps to Truncate and Shrink (for 2000)

ex:
Backup Log pubs with TRUNCATE_ONLY
go
DBCC Shrinkfile('Pubs_data', 5)

Look it up in BOL, you want to understand what you are doing.

-Chad

Go to Top of Page

Sira
Starting Member

5 Posts

Posted - 2002-04-24 : 14:51:47
Well in certain cases the developers fill up the t.l. so you can truncate it but is there a need to shrink the db after that point?

Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-04-26 : 01:51:25
Well, that is up to you. If it is excessivly big, you probably should shrink it.

-Chad

Go to Top of Page

rihardh
Constraint Violating Yak Guru

307 Posts

Posted - 2002-04-26 : 02:29:55
The easiest way to backup and truncate the TL on a regular basis, is to make a maintainance plan for the DB.
(right click on DB - all tasks - maintainance plan...)

Go to Top of Page
   

- Advertisement -