<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Shrinking Truncate Log File &#8211; Log Full</title>
	<atom:link href="http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 09 Feb 2012 11:29:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Mathi</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-247349</link>
		<dc:creator><![CDATA[Mathi]]></dc:creator>
		<pubDate>Fri, 03 Feb 2012 07:17:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-247349</guid>
		<description><![CDATA[The following three commands worked for me and it shrunk the log file to 1mb

USE DatabaseName
DBCC SHRINKFILE(, 1)
BACKUP LOG  WITH TRUNCATE_ONLY
DBCC SHRINKFILE(, 1)

Thank you so much
Mathi]]></description>
		<content:encoded><![CDATA[<p>The following three commands worked for me and it shrunk the log file to 1mb</p>
<p>USE DatabaseName<br />
DBCC SHRINKFILE(, 1)<br />
BACKUP LOG  WITH TRUNCATE_ONLY<br />
DBCC SHRINKFILE(, 1)</p>
<p>Thank you so much<br />
Mathi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adnan Sattar</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-241883</link>
		<dc:creator><![CDATA[Adnan Sattar]]></dc:creator>
		<pubDate>Sat, 21 Jan 2012 17:11:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-241883</guid>
		<description><![CDATA[Thanks Buddy&#039;s it&#039;s really help me truncate log file for Sql]]></description>
		<content:encoded><![CDATA[<p>Thanks Buddy&#8217;s it&#8217;s really help me truncate log file for Sql</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-240020</link>
		<dc:creator><![CDATA[George]]></dc:creator>
		<pubDate>Wed, 18 Jan 2012 06:07:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-240020</guid>
		<description><![CDATA[Hi Pinal

   I am using the SQL 2005, the log file is really big, I have found the reason and I can delete the item from the database,however what I should do with the log file, Is it possible if we can just modify the log file by items,I mean just delete the specific item in LogFile, or what I can do is just shrink or delete the log file?

Thanks for reading and waiting for any reply.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal</p>
<p>   I am using the SQL 2005, the log file is really big, I have found the reason and I can delete the item from the database,however what I should do with the log file, Is it possible if we can just modify the log file by items,I mean just delete the specific item in LogFile, or what I can do is just shrink or delete the log file?</p>
<p>Thanks for reading and waiting for any reply.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarath</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-225900</link>
		<dc:creator><![CDATA[Sarath]]></dc:creator>
		<pubDate>Mon, 26 Dec 2011 04:00:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-225900</guid>
		<description><![CDATA[Thanks Buddy............]]></description>
		<content:encoded><![CDATA[<p>Thanks Buddy&#8230;&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cris</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-209606</link>
		<dc:creator><![CDATA[cris]]></dc:creator>
		<pubDate>Fri, 02 Dec 2011 21:28:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-209606</guid>
		<description><![CDATA[maybe this is a dummy question....
but is possible to add this code  is the SSIS mantaince tool?  which toolbox is the correct one

--Shrink the truncated log file to 1 MB.
--DBCC SHRINKFILE (, )
--DBCC SHRINKFILE (&#039;DATABASE_log&#039;,1)

thanks in advance for your answer,

Regars, Cris]]></description>
		<content:encoded><![CDATA[<p>maybe this is a dummy question&#8230;.<br />
but is possible to add this code  is the SSIS mantaince tool?  which toolbox is the correct one</p>
<p>&#8211;Shrink the truncated log file to 1 MB.<br />
&#8211;DBCC SHRINKFILE (, )<br />
&#8211;DBCC SHRINKFILE (&#8216;DATABASE_log&#8217;,1)</p>
<p>thanks in advance for your answer,</p>
<p>Regars, Cris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: VIJAY ANAND MADHURANAYAGAM</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-198477</link>
		<dc:creator><![CDATA[VIJAY ANAND MADHURANAYAGAM]]></dc:creator>
		<pubDate>Fri, 18 Nov 2011 10:40:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-198477</guid>
		<description><![CDATA[Hi Ratan,

After reading many topics from Pinal I have given below the suggestions:

1. Take the log backup first (whether you want or don&#039;t want). Then only SQL Server engine knows it and issues checkpoints to close the already opened transactions. (You may need to take a full backup first if your DB is recently restored and not taken the FULL backup till now) 

2. USE ;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE 
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 5120 MB.
DBCC SHRINKFILE (Log_name, 5120);
--You cannot expect the same size it may be varying depending upon the nature of the logs stored.
GO
-- Reset the database recovery model.
ALTER DATABASE 
SET RECOVERY FULL;
GO 
3. Take a FULL backup 
4. Take transaction log backups in a regular interval to avoid the unconditional growth (This is very best way of practicing to reduce the log growth).

Thanks &amp; regards,
Vijay]]></description>
		<content:encoded><![CDATA[<p>Hi Ratan,</p>
<p>After reading many topics from Pinal I have given below the suggestions:</p>
<p>1. Take the log backup first (whether you want or don&#8217;t want). Then only SQL Server engine knows it and issues checkpoints to close the already opened transactions. (You may need to take a full backup first if your DB is recently restored and not taken the FULL backup till now) </p>
<p>2. USE ;<br />
GO<br />
&#8211; Truncate the log by changing the database recovery model to SIMPLE.<br />
ALTER DATABASE<br />
SET RECOVERY SIMPLE;<br />
GO<br />
&#8211; Shrink the truncated log file to 5120 MB.<br />
DBCC SHRINKFILE (Log_name, 5120);<br />
&#8211;You cannot expect the same size it may be varying depending upon the nature of the logs stored.<br />
GO<br />
&#8211; Reset the database recovery model.<br />
ALTER DATABASE<br />
SET RECOVERY FULL;<br />
GO<br />
3. Take a FULL backup<br />
4. Take transaction log backups in a regular interval to avoid the unconditional growth (This is very best way of practicing to reduce the log growth).</p>
<p>Thanks &amp; regards,<br />
Vijay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: VIJAY ANAND MADHURANAYAGAM</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-196778</link>
		<dc:creator><![CDATA[VIJAY ANAND MADHURANAYAGAM]]></dc:creator>
		<pubDate>Wed, 16 Nov 2011 11:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-196778</guid>
		<description><![CDATA[Hi Jignesh,

If you dont care if there is log file or not then please change your Recovery model from FULL to SIMPLE.

If your DB&#039;s Recovery model is SIMPLE you don&#039;t need to use the code mentioned by PINAL.

Thanks &amp; regards,
Vijay Anand Madhuranayagam]]></description>
		<content:encoded><![CDATA[<p>Hi Jignesh,</p>
<p>If you dont care if there is log file or not then please change your Recovery model from FULL to SIMPLE.</p>
<p>If your DB&#8217;s Recovery model is SIMPLE you don&#8217;t need to use the code mentioned by PINAL.</p>
<p>Thanks &amp; regards,<br />
Vijay Anand Madhuranayagam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jignesh Nakrani</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-175712</link>
		<dc:creator><![CDATA[Jignesh Nakrani]]></dc:creator>
		<pubDate>Thu, 06 Oct 2011 13:14:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-175712</guid>
		<description><![CDATA[Hi Pinal,

I&#039;ve SQL Express 2008 database.  I have limited hard disk space on machine. I don&#039;t care if there is log file or not. I don&#039;t need to recover from the log file also. So I don&#039;t want the the log file to grow bigger. Is it the best solution to execute just one command &quot;DBCC SHRINKFILE(, 10)&quot; periodically? or do I still need to use below three steps that you suggested originally

USE DatabaseName
 GO
 DBCC SHRINKFILE(, 1)
 BACKUP LOG  WITH TRUNCATE_ONLY
 DBCC SHRINKFILE(, 1)
 GO]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I&#8217;ve SQL Express 2008 database.  I have limited hard disk space on machine. I don&#8217;t care if there is log file or not. I don&#8217;t need to recover from the log file also. So I don&#8217;t want the the log file to grow bigger. Is it the best solution to execute just one command &#8220;DBCC SHRINKFILE(, 10)&#8221; periodically? or do I still need to use below three steps that you suggested originally</p>
<p>USE DatabaseName<br />
 GO<br />
 DBCC SHRINKFILE(, 1)<br />
 BACKUP LOG  WITH TRUNCATE_ONLY<br />
 DBCC SHRINKFILE(, 1)<br />
 GO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ratan Sharma</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-170616</link>
		<dc:creator><![CDATA[Ratan Sharma]]></dc:creator>
		<pubDate>Thu, 22 Sep 2011 09:39:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-170616</guid>
		<description><![CDATA[Thank you for reply.

my log file became 40Gb i want to shrink it to 5 Gb. I don&#039;t want to backup of log file.
Can i execute follwing query:-
DBCC SHRINKFILE(log_name, 5000)

plz help me]]></description>
		<content:encoded><![CDATA[<p>Thank you for reply.</p>
<p>my log file became 40Gb i want to shrink it to 5 Gb. I don&#8217;t want to backup of log file.<br />
Can i execute follwing query:-<br />
DBCC SHRINKFILE(log_name, 5000)</p>
<p>plz help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-170606</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Thu, 22 Sep 2011 09:02:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-170606</guid>
		<description><![CDATA[Yes. The query will run slow and sometimes you may get error]]></description>
		<content:encoded><![CDATA[<p>Yes. The query will run slow and sometimes you may get error</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ratan Sharma</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-170168</link>
		<dc:creator><![CDATA[Ratan Sharma]]></dc:creator>
		<pubDate>Wed, 21 Sep 2011 05:15:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-170168</guid>
		<description><![CDATA[Does Transaction Log file decrease the performance of query execution if it become full?

Ratan Sharma
India]]></description>
		<content:encoded><![CDATA[<p>Does Transaction Log file decrease the performance of query execution if it become full?</p>
<p>Ratan Sharma<br />
India</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sakaravarthi</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-170006</link>
		<dc:creator><![CDATA[Sakaravarthi]]></dc:creator>
		<pubDate>Tue, 20 Sep 2011 16:36:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-170006</guid>
		<description><![CDATA[HI Pinal ,
Shall i delete ERRORLOG.. its growing very big..
its about 100 GB]]></description>
		<content:encoded><![CDATA[<p>HI Pinal ,<br />
Shall i delete ERRORLOG.. its growing very big..<br />
its about 100 GB</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arshpreet</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-168341</link>
		<dc:creator><![CDATA[Arshpreet]]></dc:creator>
		<pubDate>Thu, 15 Sep 2011 11:08:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-168341</guid>
		<description><![CDATA[Naresh - 
      Make sure you take the FULL backup of the database after doing such. This method break the LSN chain for your transaction logs and if you forgot to take the FULL backup - all the t-Log backup after this operation will be insignificant. Means you lost the point in time recovery of the database.

Thanks,
Arshpreet]]></description>
		<content:encoded><![CDATA[<p>Naresh &#8211;<br />
      Make sure you take the FULL backup of the database after doing such. This method break the LSN chain for your transaction logs and if you forgot to take the FULL backup &#8211; all the t-Log backup after this operation will be insignificant. Means you lost the point in time recovery of the database.</p>
<p>Thanks,<br />
Arshpreet</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Migas</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-166239</link>
		<dc:creator><![CDATA[Migas]]></dc:creator>
		<pubDate>Wed, 07 Sep 2011 13:13:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-166239</guid>
		<description><![CDATA[I had this problem with SQL 2005 and worked like a charm!!]]></description>
		<content:encoded><![CDATA[<p>I had this problem with SQL 2005 and worked like a charm!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guinevere</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-164269</link>
		<dc:creator><![CDATA[Guinevere]]></dc:creator>
		<pubDate>Thu, 01 Sep 2011 10:51:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-164269</guid>
		<description><![CDATA[Hi Praveen,

Your suggestion was years ago but it worked. Thanks. :)]]></description>
		<content:encoded><![CDATA[<p>Hi Praveen,</p>
<p>Your suggestion was years ago but it worked. Thanks. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yacov</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-163250</link>
		<dc:creator><![CDATA[yacov]]></dc:creator>
		<pubDate>Mon, 29 Aug 2011 14:44:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-163250</guid>
		<description><![CDATA[Hello 
in sql2008r2 &quot;WITH TRUNCATE_ONLY&quot; 
BACKUP LOG dbLog WITH TRUNCATE_ONLY
is deprcated command 
how can shirnk the log of db after backup 
best regards

---
GO
Use dbLog
if exists  
(select name  from master.sys.databases  where recovery_model = 1 and name = &#039;dbLog&#039;)
begin   
if exists  
(Select * from 
(
 select dateadd(n , 90, max(backup_finish_date))  as maxLogdate 
 from msdb..backupset bckset 
 where database_name = &#039;dbLog&#039;  and type = &#039;L&#039;)  mm 
 where maxLogDate &gt; getdate())
 begin
BACKUP LOG dbLog WITH TRUNCATE_ONLY 
dbcc Shrinkfile  (&#039;dbLog_Log&#039;, 50, truncateonly)
 end  
 end  
 else  
 begin   
BACKUP LOG dbLog WITH TRUNCATE_ONLY 
dbcc Shrinkfile  (&#039;dbLog_Log&#039;, 50, truncateonly)
 end  
--]]></description>
		<content:encoded><![CDATA[<p>Hello<br />
in sql2008r2 &#8220;WITH TRUNCATE_ONLY&#8221;<br />
BACKUP LOG dbLog WITH TRUNCATE_ONLY<br />
is deprcated command<br />
how can shirnk the log of db after backup<br />
best regards</p>
<p>&#8212;<br />
GO<br />
Use dbLog<br />
if exists<br />
(select name  from master.sys.databases  where recovery_model = 1 and name = &#8216;dbLog&#8217;)<br />
begin<br />
if exists<br />
(Select * from<br />
(<br />
 select dateadd(n , 90, max(backup_finish_date))  as maxLogdate<br />
 from msdb..backupset bckset<br />
 where database_name = &#8216;dbLog&#8217;  and type = &#8216;L&#8217;)  mm<br />
 where maxLogDate &gt; getdate())<br />
 begin<br />
BACKUP LOG dbLog WITH TRUNCATE_ONLY<br />
dbcc Shrinkfile  (&#8216;dbLog_Log&#8217;, 50, truncateonly)<br />
 end<br />
 end<br />
 else<br />
 begin<br />
BACKUP LOG dbLog WITH TRUNCATE_ONLY<br />
dbcc Shrinkfile  (&#8216;dbLog_Log&#8217;, 50, truncateonly)<br />
 end<br />
&#8211;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil Davenport</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-162400</link>
		<dc:creator><![CDATA[Phil Davenport]]></dc:creator>
		<pubDate>Fri, 26 Aug 2011 21:15:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-162400</guid>
		<description><![CDATA[Here’s what works for SQL 2008.


ALTER database eConfigDev SET RECOVERY SIMPLE
GO

    Then confirm that it’s set to Simple (no logs used for recovery)

Select name, recovery_model_desc from sys.databases
GO

THEN, right-click on database, Tasks, SHRINK, Files, select log file, set it to maybe 1MB or even 0mb

Here’s the article that worked (took me quite a few before I found one that actually told me how to do it)

http://experiencing-sql-server-2008.blogspot.com/2008/02/sql-server-2008-truncating-transaction.html]]></description>
		<content:encoded><![CDATA[<p>Here’s what works for SQL 2008.</p>
<p>ALTER database eConfigDev SET RECOVERY SIMPLE<br />
GO</p>
<p>    Then confirm that it’s set to Simple (no logs used for recovery)</p>
<p>Select name, recovery_model_desc from sys.databases<br />
GO</p>
<p>THEN, right-click on database, Tasks, SHRINK, Files, select log file, set it to maybe 1MB or even 0mb</p>
<p>Here’s the article that worked (took me quite a few before I found one that actually told me how to do it)</p>
<p><a href="http://experiencing-sql-server-2008.blogspot.com/2008/02/sql-server-2008-truncating-transaction.html" rel="nofollow">http://experiencing-sql-server-2008.blogspot.com/2008/02/sql-server-2008-truncating-transaction.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil Davenport</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-162399</link>
		<dc:creator><![CDATA[Phil Davenport]]></dc:creator>
		<pubDate>Fri, 26 Aug 2011 21:13:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-162399</guid>
		<description><![CDATA[It’s amazing how long it took me to figure this out for SQL 2008.  All the stuff that worked in SQL 2000 and 2005 no longer works.

Here’s what works.

ALTER database eConfigDev  SET RECOVERY SIMPLE
GO

        Then confirm that it’s set to Simple (no logs used for recovery)

Select name, recovery_model_desc from sys.databases
GO

THEN, right-click on database, Tasks, SHRINK, Files, select log file, set it to maybe 1MB or even 0mb

Here’s the article that worked (took me quite a few before I found one that actually told me how to do it)

http://experiencing-sql-server-2008.blogspot.com/2008/02/sql-server-2008-truncating-transaction.html]]></description>
		<content:encoded><![CDATA[<p>It’s amazing how long it took me to figure this out for SQL 2008.  All the stuff that worked in SQL 2000 and 2005 no longer works.</p>
<p>Here’s what works.</p>
<p>ALTER database eConfigDev  SET RECOVERY SIMPLE<br />
GO</p>
<p>        Then confirm that it’s set to Simple (no logs used for recovery)</p>
<p>Select name, recovery_model_desc from sys.databases<br />
GO</p>
<p>THEN, right-click on database, Tasks, SHRINK, Files, select log file, set it to maybe 1MB or even 0mb</p>
<p>Here’s the article that worked (took me quite a few before I found one that actually told me how to do it)</p>
<p><a href="http://experiencing-sql-server-2008.blogspot.com/2008/02/sql-server-2008-truncating-transaction.html" rel="nofollow">http://experiencing-sql-server-2008.blogspot.com/2008/02/sql-server-2008-truncating-transaction.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shina</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-161461</link>
		<dc:creator><![CDATA[Shina]]></dc:creator>
		<pubDate>Wed, 24 Aug 2011 18:02:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-161461</guid>
		<description><![CDATA[&#039;TRUNCATE_ONLY&#039; is not supported in SQL Server 2008 onward. Instead use &#039;TRUNCATONLY&#039;   one word]]></description>
		<content:encoded><![CDATA[<p>&#8216;TRUNCATE_ONLY&#8217; is not supported in SQL Server 2008 onward. Instead use &#8216;TRUNCATONLY&#8217;   one word</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shina</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-161459</link>
		<dc:creator><![CDATA[Shina]]></dc:creator>
		<pubDate>Wed, 24 Aug 2011 17:59:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-161459</guid>
		<description><![CDATA[The &#039;3&#039; in DBCC SHRINKFILE (3, TRUNCATEONLY) refers to the FILE_ID]]></description>
		<content:encoded><![CDATA[<p>The &#8217;3&#8242; in DBCC SHRINKFILE (3, TRUNCATEONLY) refers to the FILE_ID</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shina</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-161458</link>
		<dc:creator><![CDATA[Shina]]></dc:creator>
		<pubDate>Wed, 24 Aug 2011 17:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-161458</guid>
		<description><![CDATA[This might not be the best approach but this was how I reduce my log file.

-- First, use the below code to get the file associated with the database in question.

USE  [database_name]
GO

SELECT FILE_ID, name, size from sys.database_files;
GO


-- Second, use the code below to truncate the log file

dbcc shrinkfile(3,truncateonly);
GO


NOTE :
Only perform this step if and only if you don&#039;t need to restore  from the log file you need to truncate.
Make sure you perform full Backup immediately after truncation is perform JUST IN CASE!]]></description>
		<content:encoded><![CDATA[<p>This might not be the best approach but this was how I reduce my log file.</p>
<p>&#8211; First, use the below code to get the file associated with the database in question.</p>
<p>USE  [database_name]<br />
GO</p>
<p>SELECT FILE_ID, name, size from sys.database_files;<br />
GO</p>
<p>&#8211; Second, use the code below to truncate the log file</p>
<p>dbcc shrinkfile(3,truncateonly);<br />
GO</p>
<p>NOTE :<br />
Only perform this step if and only if you don&#8217;t need to restore  from the log file you need to truncate.<br />
Make sure you perform full Backup immediately after truncation is perform JUST IN CASE!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeetendra</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-160920</link>
		<dc:creator><![CDATA[Jeetendra]]></dc:creator>
		<pubDate>Tue, 23 Aug 2011 08:50:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-160920</guid>
		<description><![CDATA[use dbname BACKUP LOG dbname WITH TRUNCATE_ONLY
 DBCC SHRINKFILE(dbname_log,2)
use tempdb
 BACKUP LOG tempdb WITH TRUNCATE_ONLY
 DBCC SHRINKFILE(templog,20)]]></description>
		<content:encoded><![CDATA[<p>use dbname BACKUP LOG dbname WITH TRUNCATE_ONLY<br />
 DBCC SHRINKFILE(dbname_log,2)<br />
use tempdb<br />
 BACKUP LOG tempdb WITH TRUNCATE_ONLY<br />
 DBCC SHRINKFILE(templog,20)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ratan Sharma</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-159895</link>
		<dc:creator><![CDATA[Ratan Sharma]]></dc:creator>
		<pubDate>Sat, 20 Aug 2011 11:50:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-159895</guid>
		<description><![CDATA[my database size is 12 gb but log file 36 gb. Recovery model is set to full.
i want to shrink my log file to 10mb. plz tell me how it is possible without lossing any data. can i apply dbcc shrinfile command on active database?]]></description>
		<content:encoded><![CDATA[<p>my database size is 12 gb but log file 36 gb. Recovery model is set to full.<br />
i want to shrink my log file to 10mb. plz tell me how it is possible without lossing any data. can i apply dbcc shrinfile command on active database?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Albin Sebastian</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-156141</link>
		<dc:creator><![CDATA[Albin Sebastian]]></dc:creator>
		<pubDate>Thu, 11 Aug 2011 10:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-156141</guid>
		<description><![CDATA[Thank you Pinal,

I just used this script. Working fine]]></description>
		<content:encoded><![CDATA[<p>Thank you Pinal,</p>
<p>I just used this script. Working fine</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deisbel</title>
		<link>http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-154815</link>
		<dc:creator><![CDATA[Deisbel]]></dc:creator>
		<pubDate>Mon, 08 Aug 2011 03:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2006/12/30/shrinking-truncated-log-file/#comment-154815</guid>
		<description><![CDATA[Gracias. Tenia una BD que se habia vuelto bien loca y por el manegement intentaba hacer esto mismo pero no lo hacia finalmente.]]></description>
		<content:encoded><![CDATA[<p>Gracias. Tenia una BD que se habia vuelto bien loca y por el manegement intentaba hacer esto mismo pero no lo hacia finalmente.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

