the only thing I could really find (except switching trunc. log on chkpt.
database option TRUE in the db properties) was this which resizes the size
of the file.
FROM BOL:
DBCC SHRINKFILE (T-SQL)
Shrinks the size of the specified data file or log file for the related
database.
Syntax
DBCC SHRINKFILE
( {file_name | file_id }
{ [, target_size]
| [, {EMPTYFILE | NOTRUNCATE | TRUNCATEONLY}]
}
)
Arguments
file_name
Is the logical name of the file being shrunk. File names must conform to the
rules for identifiers. For more information, see Using Identifiers.
file_id
Is the identification number (ID) of the file to be shrunk. To obtain a file
ID, use the FILE_ID function or search sysfiles in the current database.
target_size
Is the desired size for the file in megabytes, expressed as an integer. If
not specified, DBCC SHRINKFILE reduces the size as much as possible.
If target_size is specified, DBCC SHRINKFILE attempts to shrink the file to
the specified size. Used pages in the part of the file to be freed are
relocated to available free space in the part of the file retained. For
example, if there is a 10-MB data file, a DBCC SHRINKFILE with a target_size
of 8 causes all used pages in the last 2 MB of the file to be reallocated
into any available free slots in the first 8 MB of the file. DBCC SHRINKFILE
does not shrink a file past the size needed to store the data in the file.
For example, if 7 MB of a 10-MB data file is used, a DBCC SHRINKFILE
statement with a target_size of 6 shrinks the file to only 7 MB, not 6 MB.
EMPTYFILE
Migrates all data from the specified file to other files in the same
filegroup. Microsoft� SQL Server(tm) no longer allows data to be placed on
the file used with the EMPTYFILE option. This option allows the file to be
dropped using the ALTER DATABASE statement.
NOTRUNCATE
Causes the freed file space to be retained in the files.
When NOTRUNCATE is specified along with target_size, the space freed is not
released to the operating system. The only effect of the DBCC SHRINKFILE is
to relocate used pages from above the target_size line to the front of the
file. When NOTRUNCATE is not specified, all freed file space is returned to
the operating system.
TRUNCATEONLY
Causes any unused space in the files to be released to the operating system
and shrinks the file to the last allocated extent, reducing the file size
without moving any data. No attempt is made to relocate rows to unallocated
pages. target_size is ignored when TRUNCATEONLY is used.
> -----Original Message-----
> From: Duane Boudreau [mailto:[EMAIL PROTECTED]]
> Sent: 13 March 2002 21:06
> To: CF-Talk
> Subject: SQL: Truncating Logs
>
>
> Does anyone know the TSQL for truncating a transaction log?
> Mind sharing?
>
> TIA,
> Duane
>
>
>
______________________________________________________________________
Why Share?
Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists