<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UH.LEE.KA &#187; SQL Server 2008</title>
	<atom:link href="http://www.uhleeka.com/blog/tag/sql-server-2008/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.uhleeka.com/blog</link>
	<description>If you think nobody cares about you, try missing a few car payments.</description>
	<lastBuildDate>Wed, 25 Aug 2010 01:35:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SQL 2008 shrink log file size with no_log alternative</title>
		<link>http://www.uhleeka.com/blog/2009/08/sql-2008-shrink-log-file-size-with-no_lo/</link>
		<comments>http://www.uhleeka.com/blog/2009/08/sql-2008-shrink-log-file-size-with-no_lo/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 01:09:13 +0000</pubDate>
		<dc:creator>uhleeka</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[SQL Server 2008]]></category>

		<guid isPermaLink="false">http://www.uhleeka.com/blog/?p=285</guid>
		<description><![CDATA[Microsoft SQL Server 2008 no longer allows you to truncate the transaction log using the no_log syntax. Essentially, Microsoft decided (arguably correctly) that too many people were &#8220;abusing&#8221; the statement and doing harm to themselves. But when your logfiles have grown too large because you are not backing them up often enough, you can use [...]]]></description>
			<content:encoded><![CDATA[<div style="float:left;width:93px;height:93px;margin:8px 8px 0px 0px;border:solid 1px #600;background-color:#fff;background-repeat:no-repeat;background-position:15px center;background-image:url('http://www.uhleeka.com/blog/wp-content/uploads/2009/02/sql08-3.png');"></div>
<p>Microsoft SQL Server 2008 no longer allows you to truncate the transaction log using the no_log syntax.  Essentially, Microsoft decided (arguably correctly) that too many people were &#8220;abusing&#8221; the statement and doing harm to themselves.<span id="more-285"></span>  </p>
<p>But when your logfiles have grown too large because you are not backing them up often enough, you can use the following code to accomplish the same results as &#8220;with no_log&#8221;.  If you don&#8217;t understand why Microsoft deprecated the &#8220;with no_log&#8221;, you should probably do more digging before you use anything posted here.</p>
<h4 style="clear:both;">The Code</h4>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>USE MASTER
GO
ALTER DATABASE database_name SET RECOVERY SIMPLE
GO
USE database_name
GO
DBCC SHRINKFILE (database_name_log, 1)
GO
ALTER DATABASE database_name SET RECOVERY FULL
GO</pre></div></div>

<p>SQL 2008 returns a table of shrinkfile related results plus the following confirmation:</p>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>(1 row(s) affected)
DBCC execution completed. If DBCC printed error 
messages, contact your system administrator.</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.uhleeka.com/blog/2009/08/sql-2008-shrink-log-file-size-with-no_lo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SQL Logical Name Change by ALTER DATABASE</title>
		<link>http://www.uhleeka.com/blog/2009/08/sqllogical-name-change-by-alter-database/</link>
		<comments>http://www.uhleeka.com/blog/2009/08/sqllogical-name-change-by-alter-database/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 00:22:34 +0000</pubDate>
		<dc:creator>uhleeka</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2008]]></category>

		<guid isPermaLink="false">http://www.uhleeka.com/blog/?p=279</guid>
		<description><![CDATA[Use the following code snippits to identify and rename logical file names in Microsoft SQL Server. Determine the logical file names USE [database_name] GO sp_helpfile GO Rename logical file names USE master GO ALTER DATABASE database_name MODIFY FILE ( NAME = 'current_logical_name', NEWNAME = 'new_logical_name') GO SQL 2008 returns the following confirmation: The file name [...]]]></description>
			<content:encoded><![CDATA[<div style="float:left;width:93px;height:93px;margin:8px 8px 0px 0px;border:solid 1px #600;background-color:#fff;background-repeat:no-repeat;background-position:15px center;background-image:url('http://www.uhleeka.com/blog/wp-content/uploads/2009/02/sql08-3.png');"></div>
<p>Use the following code snippits to identify and rename logical file names in Microsoft SQL Server.<span id="more-279"></span></p>
<h4 style="clear:both;">Determine the logical file names</h4>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>USE [database_name]
GO
sp_helpfile
GO</pre></div></div>

<h4 style="clear:both;">Rename logical file names</h4>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>USE master
GO
ALTER DATABASE database_name
MODIFY FILE  ( NAME = 'current_logical_name', 
NEWNAME = 'new_logical_name')
GO</pre></div></div>

<p>SQL 2008 returns the following confirmation:</p>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>The file name 'new_logical_name' has been set.</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.uhleeka.com/blog/2009/08/sqllogical-name-change-by-alter-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

