<?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/"
	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>Real World DBA</title>
	<atom:link href="http://realworlddba.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://realworlddba.wordpress.com</link>
	<description>Making Life Easier for SQL Server DBAs</description>
	<lastBuildDate>Tue, 15 Nov 2011 13:34:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='realworlddba.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Real World DBA</title>
		<link>http://realworlddba.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://realworlddba.wordpress.com/osd.xml" title="Real World DBA" />
	<atom:link rel='hub' href='http://realworlddba.wordpress.com/?pushpress=hub'/>
		<item>
		<title>ERwin Data Modeler Error: Unable to locate client connectivity software</title>
		<link>http://realworlddba.wordpress.com/2011/09/22/erwin-data-modeler-error-unable-to-locate-client-connectivity-software/</link>
		<comments>http://realworlddba.wordpress.com/2011/09/22/erwin-data-modeler-error-unable-to-locate-client-connectivity-software/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 20:39:46 +0000</pubDate>
		<dc:creator>mxhxrdba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[erwin]]></category>
		<category><![CDATA[mmopn32]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[Unable to locate client connectivity software]]></category>

		<guid isPermaLink="false">http://realworlddba.wordpress.com/?p=133</guid>
		<description><![CDATA[When first trying to connect to SQL Server from an installation of ERwin (regardless if it&#8217;s 32 or 64 bit), you may receive the message:  Unable to locate client connectivity software  There is a very simple fix to this seemingly common problem. Locate the file &#8220;ntwdblib.DLL&#8221; , and copy the dll file to &#8220;AllFusion ERwin Data [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=133&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When first trying to connect to SQL Server from an installation of ERwin (regardless if it&#8217;s 32 or 64 bit), you may receive the message:  <strong>Unable to locate client connectivity software </strong></p>
<p>There is a very simple fix to this seemingly common problem.</p>
<p>Locate the file &#8220;<strong>ntwdblib.DLL</strong>&#8221; , and copy the dll file to &#8220;AllFusion ERwin Data Modeler&#8221; folder.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/realworlddba.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/realworlddba.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/realworlddba.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/realworlddba.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/realworlddba.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/realworlddba.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/realworlddba.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/realworlddba.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/realworlddba.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/realworlddba.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/realworlddba.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/realworlddba.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/realworlddba.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/realworlddba.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=133&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://realworlddba.wordpress.com/2011/09/22/erwin-data-modeler-error-unable-to-locate-client-connectivity-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/657397304abb8bd8000f3d5d7ca9f4a8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mxhxrdba</media:title>
		</media:content>
	</item>
		<item>
		<title>Grant EXECUTE permissions to all stored procedures and functions</title>
		<link>http://realworlddba.wordpress.com/2011/04/20/grant-execute-permissions-to-all-stored-procedures-and-functions/</link>
		<comments>http://realworlddba.wordpress.com/2011/04/20/grant-execute-permissions-to-all-stored-procedures-and-functions/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 13:46:28 +0000</pubDate>
		<dc:creator>mxhxrdba</dc:creator>
				<category><![CDATA[2008]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[execute]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[stored procedures]]></category>

		<guid isPermaLink="false">http://realworlddba.wordpress.com/?p=126</guid>
		<description><![CDATA[Often times we need to grant EXECUTE rights to all stored procedures and functions in a database to a specific user.  Replace &#8216;YourUserName&#8217; with the name of your login, and run on the database in question.  It will produce a line of SQL for each securable that requires a GRANT. declare @username varchar(255) set @username [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=126&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Often times we need to grant EXECUTE rights to all stored procedures and functions in a database to a specific user.  Replace &#8216;YourUserName&#8217; with the name of your login, and run on the database in question.  It will produce a line of SQL for each securable that requires a GRANT.</p>
<pre>declare @username varchar(255)
set @username = 'YourLoginName'
SELECT 'grant exec on ' + QUOTENAME(ROUTINE_SCHEMA) + '.' +
QUOTENAME(ROUTINE_NAME) + ' TO ' + @username FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_NAME),'IsMSShipped') = 0
and ROUTINE_TYPE IN('PROCEDURE', 'FUNCTION')</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/realworlddba.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/realworlddba.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/realworlddba.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/realworlddba.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/realworlddba.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/realworlddba.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/realworlddba.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/realworlddba.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/realworlddba.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/realworlddba.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/realworlddba.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/realworlddba.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/realworlddba.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/realworlddba.wordpress.com/126/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=126&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://realworlddba.wordpress.com/2011/04/20/grant-execute-permissions-to-all-stored-procedures-and-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/657397304abb8bd8000f3d5d7ca9f4a8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mxhxrdba</media:title>
		</media:content>
	</item>
		<item>
		<title>In SQL Server 2008, you receive error 605 and error 824 when you run a query that inserts data into a temporary table in SQL Server</title>
		<link>http://realworlddba.wordpress.com/2011/04/19/you-receive-error-605-and-error-824-when-you-run-a-query-that-inserts-data-into-a-temporary-table-in-sql-server/</link>
		<comments>http://realworlddba.wordpress.com/2011/04/19/you-receive-error-605-and-error-824-when-you-run-a-query-that-inserts-data-into-a-temporary-table-in-sql-server/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 18:46:47 +0000</pubDate>
		<dc:creator>mxhxrdba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[allocation unit]]></category>
		<category><![CDATA[attempt to fetch logical page]]></category>
		<category><![CDATA[error 605]]></category>
		<category><![CDATA[error 804]]></category>
		<category><![CDATA[T4135]]></category>
		<category><![CDATA[trace flag]]></category>

		<guid isPermaLink="false">http://realworlddba.wordpress.com/?p=120</guid>
		<description><![CDATA[If your application makes frequent use of #temp tables in stored procedures, you may see error 605 and 824 in your Event Viewer with the following: Msg 605, Level 21, State 3, Line 1  Attempt to fetch logical page (1:225) in database 2 failed. It belongs to allocation unit 281474980315136 not to 504403158513025024. My immediate suspicion was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=120&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If your application makes frequent use of #temp tables in stored procedures, you may see error 605 and 824 in your Event Viewer with the following:</p>
<pre>Msg 605, Level 21, State 3, Line 1 
Attempt to fetch logical page (1:225) in database 2 failed. It belongs to allocation unit 281474980315136 not to 504403158513025024.</pre>
<p>My immediate suspicion was database corruption, however all DBCC scans came back clean.  Looking at the database ID specified in the error message (2) we know it&#8217;s tempDB, and not our actual production database.</p>
<p>Turns out, in SQL Server 2008, we can enable a trace flag to get around this issue:   <strong>T4135</strong></p>
<p><strong><a href="http://realworlddba.files.wordpress.com/2011/04/t4135.png"><img class="alignnone size-full wp-image-121" title="T4135" src="http://realworlddba.files.wordpress.com/2011/04/t4135.png?w=404&#038;h=446" alt="" width="404" height="446" /></a><br />
</strong></p>
<p>Set it, restart the SQL Server service, and your problems (at least those relevant to errors 608 and 804) should be solved.  I am running the latest build of R2, so no additional updates were necessary.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/realworlddba.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/realworlddba.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/realworlddba.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/realworlddba.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/realworlddba.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/realworlddba.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/realworlddba.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/realworlddba.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/realworlddba.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/realworlddba.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/realworlddba.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/realworlddba.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/realworlddba.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/realworlddba.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=120&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://realworlddba.wordpress.com/2011/04/19/you-receive-error-605-and-error-824-when-you-run-a-query-that-inserts-data-into-a-temporary-table-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/657397304abb8bd8000f3d5d7ca9f4a8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mxhxrdba</media:title>
		</media:content>

		<media:content url="http://realworlddba.files.wordpress.com/2011/04/t4135.png" medium="image">
			<media:title type="html">T4135</media:title>
		</media:content>
	</item>
		<item>
		<title>Saving Changes is Not Permitted</title>
		<link>http://realworlddba.wordpress.com/2011/04/19/saving-changes-is-not-permitted/</link>
		<comments>http://realworlddba.wordpress.com/2011/04/19/saving-changes-is-not-permitted/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 15:25:51 +0000</pubDate>
		<dc:creator>mxhxrdba</dc:creator>
				<category><![CDATA[2008]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[saving changes]]></category>

		<guid isPermaLink="false">http://realworlddba.wordpress.com/?p=115</guid>
		<description><![CDATA[While making a database change that requires a table to be recreated, by default SQL Server Management Studio will not allow you to make the change.  Seems a bit strange that this is out-of-the-box behavior, but it&#8217;s easy to change:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=115&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While making a database change that requires a table to be recreated, by default SQL Server Management Studio will not allow you to make the change.  Seems a bit strange that this is out-of-the-box behavior, but it&#8217;s easy to change:</p>
<p><a href="http://realworlddba.files.wordpress.com/2011/04/savingchanges.png"><img class="alignnone size-full wp-image-116" title="savingchanges" src="http://realworlddba.files.wordpress.com/2011/04/savingchanges.png?w=497&#038;h=302" alt="" width="497" height="302" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/realworlddba.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/realworlddba.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/realworlddba.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/realworlddba.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/realworlddba.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/realworlddba.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/realworlddba.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/realworlddba.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/realworlddba.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/realworlddba.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/realworlddba.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/realworlddba.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/realworlddba.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/realworlddba.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=115&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://realworlddba.wordpress.com/2011/04/19/saving-changes-is-not-permitted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/657397304abb8bd8000f3d5d7ca9f4a8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mxhxrdba</media:title>
		</media:content>

		<media:content url="http://realworlddba.files.wordpress.com/2011/04/savingchanges.png" medium="image">
			<media:title type="html">savingchanges</media:title>
		</media:content>
	</item>
		<item>
		<title>Row and Page Level Compression in SQL Server 2008</title>
		<link>http://realworlddba.wordpress.com/2010/12/03/107/</link>
		<comments>http://realworlddba.wordpress.com/2010/12/03/107/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 22:08:18 +0000</pubDate>
		<dc:creator>mxhxrdba</dc:creator>
				<category><![CDATA[2008]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[sql server 2008 enterprise datacenter row page compression]]></category>

		<guid isPermaLink="false">http://realworlddba.wordpress.com/?p=107</guid>
		<description><![CDATA[A summary of row and page level data compression in SQL Server 2008<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=107&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A new type of data compression was introduced in SQL Server 2008, available in Enterprise and Datacenter editions.  Compression yields performance gains, as both storage and memory requirements are reduced due to the data being compressed both on disk on in the data cache.    I/O is reduced by there being less data to actually have to read; however, this benefit comes at extra CPU overhead, but the net gain should be an overall performance boost.</p>
<p>What types of objects can be compressed?  Tables, nonclustered indexes, and indexed views.</p>
<p>There are two basic types of compression in SQL Server 2008:</p>
<p><strong>Row-Level Compression</strong>:  not exactly true data compression.  Savings are achieved here by employing a more efficient storage format for fixed-length datatypes.   For example, the <strong>int </strong>datatype requires 4 bytes of storage, regardless of how much data is actually stored in the field, NULLs included.  Row-level compression allows the usage of only the actual amount of storage required.  Less compression is achieved by row-level compression then by page-level, but less CPU overhead is incurred as well.</p>
<p>To enable row-level compression on a particular table:</p>
<p><code>ALTER TABLE tableName REBUILD WITH (DATA_COMPRESSION=ROW)</code></p>
<p><strong>Page-Level Compression</strong>: True data compression.  Data is compresses by storing repeating values or common prefixes only once.  When page-level compression is employed, row-level compression is switched on as well.  The nature of the data stored in the object you are compressing will define how much the data is actually compressed.  If there is a good deal of repeating data, compression will be highly effective.</p>
<p>To enable page-level compression on a particular table:</p>
<p><code>ALTER TABLE tableName REBUILD WITH (DATA_COMPRESSION=PAGE)</code></p>
<p>Page compression is applied only after a data page is full, while row-level compression is applied immediately.</p>
<p><strong>Is data compression right for you?</strong></p>
<p>To determine how a table will look post-compression, SQL Server 2008 provides a stored procedure to calculate the potential effects of compression by sampling 5,000 data pages of the object in question.  (This works by copying the candidate pages to tempDB, compressing them, and reporting the results back to the user).</p>
<p><code>[ @schema_name = ] ‘<em>schema_name</em>’</code></p>
<p><code>, [ @object_name = ] ‘<em>object_nam</em>e’</code></p>
<p><code>, [@index_id = ] <em>index_id</em></code></p>
<p><code>, [@partition_number = ] <em>partition_number</em></p>
<p></code></p>
<p>&nbsp;</p>
<p><code>, [@data_compression = ] ‘<em>data_compression</em>’<br />
</code><br />
Either ‘ROW’ or ‘PAGE’ may be specified for the @data_compression parameter.</p>
<p>A sample call:<br />
<code><br />
use myDatabase</code></p>
<p><code>go</code></p>
<p><code>exec sp_estimate_data_compression_savings ‘dbo’, ‘myTable’, null, null, ‘PAGE’</code></p>
<p><code> </code></p>
<p>&nbsp;</p>
<p><code>go</code></p>
<p>Implementing via Management Studio:</p>
<p>Right click on the table you would like to compress, go to Storage&#8211;&gt;Manage Compression</p>
<p><img class="alignnone" title="Compression 1" src="http://realworlddba.files.wordpress.com/2010/12/compression1.jpg?w=421&#038;h=350" alt="" width="421" height="350" /></p>
<p>The next page will allow you to select the compression type, and the partition you would like affected (if the table in question has multiple partitions).</p>
<p><img title="Compression 2" src="http://realworlddba.files.wordpress.com/2010/12/compression2.jpg?w=420&#038;h=350" alt="" width="420" height="350" /></p>
<p>The next screen simply affects your changes to the database, either by generating a script (my preferred method) or running it straight into your database.</p>
<p><img class="alignnone" title="Compression 3" src="http://realworlddba.files.wordpress.com/2010/12/compression31.jpg?w=420&#038;h=350" alt="" width="420" height="350" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/realworlddba.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/realworlddba.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/realworlddba.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/realworlddba.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/realworlddba.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/realworlddba.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/realworlddba.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/realworlddba.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/realworlddba.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/realworlddba.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/realworlddba.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/realworlddba.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/realworlddba.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/realworlddba.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=107&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://realworlddba.wordpress.com/2010/12/03/107/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/657397304abb8bd8000f3d5d7ca9f4a8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mxhxrdba</media:title>
		</media:content>

		<media:content url="http://realworlddba.files.wordpress.com/2010/12/compression1.jpg" medium="image">
			<media:title type="html">Compression 1</media:title>
		</media:content>

		<media:content url="http://realworlddba.files.wordpress.com/2010/12/compression2.jpg" medium="image">
			<media:title type="html">Compression 2</media:title>
		</media:content>

		<media:content url="http://realworlddba.files.wordpress.com/2010/12/compression31.jpg" medium="image">
			<media:title type="html">Compression 3</media:title>
		</media:content>
	</item>
		<item>
		<title>TFS 2008 Database Backup and Restore scripts</title>
		<link>http://realworlddba.wordpress.com/2010/11/18/tfs-2008-database-backup-and-restore-scripts/</link>
		<comments>http://realworlddba.wordpress.com/2010/11/18/tfs-2008-database-backup-and-restore-scripts/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 20:24:55 +0000</pubDate>
		<dc:creator>mxhxrdba</dc:creator>
				<category><![CDATA[2008]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Restore]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sysft_TeamFoundationServer10FullTextCatalog]]></category>
		<category><![CDATA[TFS]]></category>

		<guid isPermaLink="false">http://realworlddba.wordpress.com/?p=97</guid>
		<description><![CDATA[These scripts can come handy when performing a migration based upgrade. Backup Script BACKUP DATABASE [ReportServer] TO  DISK = N&#8217;E:\Backups\ReportServer.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;ReportServer-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10 GO BACKUP DATABASE [ReportServerTempDB] TO  DISK = N&#8217;E:\Backups\ReportServerTempDB.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;ReportServerTempDB-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=97&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>These scripts can come handy when performing a migration based upgrade.</p>
<h3>Backup Script</h3>
<p>BACKUP DATABASE [ReportServer] TO  DISK = N&#8217;E:\Backups\ReportServer.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;ReportServer-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10<br />
GO</p>
<p>BACKUP DATABASE [ReportServerTempDB] TO  DISK = N&#8217;E:\Backups\ReportServerTempDB.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;ReportServerTempDB-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10<br />
GO</p>
<p>BACKUP DATABASE [TfsActivityLogging] TO  DISK = N&#8217;E:\Backups\TfsActivityLogging.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;TfsActivityLogging-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10<br />
GO</p>
<p>BACKUP DATABASE [TfsBuild] TO  DISK = N&#8217;E:\Backups\TfsBuild.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;TfsBuild-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10<br />
GO</p>
<p>BACKUP DATABASE [TfsIntegration] TO  DISK = N&#8217;E:\Backups\TfsIntegration.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;TfsIntegration-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10<br />
GO</p>
<p>BACKUP DATABASE [TfsVersionControl] TO  DISK = N&#8217;E:\Backups\TfsVersionControl.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;TfsVersionControl-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10<br />
GO</p>
<p>BACKUP DATABASE [TfsWarehouse] TO  DISK = N&#8217;E:\Backups\TfsWarehouse.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;TfsWarehouse-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10<br />
GO</p>
<p>BACKUP DATABASE [TfsWorkItemTracking] TO  DISK = N&#8217;E:\Backups\TfsWorkItemTracking.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;TfsWorkItemTracking-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10<br />
GO</p>
<p>BACKUP DATABASE [TfsWorkItemTrackingAttachments] TO  DISK = N&#8217;E:\Backups\TfsWorkItemTrackingAttachments.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;TfsWorkItemTrackingAttachments-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10<br />
GO</p>
<p>BACKUP DATABASE [WSS_AdminContent] TO  DISK = N&#8217;E:\Backups\WSS_AdminContent.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;WSS_AdminContent-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10<br />
GO</p>
<p>BACKUP DATABASE [WSS_Config] TO  DISK = N&#8217;E:\Backups\WSS_Config.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;WSS_Config-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10<br />
GO</p>
<p>BACKUP DATABASE [WSS_Content] TO  DISK = N&#8217;E:\Backups\WSS_Content.bak&#8217; WITH NOFORMAT, NOINIT,  NAME = N&#8217;WSS_Content-Full Database Backup&#8217;, SKIP, NOREWIND, NOUNLOAD,  STATS = 10<br />
GO</p>
<h3>Restore Script</h3>
<p>RESTORE DATABASE [ReportServer] FROM  DISK = N&#8217;E:\Backups\ReportServer.bak&#8217; WITH  FILE = 1,  MOVE N&#8217;ReportServer&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\ReportServer.mdf&#8217;,  MOVE N&#8217;ReportServer_log&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\ReportServer.LDF&#8217;,  NOUNLOAD,  STATS = 10<br />
GO</p>
<p>RESTORE DATABASE [ReportServerTempDB] FROM  DISK = N&#8217;E:\Backups\ReportServerTempDB.bak&#8217; WITH  FILE = 1,  MOVE N&#8217;ReportServerTempDB&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\ReportServerTempDB.mdf&#8217;,  MOVE N&#8217;ReportServerTempDB_log&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\ReportServerTempDB_1.LDF&#8217;,  NOUNLOAD,  STATS = 10<br />
GO</p>
<p>RESTORE DATABASE [TfsActivityLogging] FROM  DISK = N&#8217;E:\Backups\TfsActivityLogging.bak&#8217; WITH  FILE = 1,  MOVE N&#8217;TfsActivityLogging&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsActivityLogging.mdf&#8217;,  MOVE N&#8217;TfsActivityLogging_log&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsActivityLogging_1.LDF&#8217;,  NOUNLOAD,  STATS = 10<br />
GO</p>
<p>RESTORE DATABASE [TfsBuild] FROM  DISK = N&#8217;E:\Backups\TfsBuild.bak&#8217; WITH  FILE = 1,  MOVE N&#8217;TfsBuild&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsBuild.mdf&#8217;,  MOVE N&#8217;TfsBuild_log&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsBuild_1.LDF&#8217;,  NOUNLOAD,  STATS = 10<br />
GO</p>
<p>RESTORE DATABASE [TfsIntegration] FROM  DISK = N&#8217;E:\Backups\TfsIntegration.bak&#8217; WITH  FILE = 1,  MOVE N&#8217;TfsIntegration&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsIntegration.mdf&#8217;,  MOVE N&#8217;TfsIntegration_log&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsIntegration_1.LDF&#8217;,  NOUNLOAD,  STATS = 10<br />
GO</p>
<p>RESTORE DATABASE [TfsVersionControl] FROM  DISK = N&#8217;E:\Backups\TfsVersionControl.bak&#8217; WITH  FILE = 1,  MOVE N&#8217;TfsVersionControl&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsVersionControl.mdf&#8217;,  MOVE N&#8217;TfsVersionControl_log&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsVersionControl_1.LDF&#8217;,  NOUNLOAD,  STATS = 10<br />
GO</p>
<p>RESTORE DATABASE [TfsWarehouse] FROM  DISK = N&#8217;E:\Backups\TfsWarehouse.bak&#8217; WITH  FILE = 1,  MOVE N&#8217;TfsWarehouse&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsWarehouse.mdf&#8217;,  MOVE N&#8217;TfsWarehouse_log&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsWarehouse.LDF&#8217;,  NOUNLOAD,  STATS = 10<br />
GO</p>
<p>RESTORE DATABASE [TfsWorkItemTracking] FROM  DISK = N&#8217;E:\Backups\TfsWorkItemTracking.bak&#8217; WITH  FILE = 1,  MOVE N&#8217;TfsWorkItemTracking&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsWorkItemTracking.mdf&#8217;,  MOVE N&#8217;TfsWorkItemTracking_log&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsWorkItemTracking.LDF&#8217;,  MOVE N&#8217;sysft_TeamFoundationServer10FullTextCatalog&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsWorkItemTracking.TeamFoundationServer10FullTextCatalog&#8217;,  NOUNLOAD,  STATS = 10<br />
GO</p>
<p>RESTORE DATABASE [TfsWorkItemTrackingAttachments] FROM  DISK = N&#8217;E:\Backups\TfsWorkItemTrackingAttachments.bak&#8217; WITH  FILE = 1,  MOVE N&#8217;TfsWorkItemTrackingAttachments&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsWorkItemTrackingAttachments.mdf&#8217;,  MOVE N&#8217;TfsWorkItemTrackingAttachments_log&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TfsWorkItemTrackingAttachments_1.LDF&#8217;,  NOUNLOAD,  STATS = 10<br />
GO</p>
<p>RESTORE DATABASE [WSS_AdminContent] FROM  DISK = N&#8217;E:\Backups\WSS_AdminContent.bak&#8217; WITH  FILE = 1,  MOVE N&#8217;WSS_AdminContent&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\WSS_AdminContent.mdf&#8217;,  MOVE N&#8217;WSS_AdminContent_log&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\WSS_AdminContent_1.LDF&#8217;,  NOUNLOAD,  STATS = 10<br />
GO</p>
<p>RESTORE DATABASE [WSS_Config] FROM  DISK = N&#8217;E:\Backups\WSS_Config.bak&#8217; WITH  FILE = 1,  MOVE N&#8217;WSS_Config&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\WSS_Config.mdf&#8217;,  MOVE N&#8217;WSS_Config_log&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\WSS_Config_1.LDF&#8217;,  NOUNLOAD,  STATS = 10<br />
GO</p>
<p>RESTORE DATABASE [WSS_Content] FROM  DISK = N&#8217;E:\Backups\WSS_Content.bak&#8217; WITH  FILE = 1,  MOVE N&#8217;WSS_Content&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\WSS_Content.mdf&#8217;,  MOVE N&#8217;WSS_Content_log&#8217; TO N&#8217;E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\WSS_Content_1.LDF&#8217;,  NOUNLOAD,  STATS = 10<br />
GO</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/realworlddba.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/realworlddba.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/realworlddba.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/realworlddba.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/realworlddba.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/realworlddba.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/realworlddba.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/realworlddba.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/realworlddba.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/realworlddba.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/realworlddba.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/realworlddba.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/realworlddba.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/realworlddba.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=97&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://realworlddba.wordpress.com/2010/11/18/tfs-2008-database-backup-and-restore-scripts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/657397304abb8bd8000f3d5d7ca9f4a8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mxhxrdba</media:title>
		</media:content>
	</item>
		<item>
		<title>Database Mirroring &#8211; Login failure after role switch</title>
		<link>http://realworlddba.wordpress.com/2010/10/28/database-mirroring-login-failure-after-role-switch/</link>
		<comments>http://realworlddba.wordpress.com/2010/10/28/database-mirroring-login-failure-after-role-switch/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 19:20:57 +0000</pubDate>
		<dc:creator>mxhxrdba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[sql database mirroring login failure mirror]]></category>

		<guid isPermaLink="false">http://realworlddba.wordpress.com/?p=92</guid>
		<description><![CDATA[After configuring database mirroring and testing a failover, you may be unable to log into the new principal database. This occurs because the database user is not associated with a SQL server login (mismatched SIDs). Running sp_change_users_login &#8216;auto_fix&#8217;, &#8216;userName&#8217; will correct this, but we need to avoid the situation altogether so a seamless failover is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=92&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After configuring database mirroring and testing a failover, you may be unable to log into the new principal database.  This occurs because the database user is not associated with a SQL server login (mismatched SIDs).  Running sp_change_users_login &#8216;auto_fix&#8217;, &#8216;userName&#8217; will correct this, but we need to avoid the situation altogether so a seamless failover is possible.  </p>
<p>During the mirroring setup, we can run the following query on the principal to generate the SQL necessary to correctly create the logins on the mirror server.</p>
<p>SELECT<br />
&#8216;create login [' + p.name + '] &#8216; +<br />
case when p.type in(&#8216;U&#8217;,'G&#8217;) then &#8216;from windows &#8216; else &#8221; end +<br />
&#8216;with &#8216; +<br />
case when p.type = &#8216;S&#8217; then &#8216;password = &#8216; + master.sys.fn_varbintohexstr(l.password_hash) + &#8216; hashed, &#8216; +<br />
&#8216;sid = &#8216; + master.sys.fn_varbintohexstr(l.sid) + &#8216;, check_expiration = &#8216; +<br />
case when l.is_policy_checked &gt; 0 then &#8216;ON, &#8216; else &#8216;OFF, &#8216; end + &#8216;check_policy = &#8216; + case when l.is_expiration_checked &gt; 0 then &#8216;ON, &#8216; else &#8216;OFF, &#8216; end +<br />
case when l.credential_id &gt; 0 then &#8216;credential = &#8216; + c.name + &#8216;, &#8216; else &#8221; end<br />
else &#8221; end +<br />
&#8216;default_database = &#8216; + p.default_database_name +<br />
case when len(p.default_language_name) &gt; 0 then &#8216;, default_language = &#8216; + p.default_language_name else &#8221; end</p>
<p>FROM sys.server_principals p<br />
LEFT JOIN sys.sql_logins l<br />
ON p.principal_id = l.principal_id<br />
LEFT JOIN sys.credentials c<br />
ON  l.credential_id = c.credential_id<br />
WHERE p.type in(&#8216;S&#8217;,'U&#8217;,'G&#8217;)<br />
AND p.name  &#8216;sa&#8217;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/realworlddba.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/realworlddba.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/realworlddba.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/realworlddba.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/realworlddba.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/realworlddba.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/realworlddba.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/realworlddba.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/realworlddba.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/realworlddba.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/realworlddba.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/realworlddba.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/realworlddba.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/realworlddba.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=92&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://realworlddba.wordpress.com/2010/10/28/database-mirroring-login-failure-after-role-switch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/657397304abb8bd8000f3d5d7ca9f4a8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mxhxrdba</media:title>
		</media:content>
	</item>
		<item>
		<title>Generating SQL from Visio (non-Enterprise Architect versions)</title>
		<link>http://realworlddba.wordpress.com/2010/10/26/generating-sql-from-visio-non-enterprise-architect-versions/</link>
		<comments>http://realworlddba.wordpress.com/2010/10/26/generating-sql-from-visio-non-enterprise-architect-versions/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 23:54:26 +0000</pubDate>
		<dc:creator>mxhxrdba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://realworlddba.wordpress.com/?p=93</guid>
		<description><![CDATA[sql from visio 2003 2000 ddl  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=93&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Creating an ERD without the ability to generate SQL from it is of questionable value.  If you&#8217;re not using a CASE tool such as ERwin (and why not?), you may need to generate a DDL from your Visio layout.  If typing out SQL statements proves too laborious, here is a great workaround to generate workable SQL from your Visio diagram.</p>
<p>A company called <a href="http://www.orthogonalsoftware.com/" target="external">Orthogonal Software</a> has a Visio plug-in called Orthogonal Toolbox that will allow you to export the data from the Visio document to an XML File.  Additionally, Orthogonal has provided a couple <a href="http://www.orthogonalsoftware.com/releasenotes.html" target="external">XSLT’s that you can apply</a> (look for XSLT on that page). One of which has been altered to export SQL.</p>
<p>Once you have the plug-in installed and the XSLT&#8217;s downloaded, it&#8217;s pretty simple.  Use the plug-in to export to XML, and apply the stylesheet when exporting.  Presto- DDL statements for your structures.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/realworlddba.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/realworlddba.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/realworlddba.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/realworlddba.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/realworlddba.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/realworlddba.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/realworlddba.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/realworlddba.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/realworlddba.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/realworlddba.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/realworlddba.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/realworlddba.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/realworlddba.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/realworlddba.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=93&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://realworlddba.wordpress.com/2010/10/26/generating-sql-from-visio-non-enterprise-architect-versions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/657397304abb8bd8000f3d5d7ca9f4a8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mxhxrdba</media:title>
		</media:content>
	</item>
		<item>
		<title>Row many columns and rows are in my tables&#8230;and which tables are largest?</title>
		<link>http://realworlddba.wordpress.com/2010/10/25/row-many-columns-and-rows-are-in-my-tables-and-which-tables-are-largest/</link>
		<comments>http://realworlddba.wordpress.com/2010/10/25/row-many-columns-and-rows-are-in-my-tables-and-which-tables-are-largest/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 21:36:30 +0000</pubDate>
		<dc:creator>mxhxrdba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[sql 2000 2005 tables row size kb]]></category>

		<guid isPermaLink="false">http://realworlddba.wordpress.com/?p=90</guid>
		<description><![CDATA[CREATE TABLE #temp ( table_name sysname , row_count INT, reserved_size VARCHAR(50), data_size VARCHAR(50), index_size VARCHAR(50), unused_size VARCHAR(50)) SET NOCOUNT ON INSERT #temp EXEC sp_msforeachtable &#8216;sp_spaceused &#8221;?&#8221;&#8217; SELECT a.table_name, a.row_count, COUNT(*) AS col_count, a.data_size FROM #temp a INNER JOIN information_schema.columns b ON a.table_name collate database_default = b.table_name collate database_default GROUP BY a.table_name, a.row_count, a.data_size ORDER BY [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=90&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>CREATE TABLE #temp (<br />
table_name sysname ,<br />
row_count INT,<br />
reserved_size VARCHAR(50),<br />
data_size VARCHAR(50),<br />
index_size VARCHAR(50),<br />
unused_size VARCHAR(50))<br />
SET NOCOUNT ON<br />
INSERT #temp<br />
EXEC sp_msforeachtable &#8216;sp_spaceused &#8221;?&#8221;&#8217;<br />
SELECT a.table_name,<br />
a.row_count,<br />
COUNT(*) AS col_count,<br />
a.data_size<br />
FROM #temp a<br />
INNER JOIN information_schema.columns b<br />
ON a.table_name collate database_default<br />
= b.table_name collate database_default<br />
GROUP BY a.table_name, a.row_count, a.data_size<br />
ORDER BY CAST(REPLACE(a.data_size, &#8216; KB&#8217;, &#8221;) AS integer) DESC<br />
DROP TABLE #temp</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/realworlddba.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/realworlddba.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/realworlddba.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/realworlddba.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/realworlddba.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/realworlddba.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/realworlddba.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/realworlddba.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/realworlddba.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/realworlddba.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/realworlddba.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/realworlddba.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/realworlddba.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/realworlddba.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=90&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://realworlddba.wordpress.com/2010/10/25/row-many-columns-and-rows-are-in-my-tables-and-which-tables-are-largest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/657397304abb8bd8000f3d5d7ca9f4a8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mxhxrdba</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Profiler: Audit Logout</title>
		<link>http://realworlddba.wordpress.com/2010/05/25/sql-profiler-audit-logout/</link>
		<comments>http://realworlddba.wordpress.com/2010/05/25/sql-profiler-audit-logout/#comments</comments>
		<pubDate>Tue, 25 May 2010 15:38:30 +0000</pubDate>
		<dc:creator>mxhxrdba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[sql server profiler audit logout event]]></category>

		<guid isPermaLink="false">http://realworlddba.wordpress.com/2010/05/25/sql-profiler-audit-logout/</guid>
		<description><![CDATA[Q: A developer reported very high duration times for the SQL Profiler &#8220;Audit Logout&#8221; event in his development environment, and inquired how to decrease this time. A: When a connection disconnects from SQL Server, &#8220;Audit Logout&#8221; reports the duration the entire connection existed. If the connection was open for a long time, this number can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=89&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Q:<br />
A developer reported very high duration times for the SQL Profiler &#8220;Audit Logout&#8221; event in his development environment, and inquired how to decrease this time.</p>
<p>A:<br />
When a connection disconnects from SQL Server, &#8220;Audit Logout&#8221; reports the duration the entire connection existed.  If the connection was open for a long time, this number can be quite large.  It&#8217;s not indicative of any real performance issue, but is often times confused with one due to the large duration time. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/realworlddba.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/realworlddba.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/realworlddba.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/realworlddba.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/realworlddba.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/realworlddba.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/realworlddba.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/realworlddba.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/realworlddba.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/realworlddba.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/realworlddba.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/realworlddba.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/realworlddba.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/realworlddba.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=realworlddba.wordpress.com&amp;blog=2632065&amp;post=89&amp;subd=realworlddba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://realworlddba.wordpress.com/2010/05/25/sql-profiler-audit-logout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/657397304abb8bd8000f3d5d7ca9f4a8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mxhxrdba</media:title>
		</media:content>
	</item>
	</channel>
</rss>
