Wednesday, March 21, 2012

Log file Shrinking

how can we shrink the log file to the required size without affecting the live database ....
Thanks in advanceI hope it can help you:

--Truncating the transaction log
BACKUP LOG { database_name | @.database_name_var }
{
WITH
{ NO_LOG | TRUNCATE_ONLY } ]
}

NO_LOG | TRUNCATE_ONLY
Removes the inactive part of the log without making a backup copy of it and truncates the log by discarding all but the active log. This option frees space. Specifying a backup device is unnecessary because the log backup is not saved. NO_LOG and TRUNCATE_ONLY are synonyms.

Regards
Kris Zywczyk|||It is working.Thanks for this

No comments:

Post a Comment