<?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; SHRINKFILE and TRUNCATE Log File in SQL Server 2008</title>
	<atom:link href="http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Wed, 19 Jun 2013 15:04:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: vishi</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-504632</link>
		<dc:creator><![CDATA[vishi]]></dc:creator>
		<pubDate>Tue, 18 Jun 2013 08:42:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-504632</guid>
		<description><![CDATA[Hi Pinal, i am facing space issue in SQL Data and in sql logs for microsoft sql server 2008. Due to this so often i have to shrink the databases but inspite of shrinking for 2-3 hours i am still able to free only 5-6 gb of space. In sql data i have files like .ndf, .mdf,.ldf . so could you suggest some better way to shrink this files .
 Thanks]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal, i am facing space issue in SQL Data and in sql logs for microsoft sql server 2008. Due to this so often i have to shrink the databases but inspite of shrinking for 2-3 hours i am still able to free only 5-6 gb of space. In sql data i have files like .ndf, .mdf,.ldf . so could you suggest some better way to shrink this files .<br />
 Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lmercante</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-502593</link>
		<dc:creator><![CDATA[lmercante]]></dc:creator>
		<pubDate>Sat, 15 Jun 2013 15:32:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-502593</guid>
		<description><![CDATA[If you keep doing this, dont forget to make a new full backup of your database. When you change your database to simple, you just truncate your TLog every transaction commited. When you change back to full, you must make a full backup of the database that will keep the transactions in the TLog since your full backup.

Regards]]></description>
		<content:encoded><![CDATA[<p>If you keep doing this, dont forget to make a new full backup of your database. When you change your database to simple, you just truncate your TLog every transaction commited. When you change back to full, you must make a full backup of the database that will keep the transactions in the TLog since your full backup.</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krishnendu Sarkar</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-502331</link>
		<dc:creator><![CDATA[Krishnendu Sarkar]]></dc:creator>
		<pubDate>Sat, 15 Jun 2013 07:32:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-502331</guid>
		<description><![CDATA[This works for me perfectly. I have used Pinal&#039;s query, but it does not works for me. Recently from msdn I got this and it works upto my satisfaction level. My DB file now reduced to 1mb. Here is the query-
--This is for Back-up
-- SELECT PROPER DATE BEFORE TAKE THE BACK-UP

BACKUP LOG [GBKSMART] TO  DISK = N&#039;C:\Backup\DBName_log.bak&#039;

--**** Shrinking Database

--USE [DBName];
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE DBName
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (DBName_Log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE DBName
SET RECOVERY FULL;
GO

Thank You.]]></description>
		<content:encoded><![CDATA[<p>This works for me perfectly. I have used Pinal&#8217;s query, but it does not works for me. Recently from msdn I got this and it works upto my satisfaction level. My DB file now reduced to 1mb. Here is the query-<br />
&#8211;This is for Back-up<br />
&#8211; SELECT PROPER DATE BEFORE TAKE THE BACK-UP</p>
<p>BACKUP LOG [GBKSMART] TO  DISK = N&#8217;C:\Backup\DBName_log.bak&#8217;</p>
<p>&#8211;**** Shrinking Database</p>
<p>&#8211;USE [DBName];<br />
GO<br />
&#8211; Truncate the log by changing the database recovery model to SIMPLE.<br />
ALTER DATABASE DBName<br />
SET RECOVERY SIMPLE;<br />
GO<br />
&#8211; Shrink the truncated log file to 1 MB.<br />
DBCC SHRINKFILE (DBName_Log, 1);<br />
GO<br />
&#8211; Reset the database recovery model.<br />
ALTER DATABASE DBName<br />
SET RECOVERY FULL;<br />
GO</p>
<p>Thank You.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RekhaV</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-497432</link>
		<dc:creator><![CDATA[RekhaV]]></dc:creator>
		<pubDate>Tue, 11 Jun 2013 12:40:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-497432</guid>
		<description><![CDATA[Hi pinal, i am more happy by seeing this blog having good stuff..my problem is 
 my data base mdf size is around 75 gb and available size is around 50 gb . when i am trying to shrink it is getting the error 1222. can i check with smaller size or is there is any solution to shrink the db. please help me to resolve in best method.]]></description>
		<content:encoded><![CDATA[<p>Hi pinal, i am more happy by seeing this blog having good stuff..my problem is<br />
 my data base mdf size is around 75 gb and available size is around 50 gb . when i am trying to shrink it is getting the error 1222. can i check with smaller size or is there is any solution to shrink the db. please help me to resolve in best method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #027 &#124; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-468664</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #027 &#124; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 04 May 2013 01:31:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-468664</guid>
		<description><![CDATA[[...] SHRINKFILE and TRUNCATE Log File in SQL Server 2008 There are few absolute No-No&#8217;s in SQL Server environment. There should be no need to shrink and truncate log files in daily routine. Though this blog post was written keeping SQL Server 2008 in mind, this is also valid in SQL Server 2008 R2 and SQL Server 2012. If you are going to shrink your database, I strongly suggest that you read this blog post before it. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SHRINKFILE and TRUNCATE Log File in SQL Server 2008 There are few absolute No-No&#8217;s in SQL Server environment. There should be no need to shrink and truncate log files in daily routine. Though this blog post was written keeping SQL Server 2008 in mind, this is also valid in SQL Server 2008 R2 and SQL Server 2012. If you are going to shrink your database, I strongly suggest that you read this blog post before it. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jagdeep Mankotia</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-452245</link>
		<dc:creator><![CDATA[Jagdeep Mankotia]]></dc:creator>
		<pubDate>Tue, 09 Apr 2013 04:53:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-452245</guid>
		<description><![CDATA[I also faceed the problem of 

Msg 155, Level 15, State 1, Line 1
‘TRUNCATE_ONLY’ is not a recognized BACKUP option.

Then I used the second query. It works fine for me.
Thanks a lot]]></description>
		<content:encoded><![CDATA[<p>I also faceed the problem of </p>
<p>Msg 155, Level 15, State 1, Line 1<br />
‘TRUNCATE_ONLY’ is not a recognized BACKUP option.</p>
<p>Then I used the second query. It works fine for me.<br />
Thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Dickinson</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-444938</link>
		<dc:creator><![CDATA[Simon Dickinson]]></dc:creator>
		<pubDate>Tue, 26 Mar 2013 20:33:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-444938</guid>
		<description><![CDATA[Hi there, been reading your site for a while now, great work &amp; easy to follow! :-)

I had a bit of an issue with a new SQL 2012 setup, it somehow managed to get the Log files set to minimum size of 12GB... not sure how, I used the below to shrink it down (After backing up the Database of course)

USE 
GO
DBCC SHRINKFILE(_log, 1)
BACKUP LOG  to disk =&#039;nul&#039;
DBCC SHRINKFILE(_log, 1)
GO

So now the log files are initial size of 1mb again, my question is... do you have any ideas on how it might of got the initial size to be so large? My understanding of this value is it should remain at what you set it to, &amp; when you backup the log files, shrink back down to this size.

For reference this is a 5GB Database with only minimal changes per day.]]></description>
		<content:encoded><![CDATA[<p>Hi there, been reading your site for a while now, great work &amp; easy to follow! :-)</p>
<p>I had a bit of an issue with a new SQL 2012 setup, it somehow managed to get the Log files set to minimum size of 12GB&#8230; not sure how, I used the below to shrink it down (After backing up the Database of course)</p>
<p>USE<br />
GO<br />
DBCC SHRINKFILE(_log, 1)<br />
BACKUP LOG  to disk =&#8217;nul&#8217;<br />
DBCC SHRINKFILE(_log, 1)<br />
GO</p>
<p>So now the log files are initial size of 1mb again, my question is&#8230; do you have any ideas on how it might of got the initial size to be so large? My understanding of this value is it should remain at what you set it to, &amp; when you backup the log files, shrink back down to this size.</p>
<p>For reference this is a 5GB Database with only minimal changes per day.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhu</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-405645</link>
		<dc:creator><![CDATA[Madhu]]></dc:creator>
		<pubDate>Wed, 09 Jan 2013 11:19:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-405645</guid>
		<description><![CDATA[Below commands works well

ALTER DATABASE ExampleDB SET RECOVERY SIMPLE 
DBCC SHRINKFILE(&#039;ExampleDB_log&#039;, 0, TRUNCATEONLY) 
ALTER DATABASE ExampleDB SET RECOVERY FULL ]]></description>
		<content:encoded><![CDATA[<p>Below commands works well</p>
<p>ALTER DATABASE ExampleDB SET RECOVERY SIMPLE<br />
DBCC SHRINKFILE(&#8216;ExampleDB_log&#8217;, 0, TRUNCATEONLY)<br />
ALTER DATABASE ExampleDB SET RECOVERY FULL </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #010 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-403891</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #010 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 05 Jan 2013 01:31:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-403891</guid>
		<description><![CDATA[[...] In year 2006 I started to blog and honestly I had no idea what is the blogging? It was just a collection of the bookmarks and I had a great time writing them up. I always thought I will read it when I need them. Today when I often read my old blog post &#8211; I feel nostalgic and also realize that I have improved a lot technically as well professionally. One of the blog posts which I wrote regarding how to truncate log file got quite popular with DBA and Developers who got issues with growing log files. My solution was not perfect as it was breaking the chain of log, leading to create issues with point in time restore. In SQL Server 2008 the method I demonstrate to truncate the log was replaced. I wrote following blog post regarding how to truncate the log file in SQL Server 2008 and later version. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] In year 2006 I started to blog and honestly I had no idea what is the blogging? It was just a collection of the bookmarks and I had a great time writing them up. I always thought I will read it when I need them. Today when I often read my old blog post &#8211; I feel nostalgic and also realize that I have improved a lot technically as well professionally. One of the blog posts which I wrote regarding how to truncate log file got quite popular with DBA and Developers who got issues with growing log files. My solution was not perfect as it was breaking the chain of log, leading to create issues with point in time restore. In SQL Server 2008 the method I demonstrate to truncate the log was replaced. I wrote following blog post regarding how to truncate the log file in SQL Server 2008 and later version. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vamshee</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-357030</link>
		<dc:creator><![CDATA[vamshee]]></dc:creator>
		<pubDate>Sun, 07 Oct 2012 21:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-357030</guid>
		<description><![CDATA[dear pinal,
 One of our sql server 2008 server, database log file cosume total dsk space around 150gb space,i am trying to backup log with truncate_only ,show error its not a prefered option.as said aboue if we take log backup to specific loction(BACKUP LOG [TestDb] TO DISK = N’C:\Backup\TestDb.bak’)
how much space we need for 150 gb log space.In our server only 17gb space available in C drive remaining drives are full.Recovery model is full if i change it simple there might be a data loss is there any other options to get back server space.
 Please give me better suggesion .thanks in advance (shirnking log file also not happening, log_reused_space in sys.database is LOG-BACKUP)
please help me.]]></description>
		<content:encoded><![CDATA[<p>dear pinal,<br />
 One of our sql server 2008 server, database log file cosume total dsk space around 150gb space,i am trying to backup log with truncate_only ,show error its not a prefered option.as said aboue if we take log backup to specific loction(BACKUP LOG [TestDb] TO DISK = N’C:\Backup\TestDb.bak’)<br />
how much space we need for 150 gb log space.In our server only 17gb space available in C drive remaining drives are full.Recovery model is full if i change it simple there might be a data loss is there any other options to get back server space.<br />
 Please give me better suggesion .thanks in advance (shirnking log file also not happening, log_reused_space in sys.database is LOG-BACKUP)<br />
please help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Waclawski</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-355169</link>
		<dc:creator><![CDATA[John Waclawski]]></dc:creator>
		<pubDate>Tue, 02 Oct 2012 15:20:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-355169</guid>
		<description><![CDATA[I have implemented code, virtually identical to what you mentioned in the first section where I am altering the recovery model to simple, shrinking the log file, the setting it back to full.  In our case, this is only on our production (live) servers.  This works fine for us when we need to shrink down excessively large log files to recover hard drive space.  But everything I am reading is telling me this is bad &amp; causes fragmentation.  Okay.  Makes sense.
We make nightly backups of our database and log files (in our production/live environment.  In development, we only do database backups because in that environment our recovery model is set to SIMPLE.)

So I went to your next suggestion of &quot;BACKUP LOG [TestDb] TO  DISK = N&#039;C:\Backup\TestDb.bak&#039;&quot; and tried that with our scenario.  Unfortunately, the log file backup that gets created is ~27k-40k in size, this coming from a 97gig log file.  That cannot be right.  And the 97 gig log file does not shrink down at all. 

Am I missing something?

I read Brent Ozar&#039;, and Paul Randel&#039; sections as you suggested.  In my opinion, the weren&#039;t as cut &amp; dry as yours was, although I&#039;m a big fan of Brent Ozar &amp; have watched many of his videos.
Not sure what to at this point.  My backups, despite being done daily, do not seem to be shrinking log files down to a manageable size &amp; the SHRINKFILE comes into play with me more often then I am comfortable with.

Thank you for your time.]]></description>
		<content:encoded><![CDATA[<p>I have implemented code, virtually identical to what you mentioned in the first section where I am altering the recovery model to simple, shrinking the log file, the setting it back to full.  In our case, this is only on our production (live) servers.  This works fine for us when we need to shrink down excessively large log files to recover hard drive space.  But everything I am reading is telling me this is bad &amp; causes fragmentation.  Okay.  Makes sense.<br />
We make nightly backups of our database and log files (in our production/live environment.  In development, we only do database backups because in that environment our recovery model is set to SIMPLE.)</p>
<p>So I went to your next suggestion of &#8220;BACKUP LOG [TestDb] TO  DISK = N&#8217;C:\Backup\TestDb.bak&#8217;&#8221; and tried that with our scenario.  Unfortunately, the log file backup that gets created is ~27k-40k in size, this coming from a 97gig log file.  That cannot be right.  And the 97 gig log file does not shrink down at all. </p>
<p>Am I missing something?</p>
<p>I read Brent Ozar&#8217;, and Paul Randel&#8217; sections as you suggested.  In my opinion, the weren&#8217;t as cut &amp; dry as yours was, although I&#8217;m a big fan of Brent Ozar &amp; have watched many of his videos.<br />
Not sure what to at this point.  My backups, despite being done daily, do not seem to be shrinking log files down to a manageable size &amp; the SHRINKFILE comes into play with me more often then I am comfortable with.</p>
<p>Thank you for your time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SHRI</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-319361</link>
		<dc:creator><![CDATA[SHRI]]></dc:creator>
		<pubDate>Thu, 26 Jul 2012 16:00:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-319361</guid>
		<description><![CDATA[Hi Pinal,
              Sir, I have application on sql server 2008 r2, on a daily basis as a process of End of day, we move data from couple table to archive them and delete the data from the database.

Question: 
How do truncate the log ( as we take full back every day during Night)
How to Free the unused space in the data file.

Please advice, Thanks in advance.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,<br />
              Sir, I have application on sql server 2008 r2, on a daily basis as a process of End of day, we move data from couple table to archive them and delete the data from the database.</p>
<p>Question:<br />
How do truncate the log ( as we take full back every day during Night)<br />
How to Free the unused space in the data file.</p>
<p>Please advice, Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jagan</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-303040</link>
		<dc:creator><![CDATA[Jagan]]></dc:creator>
		<pubDate>Tue, 19 Jun 2012 05:06:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-303040</guid>
		<description><![CDATA[Hi All, 

Unable to increase the log file size and not apossbile to set to unrestricted for the same.

Thanks,
Jagan]]></description>
		<content:encoded><![CDATA[<p>Hi All, </p>
<p>Unable to increase the log file size and not apossbile to set to unrestricted for the same.</p>
<p>Thanks,<br />
Jagan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; A Quick Look at Logging and Ideas around Logging &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-300151</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; A Quick Look at Logging and Ideas around Logging &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Tue, 12 Jun 2012 01:32:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-300151</guid>
		<description><![CDATA[[...] SHRINKFILE and TRUNCATE Log File in SQL Server 2008 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SHRINKFILE and TRUNCATE Log File in SQL Server 2008 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Khalid</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-272806</link>
		<dc:creator><![CDATA[Khalid]]></dc:creator>
		<pubDate>Fri, 06 Apr 2012 07:16:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-272806</guid>
		<description><![CDATA[We have a database of 3 Terabytes. its set to Simple mode. Since we were running out of space therefore one of our junior DBA truncated few tables which were no more required. These were 10 tables which were being used for archive purpose.

the data files were placed on different drives which were running out of space. after executing truncate table commands. The database is showing lot of space that can be freed (off coarse). But we are unable to Shrink database. It either takes too long or gives timeout.

What is the quickest way ?]]></description>
		<content:encoded><![CDATA[<p>We have a database of 3 Terabytes. its set to Simple mode. Since we were running out of space therefore one of our junior DBA truncated few tables which were no more required. These were 10 tables which were being used for archive purpose.</p>
<p>the data files were placed on different drives which were running out of space. after executing truncate table commands. The database is showing lot of space that can be freed (off coarse). But we are unable to Shrink database. It either takes too long or gives timeout.</p>
<p>What is the quickest way ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suresh</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-263243</link>
		<dc:creator><![CDATA[suresh]]></dc:creator>
		<pubDate>Thu, 15 Mar 2012 12:17:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-263243</guid>
		<description><![CDATA[Hello sir,I am facing a problem in a database sql server 2008 which is very slow to load the application in windows forms.I manually increased the size of mdf and ldf file but I dont know the proper way too improve the performence in database tuning I also did the tuning advisor no use.I working.as a windows developer and I am struggling every day with this issue.
please help me]]></description>
		<content:encoded><![CDATA[<p>Hello sir,I am facing a problem in a database sql server 2008 which is very slow to load the application in windows forms.I manually increased the size of mdf and ldf file but I dont know the proper way too improve the performence in database tuning I also did the tuning advisor no use.I working.as a windows developer and I am struggling every day with this issue.<br />
please help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nitin</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-262476</link>
		<dc:creator><![CDATA[Nitin]]></dc:creator>
		<pubDate>Tue, 13 Mar 2012 09:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-262476</guid>
		<description><![CDATA[Pinal,
I see the below mentioned code on the MS site,and according to the below mentioned code we can toggle the recovery model, so what is the best method to  shrink the log file in 2008?


Shrinking a log file to a specified target size
The following example shrinks the log file in the AdventureWorks2008R2 database to 1 MB. To allow the DBCC SHRINKFILE command to shrink the file, the file is first truncated by setting the database recovery model to SIMPLE.

Transact-SQLCopy
 USE AdventureWorks2008R2;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE AdventureWorks2008R2
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (AdventureWorks2008R2_Log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE AdventureWorks2008R2
SET RECOVERY FULL;
GO]]></description>
		<content:encoded><![CDATA[<p>Pinal,<br />
I see the below mentioned code on the MS site,and according to the below mentioned code we can toggle the recovery model, so what is the best method to  shrink the log file in 2008?</p>
<p>Shrinking a log file to a specified target size<br />
The following example shrinks the log file in the AdventureWorks2008R2 database to 1 MB. To allow the DBCC SHRINKFILE command to shrink the file, the file is first truncated by setting the database recovery model to SIMPLE.</p>
<p>Transact-SQLCopy<br />
 USE AdventureWorks2008R2;<br />
GO<br />
&#8211; Truncate the log by changing the database recovery model to SIMPLE.<br />
ALTER DATABASE AdventureWorks2008R2<br />
SET RECOVERY SIMPLE;<br />
GO<br />
&#8211; Shrink the truncated log file to 1 MB.<br />
DBCC SHRINKFILE (AdventureWorks2008R2_Log, 1);<br />
GO<br />
&#8211; Reset the database recovery model.<br />
ALTER DATABASE AdventureWorks2008R2<br />
SET RECOVERY FULL;<br />
GO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-256282</link>
		<dc:creator><![CDATA[Simon]]></dc:creator>
		<pubDate>Fri, 24 Feb 2012 15:47:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-256282</guid>
		<description><![CDATA[I&#039;ve noticed the same &quot;feature&quot; in SQL 2008. Is this a bug? States 95% of log file empty, yet fails to shrink it at all.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve noticed the same &#8220;feature&#8221; in SQL 2008. Is this a bug? States 95% of log file empty, yet fails to shrink it at all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iffi</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-244491</link>
		<dc:creator><![CDATA[iffi]]></dc:creator>
		<pubDate>Fri, 27 Jan 2012 10:50:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-244491</guid>
		<description><![CDATA[i have SQL Server 2008 DB. usually was not performing log backup. now log size is grow to 60 GB and eating drive space. in order to gain space need to shrink log file. 

My database is in FULL recovery and can not change it to simple because i m using sharepoint 2010 database and simple mode is not support in production.

for that i took log full back.
truncate_only is not supported at SQL Server 2008. so i shrink file using management studio interface when i select log file and click to shrink screen close quickly without giving any error or message.  and files does not shrink and its size is still same. please tell how to shrink file and get drive space back. thx.]]></description>
		<content:encoded><![CDATA[<p>i have SQL Server 2008 DB. usually was not performing log backup. now log size is grow to 60 GB and eating drive space. in order to gain space need to shrink log file. </p>
<p>My database is in FULL recovery and can not change it to simple because i m using sharepoint 2010 database and simple mode is not support in production.</p>
<p>for that i took log full back.<br />
truncate_only is not supported at SQL Server 2008. so i shrink file using management studio interface when i select log file and click to shrink screen close quickly without giving any error or message.  and files does not shrink and its size is still same. please tell how to shrink file and get drive space back. thx.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shakib</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-240117</link>
		<dc:creator><![CDATA[Shakib]]></dc:creator>
		<pubDate>Wed, 18 Jan 2012 10:03:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-240117</guid>
		<description><![CDATA[Thank you. This helped me a lot.]]></description>
		<content:encoded><![CDATA[<p>Thank you. This helped me a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sunil Kumar Kaushal</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-222816</link>
		<dc:creator><![CDATA[Sunil Kumar Kaushal]]></dc:creator>
		<pubDate>Wed, 21 Dec 2011 09:51:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-222816</guid>
		<description><![CDATA[Hi Pinal,

Can you please help me. I want to use check point with my job, actually when my job run CPU takes 90-96 % usages which is not good, So please suggest what is the best solution to resolve this issue, so that the job not take a huge CPU usages.

Regards,
Sunil Kumar Kaushal]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>Can you please help me. I want to use check point with my job, actually when my job run CPU takes 90-96 % usages which is not good, So please suggest what is the best solution to resolve this issue, so that the job not take a huge CPU usages.</p>
<p>Regards,<br />
Sunil Kumar Kaushal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arjun</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-209375</link>
		<dc:creator><![CDATA[arjun]]></dc:creator>
		<pubDate>Fri, 02 Dec 2011 13:21:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-209375</guid>
		<description><![CDATA[Hi Pinal,

due to low disk space , i didn’t configure log backup. But Database is in full recovery model. For this reason log file size goes huge every week. Shall I shrink log file weekly once.. OR What i Want to do before shrnk the log file. If i shrink log file weekly once will it make physical fragmentation?]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>due to low disk space , i didn’t configure log backup. But Database is in full recovery model. For this reason log file size goes huge every week. Shall I shrink log file weekly once.. OR What i Want to do before shrnk the log file. If i shrink log file weekly once will it make physical fragmentation?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: senthilsjc</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-209215</link>
		<dc:creator><![CDATA[senthilsjc]]></dc:creator>
		<pubDate>Fri, 02 Dec 2011 07:40:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-209215</guid>
		<description><![CDATA[due to low disk space , i didn&#039;t configure log backup. But Database is in full recovery model. For this reason log file size goes huge every week. Shall I shrink log file weekly once.. OR What i Want to do before shrnk the log file.]]></description>
		<content:encoded><![CDATA[<p>due to low disk space , i didn&#8217;t configure log backup. But Database is in full recovery model. For this reason log file size goes huge every week. Shall I shrink log file weekly once.. OR What i Want to do before shrnk the log file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Mohapatra</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-154935</link>
		<dc:creator><![CDATA[Ivan Mohapatra]]></dc:creator>
		<pubDate>Mon, 08 Aug 2011 08:11:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-154935</guid>
		<description><![CDATA[Dear pinal,

As i am  going through the space issue in my server and my database has a grown bigger so i had deleted some  tables from the database which were not necessary .now i have 6 gb unallocated space availlable in my db i shrink the db and my db recovered around 4 gb spaces as after doing R&amp;D in my db i came to know that my 2 gb spaces is been occupied by the log file .
as my platform is sql server 2008 i can&#039;nt truncate the logfile but as i am taking regular log_backup every 1 min.i  want to make space free  of log file.kindly suggest how to recover the 2 gb space or what to do.]]></description>
		<content:encoded><![CDATA[<p>Dear pinal,</p>
<p>As i am  going through the space issue in my server and my database has a grown bigger so i had deleted some  tables from the database which were not necessary .now i have 6 gb unallocated space availlable in my db i shrink the db and my db recovered around 4 gb spaces as after doing R&amp;D in my db i came to know that my 2 gb spaces is been occupied by the log file .<br />
as my platform is sql server 2008 i can&#8217;nt truncate the logfile but as i am taking regular log_backup every 1 min.i  want to make space free  of log file.kindly suggest how to recover the 2 gb space or what to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: missy</title>
		<link>http://blog.sqlauthority.com/2010/05/03/sql-server-shrinkfile-and-truncate-log-file-in-sql-server-2008/#comment-152232</link>
		<dc:creator><![CDATA[missy]]></dc:creator>
		<pubDate>Mon, 01 Aug 2011 08:23:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8861#comment-152232</guid>
		<description><![CDATA[dbcc shrinkfile(x_log,1)

backup log x to disk = &#039;nul:&#039; --with truncate_onlyto disk = &#039;nul:&#039;

dbcc shrinkfile(x_log,1)]]></description>
		<content:encoded><![CDATA[<p>dbcc shrinkfile(x_log,1)</p>
<p>backup log x to disk = &#8216;nul:&#8217; &#8211;with truncate_onlyto disk = &#8216;nul:&#8217;</p>
<p>dbcc shrinkfile(x_log,1)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
