I know that the Transaction LOG files are cleared when the DB is backed-up, but is there any way to clear the log files when they become too big, without backing-up the DB?
Thanx..The log files are not emptied when you do BACKUP DATABASE. They are emptied when you do BACKUP LOG.
If you don't do log backups, just set the database to simple recovery mode...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Rival" <anonymous@.discussions.microsoft.com> wrote in message
news:5BBFA001-3CF0-46E7-AE86-3185C5B9CCA8@.microsoft.com...
> I know that the Transaction LOG files are cleared when the DB is backed-up, but is there any way to clear
the log files when they become too big, without backing-up the DB?
> Thanx..|||What recovery mode is your database is in?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Rival" <anonymous@.discussions.microsoft.com> wrote in message
news:5BBFA001-3CF0-46E7-AE86-3185C5B9CCA8@.microsoft.com...
I know that the Transaction LOG files are cleared when the DB is backed-up,
but is there any way to clear the log files when they become too big,
without backing-up the DB?
Thanx..|||Rival,
Actually, the Transaction Logs are cleared when the Transaction Logs are
backed up, not when the Database is backed up. So, if only the DB is being
backed up the log will grow and grow and grow. So, you first step is to
make sure that the transaction log is being backed up.
If you need to abandon part of the log, you options are:
BACKUP LOG { database_name | @.database_name_var }
{
[ WITH
{ NO_LOG | TRUNCATE_ONLY } ]
}
or, switch to the SIMPLE recovery model:
ALTER DATABASE dbname SET RECOVERY SIMPLE
If the physical LOG file is too large, you would need to use DBCC SHRINKFILE
to physically shrink it after truncation.
Russell Fields
"Rival" <anonymous@.discussions.microsoft.com> wrote in message
news:5BBFA001-3CF0-46E7-AE86-3185C5B9CCA8@.microsoft.com...
> I know that the Transaction LOG files are cleared when the DB is
backed-up, but is there any way to clear the log files when they become too
big, without backing-up the DB?
> Thanx..
No comments:
Post a Comment