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 |
|
ASP_DRUG_DEALER
Yak Posting Veteran
61 Posts |
Posted - 2004-05-10 : 16:14:13
|
| Hey all-I need to reduce the size of my log files and not sure how to go about doing it correctly. I have not setup any maintenance on any of the DB's and figure I better start. Here's my question. What type of maintenance should I do and how often? I do backup the DB's nightly and to be honest, restoring to a certian point in time is not something I have to have. I can get away with restoring to the most recent backup so log files don't seem to be that importain right now. Suggestions please....Thanks,Doug |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-05-10 : 16:26:29
|
| So is your database recovery model set to SIMPLE? If not, change it to SIMPLE. To shrink the transaction log, use DBCC SHRINKFILE. Backups should be done about once a day, integrity checks every day, and optimizations as needed. DBCC CHECKDB for integrity and DBCC DBREINDEX or DBCC INDEXDEFRAG for optimizations.Tara |
 |
|
|
mdhingra01
Posting Yak Master
179 Posts |
Posted - 2004-05-11 : 09:54:46
|
| I am trying to run a query in Query Analyzer and I get the following message. I tried backing up the log for temp, but it says no backups can be done. I also tried shrinking it, but no luck.Server: Msg 9002, Level 17, State 6, Line 1The log file for database 'tempdb' is full. Back up the transaction log for the database to free up some log space.By the way what is DBCC? |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-05-11 : 10:10:53
|
| Shut off SQL Server and turn it back on. This will reset the tempdb. You need to buy more disk space or rewrite whatever process caused this to happen though.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-05-11 : 12:18:00
|
| DBCC stands for database console command. There are a bunch of DBCC commands. Look up DBCC in BOL for more details.Tara |
 |
|
|
|
|
|
|
|