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 |
jai2808
Starting Member
27 Posts |
Posted - 2006-10-23 : 01:52:33
|
Hi All,I have got an issue with the log file in production environment.The log file grows enormously.How can i control this.Currently I am having a job and in the job i have given the steps to clear log, i just want to check whether the steps i follow is correctStep1:dump tran xxxxxxx with truncate_onlyStep2:DBCC SHRINKDATABASE (N'xxxxxxxx', 0,TRUNCATEONLY).Is this the correct method to control my log file.If this is wrong could some one please tell me the steps to shrink log file periodically and back up the database.My recovery model is full. |
|
dewacorp.alliances
452 Posts |
Posted - 2006-10-23 : 02:37:44
|
The one that you expalin is for emergency one For the emergency one:1. BACKUP LOG [DBNAME] WITH TRUNCATE_ONLY2. DBCC SHRINKFILE ('LOG_FILE_NAME, SIZE) 3. FULL BACKUPBut ideally you should back up the transaction logs regularly let say 15 minutes or even 5 minutes.Thanks |
 |
|
jai2808
Starting Member
27 Posts |
Posted - 2006-10-24 : 02:34:01
|
Hi valdyv,Thanks for the reply, but i have a small doubt.As you had mentioned the steps i am already using as emergency one, but the steps mentioned by you also reads as emergency one.For the emergency one:1. BACKUP LOG [DBNAME] WITH TRUNCATE_ONLY2. DBCC SHRINKFILE ('LOG_FILE_NAME, SIZE) 3. FULL BACKUPAnd what should be size when i use DBCC SHRINKFILE ('LOG_FILE_NAME, SIZE) command. |
 |
|
Kristen
Test
22859 Posts |
|
|
|
|
|
|