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.
| Author |
Topic |
|
shaminda
Starting Member
25 Posts |
Posted - 2005-04-04 : 13:20:31
|
| In one of my databases the transaction log file is 21 GB. The .mdf file is only 42,000 KB. I backed up the transaction file for the first time today, but the size of the .ldf file is still the same. Here are some of the questions I have:1) What is the best method to shrink the transaction file? 2) Why didn’t the transaction log backup shrink the .ldf file?3) What else should I do to shrink it? 4) Is there anything wrong with my database? |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2005-04-04 : 13:22:32
|
| http://www.mindsdoor.net/SQLAdmin/TransactionLogFileGrows_1.html==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
JimL
SQL Slinging Yak Ranger
1537 Posts |
Posted - 2005-04-04 : 13:24:01
|
IF you are not going to use the Transaction log for regular backups I would sugjest changing your DB recovery model to simple. by NRJimUsers <> Logic |
 |
|
|
jason
Posting Yak Master
164 Posts |
Posted - 2005-04-04 : 14:13:49
|
| You can also set the DB to auto shrink in EM. This will keep the log file and DB as small as possible. |
 |
|
|
shaminda
Starting Member
25 Posts |
Posted - 2005-04-04 : 14:28:21
|
| Thanks nr, Jim and Jasan!I changed the recovery model to simple and shrunk log file. The size of the log file now is 1 MB. I will probably set the DB to auto shrink too. |
 |
|
|
cshekar
Starting Member
49 Posts |
Posted - 2005-04-05 : 16:10:14
|
| Do not set teh DB to simple recovery mode rather.you should take create Transaction Log back up 2-3 or more offen in that way Transaction log wil never grow big..chandra shekar |
 |
|
|
|
|
|