Re: Creating a T-SQL Stored Procedure to Truncate and Shrink ALL Log Files
From: Steven Durfey (s_durfey_at_hotmail.com)
Date: 03/03/04
- Next message: Tibor Karaszi: "Re: Huge log file - 500 MB Data, 7 GB Log file"
- Previous message: John Bandettini: "RE: log file to be reduced"
- Next in thread: Tim Heap: "Re: Creating a T-SQL Stored Procedure to Truncate and Shrink ALL Log Files"
- Reply: Tim Heap: "Re: Creating a T-SQL Stored Procedure to Truncate and Shrink ALL Log Files"
- Reply: Rich S: "Re: Creating a T-SQL Stored Procedure to Truncate and Shrink ALL Log Files"
- Messages sorted by: [ date ] [ thread ]
Date: 3 Mar 2004 08:08:36 -0800
Rich
I suggest you setup a SQL 2000 Agent Job executing the following TSQL
command:
DBCC SHRINKFILE(2, TRUNCATEONLY)
on the DB(s) in question. Set it to run off hours, the "2" should be
for the
Log(LDF) file, a "1" should be the for MDF file.
I'm still waiting myself to see a script that will parse thru the DBs
on a server and build the DBCC above for every DB.
good luck
Steven
- Next message: Tibor Karaszi: "Re: Huge log file - 500 MB Data, 7 GB Log file"
- Previous message: John Bandettini: "RE: log file to be reduced"
- Next in thread: Tim Heap: "Re: Creating a T-SQL Stored Procedure to Truncate and Shrink ALL Log Files"
- Reply: Tim Heap: "Re: Creating a T-SQL Stored Procedure to Truncate and Shrink ALL Log Files"
- Reply: Rich S: "Re: Creating a T-SQL Stored Procedure to Truncate and Shrink ALL Log Files"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|