<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0AFSXk5cCp7ImA9WhBUFUo.&quot;"><id>tag:blogger.com,1999:blog-4149930</id><updated>2013-05-03T05:01:58.728-04:00</updated><category term="Visual Studio" /><category term="sys.dm_db_index_usage_stats" /><category term="msg 1770" /><category term="tinyurl.com" /><category term="create table" /><category term="sys.columns" /><category term="stuff" /><category term="floor" /><category term="db_name" /><category term="1204" /><category term="outer join" /><category term="Job" /><category term="scan density" /><category term="sparse" /><category term="email" /><category term="coalesce" /><category term="alter database" /><category term="collation" /><category term="SSIS" /><category term="isstatistics" /><category term="indexproperty" /><category term="ansi_nulls" /><category term="table" /><category term="extended properties" /><category term="hobt" /><category term="foreign key" /><category term="group by" /><category term="clustered index" /><category term="lock" /><category term="commit" /><category term="agent ransack" /><category term="dbcc shrinkfile" /><category term="Visio" /><category term="sp_send_dbmail" /><category term="extent changes" /><category term="sys.tables" /><category term="log10" /><category term="int" /><category term="sys.sp_addextendedproperty" /><category term="non-clustered index" /><category term="logical fragmentation" /><category term="substring" /><category term="system stored procedure" /><category term="implicit conversion" /><category term="ldf" /><category term="mdf" /><category term="sysdatabases" /><category term="sys.dm_exec_sql_text" /><category term="xp_fileexist" /><category term="charindex" /><category term="screen saver" /><category term="SQLServerPedia Syndication" /><category term="sys.sp_dropextendedproperty" /><category term="statistics" /><category term="error" /><category term="arithabort" /><category term="plural" /><category term="nomenclature" /><category term="datalength" /><category term="tableresults" /><category term="alter table" /><category term="concat_null_yields_null" /><category term="add constraint" /><category term="master database" /><category term="hexadecimal" /><category term="rowcount" /><category term="defragmentation" /><category term="uid" /><category term="drop" /><category term="sys.dm_exec_query_stats" /><category term="dbcc cleantable" /><category term="is_primary_key" /><category term="sp_sqlexec" /><category term="ishypothetical" /><category term="b-tree" /><category term="sp_msforeachdb" /><category term="sys.schemas" /><category term="ansi_padding" /><category term="drop index" /><category term="page splits" /><category term="begin transaction" /><category term="is_nullable" /><category term="nvarchar" /><category term="catch" /><category term="dbcc updateusage" /><category term="fragmentation" /><category term="sys.sp_msforeachdb" /><category term="sys.key_constraints" /><category term="internal fragmentation" /><category term="sysname" /><category term="isunique" /><category term="virtual log file" /><category term="sys.dm_exec_requests" /><category term="nowait" /><category term="nocount" /><category term="principals" /><category term="xtype" /><category term="editionid" /><category term="join" /><category term="replace" /><category term="sys.indexes" /><category term="dbcc showcontig" /><category term="raiserror" /><category term="singular" /><category term="sysjobhistory" /><category term="dbcc checkdb" /><category term="nonclustered index" /><category term="execute as caller" /><category term="identity" /><category term="index" /><category term="information_schema" /><category term="use" /><category term="trancount" /><category term="sql_oj_capabilities" /><category term="alter index" /><category term="sys.sp_autostats" /><category term="templates" /><category term="profiler" /><category term="database trigger" /><category term="order by" /><category term="drop table" /><category term="enable trigger" /><category term="sys.sp_createstats" /><category term="disk" /><category term="truncateonly" /><category term="insert" /><category term="drop constraint" /><category term="varbinary" /><category term="xp_cmdshell" /><category term="SSMS" /><category term="object_id" /><category term="object_name" /><category term="quoted_identifier" /><category term="indexid" /><category term="cast" /><category term="sys.sysprocesses" /><category term="sysobjects" /><category term="function" /><category term="roles" /><category term="bigint" /><category term="rtrim" /><category term="sys.types" /><category term="statistics io" /><category term="reverse" /><category term="cpu" /><category term="backup" /><category term="serverproperty" /><category term="all_indexes" /><category term="dbcc loginfo" /><category term="rebuild" /><category term="tinyint" /><category term="truncate table" /><category term="xact_abort" /><category term="nullif" /><category term="forwarding pointer" /><category term="from" /><category term="log file" /><category term="no_infomsgs" /><category term="skibear" /><category term="undocumented" /><category term="sys.dm_exec_query_plan" /><category term="drop statistics" /><category term="case" /><category term="rebuild. reorganize" /><category term="exec" /><category term="vista mail" /><category term="comma-separated" /><category term="permissions" /><category term="group by rollup" /><category term="try" /><category term="escape" /><category term="sys.stats_columns" /><category term="checkpoint" /><category term="external fragmentation" /><category term="partition" /><category term="sys.partitions" /><category term="isnull" /><category term="disable trigger" /><category term="replacechar" /><category term="dbcc dbreindex" /><category term="sysindexes" /><category term="nvarchar(max)" /><category term="vista" /><category term="sys.stats" /><category term="bit" /><category term="sqlcmd" /><category term="quotename" /><category term="whitespace" /><category term="msg 1750" /><category term="sys.dm_exec_cached_plans" /><category term="sp_msforeachtable" /><category term="is_ms_shipped" /><category term="pivot" /><category term="indexed views" /><category term="unique constraint" /><category term="eml files" /><category term="delete" /><category term="transactions" /><category term="exception handling" /><category term="batteries" /><category term="grouping" /><category term="ansi_warnings" /><category term="grants" /><category term="default constraint" /><category term="primary key" /><category term="sys.databases" /><category term="sysjobs_view" /><category term="is_identity" /><category term="is_system_named" /><category term="convert" /><category term="views" /><category term="trigger" /><category term="ntfscontrolfile" /><category term="single quotes" /><category term="sys.allocation_units" /><category term="sys.sp_msforeachtable" /><category term="type_desc" /><category term="sys.index_columns" /><category term="extent" /><category term="sys.extended_properties" /><category term="fillfactor" /><category term="error_message" /><category term="user_name" /><category term="is_unique_constraint" /><category term="sys.objects" /><category term="avg" /><category term="money" /><title>SQL Soundings</title><subtitle type="html">&lt;b&gt;sounding&lt;/b&gt; - &lt;i&gt;noun&lt;/i&gt;. 1. the act of taking a measure of depth&lt;br&gt;           2. a probe of an environment</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://sqlsoundings.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>69</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/YnzV" /><feedburner:info uri="blogspot/ynzv" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="license" type="text/html" href="http://creativecommons.org/licenses/by-sa/2.0/" /><entry gd:etag="W/&quot;DkMEQXY8eSp7ImA9WhVaE00.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-1656442707849406645</id><published>2012-06-10T01:00:00.000-04:00</published><updated>2012-06-10T01:00:00.871-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-10T01:00:00.871-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sys.sp_msforeachdb" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.key_constraints" /><category scheme="http://www.blogger.com/atom/ns#" term="is_system_named" /><title>Display All System-Named Constraints in All User Databases</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/1656442707849406645/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2012/06/display-all-system-named-constraints-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/1656442707849406645?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/1656442707849406645?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/kX2uuG_kqxA/display-all-system-named-constraints-in.html" title="Display All System-Named Constraints in All User Databases" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>0</thr:total><content type="html">In my previous post, I mentioned that system-named objects get arbitrary names (like, "PK__Executio__05F5D74515DA3E5D"), and that this makes comparing database schemas difficult. To fix this problem, you have to rename the offending constraints, and to do that, you have to find them.  So, this script displays all the system-named constraints in all the databases.-- Display all the system-named &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=kX2uuG_kqxA:BJD05tWNMro:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=kX2uuG_kqxA:BJD05tWNMro:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=kX2uuG_kqxA:BJD05tWNMro:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=kX2uuG_kqxA:BJD05tWNMro:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=kX2uuG_kqxA:BJD05tWNMro:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/kX2uuG_kqxA" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2012/06/display-all-system-named-constraints-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEHRnc-eip7ImA9WhVaEks.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-5861560206390950379</id><published>2012-06-09T14:02:00.000-04:00</published><updated>2012-06-09T14:47:17.952-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-09T14:47:17.952-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sys.indexes" /><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.sp_createstats" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.stats" /><category scheme="http://www.blogger.com/atom/ns#" term="drop statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.sp_msforeachtable" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.sp_autostats" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.tables" /><title>Script to Drop and Re-Create Column Statistics</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/5861560206390950379/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2012/06/delete-statistics.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/5861560206390950379?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/5861560206390950379?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/as6qh5muKr8/delete-statistics.html" title="Script to Drop and Re-Create Column Statistics" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>0</thr:total><content type="html">If you're like me, you use a third-party tool to compare SQL Server database schemas. No matter how hard we try to keep schemas in synch, some little change always creeps in, and being able to confirm that two database schemas are exactly alike helps us sleep at night.Schemas can differ in important ways (who added that stored procedure?) or in seemingly trivial ways (okay, there's an extra space&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=as6qh5muKr8:Nd1Mm29b79M:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=as6qh5muKr8:Nd1Mm29b79M:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=as6qh5muKr8:Nd1Mm29b79M:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=as6qh5muKr8:Nd1Mm29b79M:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=as6qh5muKr8:Nd1Mm29b79M:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/as6qh5muKr8" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2012/06/delete-statistics.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUACRXszeip7ImA9WhVaEkg.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-3549935657978786318</id><published>2012-04-28T20:58:00.000-04:00</published><updated>2012-06-09T12:02:44.582-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-09T12:02:44.582-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="checkpoint" /><category scheme="http://www.blogger.com/atom/ns#" term="truncateonly" /><category scheme="http://www.blogger.com/atom/ns#" term="virtual log file" /><category scheme="http://www.blogger.com/atom/ns#" term="dbcc loginfo" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="alter database" /><category scheme="http://www.blogger.com/atom/ns#" term="dbcc shrinkfile" /><category scheme="http://www.blogger.com/atom/ns#" term="log file" /><title>Proc to Fix the Too Many Virtual Log Files Problem</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/3549935657978786318/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2012/04/proc-to-fix-too-many-virtual-log-files.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/3549935657978786318?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/3549935657978786318?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/5aizjlHyl2Y/proc-to-fix-too-many-virtual-log-files.html" title="Proc to Fix the Too Many Virtual Log Files Problem" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>4</thr:total><content type="html">There could be a beast lurking in your log files, robbing you of performance, and you might not even know its name. But fear not - I'll give you a weapon to kill the beast.If you've never heard of "virtual log files" (VLFs), read these articles: they'll well-written, short, and extremely informative. You owe it to yourself to read the originals, but I'll sum them up briefly here.
VLFs: A Quick &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=5aizjlHyl2Y:s1BM97cQTOc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=5aizjlHyl2Y:s1BM97cQTOc:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=5aizjlHyl2Y:s1BM97cQTOc:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=5aizjlHyl2Y:s1BM97cQTOc:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=5aizjlHyl2Y:s1BM97cQTOc:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/5aizjlHyl2Y" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2012/04/proc-to-fix-too-many-virtual-log-files.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQGQXg9eSp7ImA9WhRTFUk.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-6698856419238134542</id><published>2011-11-05T21:52:00.000-04:00</published><updated>2011-11-05T21:52:00.661-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-05T21:52:00.661-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSIS" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><title>SSIS: "And If You've Made it Wrong..."</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/6698856419238134542/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/11/ssis-and-if-youve-made-it-wrong.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/6698856419238134542?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/6698856419238134542?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/AeX-PTOawaM/ssis-and-if-youve-made-it-wrong.html" title="SSIS: &quot;And If You've Made it Wrong...&quot;" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm1.static.flickr.com/109/260340132_a44e0b6abf_t.jpg" height="72" width="72" /><thr:total>0</thr:total><content type="html">When you start working with SSIS, there's one thing nobody mentions: you have to learn a new syntax for expressions.  It's not T-SQL, it's not VB.NET, it's not JavaScript, it's not like anything you've made before.  It's "SSIS Expression Syntax", and you can learn all about it at Integration Services Expression Reference. (And yes, I'm pretty sure "it won't keep you comin' back for more"!)I bring&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=AeX-PTOawaM:PgZsnSO2w84:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=AeX-PTOawaM:PgZsnSO2w84:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=AeX-PTOawaM:PgZsnSO2w84:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=AeX-PTOawaM:PgZsnSO2w84:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=AeX-PTOawaM:PgZsnSO2w84:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/AeX-PTOawaM" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/11/ssis-and-if-youve-made-it-wrong.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4ESH08fyp7ImA9WhRTFEg.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-6824864491567405232</id><published>2011-11-04T21:35:00.001-04:00</published><updated>2011-11-04T21:35:09.377-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-04T21:35:09.377-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.columns" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.types" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.tables" /><title>How Much Data Is In That Column?</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/6824864491567405232/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/11/how-much-data-is-in-that-column.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/6824864491567405232?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/6824864491567405232?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/Xf7ViiJ_Y1E/how-much-data-is-in-that-column.html" title="How Much Data Is In That Column?" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm3.static.flickr.com/2603/4142960335_afa6afe64a_t.jpg" height="72" width="72" /><thr:total>0</thr:total><content type="html">This is a special-purpose script, but it still may be useful to someone, someday.Imagine you have many tables with similar filenames and the same column names. This might happen if the tables are created automatically by a Job on a daily basis, for example.  For each column you specify, this script displays the declared width, the average number of characters stored, and the minimum and maximum &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=Xf7ViiJ_Y1E:zS45wMz_nTY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=Xf7ViiJ_Y1E:zS45wMz_nTY:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=Xf7ViiJ_Y1E:zS45wMz_nTY:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=Xf7ViiJ_Y1E:zS45wMz_nTY:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=Xf7ViiJ_Y1E:zS45wMz_nTY:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/Xf7ViiJ_Y1E" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/11/how-much-data-is-in-that-column.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4GRn8_fyp7ImA9WhdbF0Q.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-2209789298558798595</id><published>2011-10-16T14:48:00.000-04:00</published><updated>2011-10-16T14:48:47.147-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-16T14:48:47.147-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="quoted_identifier" /><category scheme="http://www.blogger.com/atom/ns#" term="statistics io" /><category scheme="http://www.blogger.com/atom/ns#" term="replace" /><title>Adding Up the Logical Reads in the Output Window</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/2209789298558798595/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/10/adding-up-logical-reads-in-output.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/2209789298558798595?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/2209789298558798595?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/AIF_0dq4YWY/adding-up-logical-reads-in-output.html" title="Adding Up the Logical Reads in the Output Window" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm4.static.flickr.com/3044/2831205510_70a4492853_t.jpg" height="72" width="72" /><thr:total>1</thr:total><content type="html">Probably the first thing I learned about query tuning is that "clock-on-the-wall" time is definitely not the thing you want to measure. The elapsed time a query takes can be influenced by countless factors (other processes running, disk speed, number of processors, amount of RAM, phase of the moon, a few hundred database settings) that it's too rough a metric for serious performance tuning.What &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=AIF_0dq4YWY:-V5nQcjOc34:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=AIF_0dq4YWY:-V5nQcjOc34:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=AIF_0dq4YWY:-V5nQcjOc34:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=AIF_0dq4YWY:-V5nQcjOc34:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=AIF_0dq4YWY:-V5nQcjOc34:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/AIF_0dq4YWY" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/10/adding-up-logical-reads-in-output.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUGRXs7cCp7ImA9WhdbEUU.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-7508534128213012207</id><published>2011-10-09T13:10:00.001-04:00</published><updated>2011-10-09T13:10:24.508-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-09T13:10:24.508-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSIS" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><title>SSIS: Word-wrapping Annotations (Using Only Notepad)</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/7508534128213012207/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/10/ssis-word-wrapping-annotations-using.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/7508534128213012207?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/7508534128213012207?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/f7viHt7OGHU/ssis-word-wrapping-annotations-using.html" title="SSIS: Word-wrapping Annotations (Using Only Notepad)" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm4.static.flickr.com/3272/3008396549_026d302112_t.jpg" height="72" width="72" /><thr:total>0</thr:total><content type="html">Remember that Twilight Zone episode, where a man sells his soul to the Devil for immortality, only to be sentenced to life in prison the next day?I'm learning SSIS (2005, for now), and have discovered, like all those before me, that Microsoft implemented Annotations, but... they don't word-wrap!  Your Annotation must fit on one really long one line!  Bwa-ha-ha-ha-ha-ha!Of course, I'm no longer &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=f7viHt7OGHU:SHqiusCLU2c:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=f7viHt7OGHU:SHqiusCLU2c:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=f7viHt7OGHU:SHqiusCLU2c:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=f7viHt7OGHU:SHqiusCLU2c:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=f7viHt7OGHU:SHqiusCLU2c:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/f7viHt7OGHU" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/10/ssis-word-wrapping-annotations-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAFRX89cCp7ImA9WhdUF0o.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-5071353819166264221</id><published>2011-10-04T21:05:00.000-04:00</published><updated>2011-10-04T21:05:14.168-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-04T21:05:14.168-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSIS" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><title>SSIS FTP Task: Directory is not specified in the file connection manager</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/5071353819166264221/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/10/ssis-ftp-task-directory-is-not.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/5071353819166264221?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/5071353819166264221?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/qxlTEYjpS3o/ssis-ftp-task-directory-is-not.html" title="SSIS FTP Task: Directory is not specified in the file connection manager" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm3.static.flickr.com/2760/4534690993_c672984da0_t.jpg" height="72" width="72" /><thr:total>0</thr:total><content type="html">Are you getting this error message, been Googling for an hour, and nothing helps?Error: 0xC0029186 at {Your FTP Task}, {Your FTP Task Description}:
Directory is not specified in the file connection manager {Your Variable Name}.If you entered the value for the source and/or target filename variable and enclosed it with double-quotes, try removing them.  Worked for me.(Before coming over to the SQL&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=qxlTEYjpS3o:MG_rscs9BqE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=qxlTEYjpS3o:MG_rscs9BqE:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=qxlTEYjpS3o:MG_rscs9BqE:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=qxlTEYjpS3o:MG_rscs9BqE:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=qxlTEYjpS3o:MG_rscs9BqE:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/qxlTEYjpS3o" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/10/ssis-ftp-task-directory-is-not.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cGQH8yeSp7ImA9WhdUE08.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-4571750829688129536</id><published>2011-09-29T16:43:00.000-04:00</published><updated>2011-09-29T16:43:41.191-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-29T16:43:41.191-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="master database" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.objects" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="is_ms_shipped" /><category scheme="http://www.blogger.com/atom/ns#" term="drop" /><title>Cleaning User Stuff from the master Database</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/4571750829688129536/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/09/cleaning-user-stuff-from-master.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/4571750829688129536?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/4571750829688129536?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/PsoixHWa5is/cleaning-user-stuff-from-master.html" title="Cleaning User Stuff from the master Database" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm3.static.flickr.com/2421/3590983539_f8aa0d1150_t.jpg" height="72" width="72" /><thr:total>3</thr:total><content type="html">This is an upgrade to a script I wrote a long time ago.  It's handy when you find a system whose master database is somehow full of user objects.  (I know that none of us ever make that mistake...)The biggest improvement is that this script now only generates DROP statement, it doesn't execute them.  You have to do that yourself, and you should be sure to back up your master database (you do that&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=PsoixHWa5is:NvDeLAhcR_0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=PsoixHWa5is:NvDeLAhcR_0:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=PsoixHWa5is:NvDeLAhcR_0:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=PsoixHWa5is:NvDeLAhcR_0:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=PsoixHWa5is:NvDeLAhcR_0:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/PsoixHWa5is" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/09/cleaning-user-stuff-from-master.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYCRn47fSp7ImA9WhdRFU4.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-3374078357147354916</id><published>2011-08-04T22:48:00.049-04:00</published><updated>2011-08-05T05:22:47.005-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-05T05:22:47.005-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSMS" /><category scheme="http://www.blogger.com/atom/ns#" term="views" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="sparse" /><title>"Select Top 1000 Rows" Doesn't Show SPARSE Columns?</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/3374078357147354916/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/08/select-top-1000-rows-doesnt-show-sparse.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/3374078357147354916?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/3374078357147354916?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/Yo-wLpSVvNs/select-top-1000-rows-doesnt-show-sparse.html" title="&quot;Select Top 1000 Rows&quot; Doesn't Show SPARSE Columns?" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-cCNgUcHpQWw/TjusnmDz82I/AAAAAAAAB78/eJMAxYBNwAg/s72-c/SparseColumnsTableResults.jpg" height="72" width="72" /><thr:total>1</thr:total><content type="html">A colleague pointed out something I'd never noticed about SQL Server Management Studio's (SSMS) "Select Top 1000 Rows" feature: it doesn't display SPARSE columns.  This is not a bug, but rather by design: SQL Server tables can have up to 30,000 SPARSE columns: imagine the issues with viewing thousands of columns at a time!
The annoying thing, however, is that no matter how few columns a table has&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=Yo-wLpSVvNs:ViT-wIazpcs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=Yo-wLpSVvNs:ViT-wIazpcs:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=Yo-wLpSVvNs:ViT-wIazpcs:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=Yo-wLpSVvNs:ViT-wIazpcs:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=Yo-wLpSVvNs:ViT-wIazpcs:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/Yo-wLpSVvNs" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/08/select-top-1000-rows-doesnt-show-sparse.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIMRnc-cCp7ImA9WhZbEko.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-6022578168606205948</id><published>2011-06-16T21:18:00.001-04:00</published><updated>2011-06-16T21:19:47.958-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-16T21:19:47.958-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sys.indexes" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.allocation_units" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.partitions" /><category scheme="http://www.blogger.com/atom/ns#" term="group by rollup" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.tables" /><category scheme="http://www.blogger.com/atom/ns#" term="grouping" /><title>Instantly Find Size of Tables on Disk</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/6022578168606205948/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/06/instantly-find-size-of-tables-on-disk.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/6022578168606205948?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/6022578168606205948?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/VxFjtpBT-to/instantly-find-size-of-tables-on-disk.html" title="Instantly Find Size of Tables on Disk" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>0</thr:total><content type="html">Here's a script to tell you how big your table(s) are, subtotaled by indexes, with a grand total.  Includes LOBs, and excludes dropped pages.

SELECT CASE WHEN GROUPING(t.name) = 0 THEN t.name ELSE 'GRAND TOTAL' END    AS 'Table Name'
     , CASE WHEN GROUPING(i.name) = 0 THEN i.name ELSE 'TABLE TOTAL' END    AS 'Index Name'
     , SUM(au.total_pages) * 8 / 1024&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=VxFjtpBT-to:dZLjJOaoi-c:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=VxFjtpBT-to:dZLjJOaoi-c:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=VxFjtpBT-to:dZLjJOaoi-c:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=VxFjtpBT-to:dZLjJOaoi-c:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=VxFjtpBT-to:dZLjJOaoi-c:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/VxFjtpBT-to" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/06/instantly-find-size-of-tables-on-disk.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkANQn48fip7ImA9WhZUGEk.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-7545442150466777788</id><published>2011-06-11T22:08:00.002-04:00</published><updated>2011-06-11T22:13:13.076-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-11T22:13:13.076-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sys.extended_properties" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.dm_exec_sql_text" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.sp_addextendedproperty" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.dm_exec_query_stats" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.key_constraints" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.dm_exec_query_plan" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.dm_exec_cached_plans" /><title>Easy Documentation: Does Anything Even Use That Index?</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/7545442150466777788/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/06/easy-documentation-does-anything-even.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/7545442150466777788?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/7545442150466777788?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/E-H9Fbt7sT4/easy-documentation-does-anything-even.html" title="Easy Documentation: Does Anything Even Use That Index?" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-aIu2_b_JQYk/TfQSts1LVnI/AAAAAAAAB6o/V1XtaPeD5qM/s72-c/IndexDoc.jpg" height="72" width="72" /><thr:total>0</thr:total><content type="html">I don't know if it's ever happened to you, but I always find myself wishing I had documented what the devil I was thinking when I added an index to a table.  I mean, it's all well and good to create an index, but it's annoying when six months later you can't remember what it was for.  Is anything actually using this index?  Can I maybe drop it?

Yes, yes, I suppose I could document my indexes, &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=E-H9Fbt7sT4:NxzYQfYQhH8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=E-H9Fbt7sT4:NxzYQfYQhH8:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=E-H9Fbt7sT4:NxzYQfYQhH8:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=E-H9Fbt7sT4:NxzYQfYQhH8:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=E-H9Fbt7sT4:NxzYQfYQhH8:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/E-H9Fbt7sT4" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/06/easy-documentation-does-anything-even.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQBRX88eCp7ImA9WhRTFEg.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-8589236364639406677</id><published>2011-05-14T20:24:00.000-04:00</published><updated>2011-11-04T20:52:34.170-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-04T20:52:34.170-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sys.dm_db_index_usage_stats" /><category scheme="http://www.blogger.com/atom/ns#" term="index" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><title>Get Read-to-Write Ratio for All Indexes</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/8589236364639406677/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/05/get-read-to-write-ratio-for-all-indexes.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/8589236364639406677?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/8589236364639406677?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/ztvFFEkHKek/get-read-to-write-ratio-for-all-indexes.html" title="Get Read-to-Write Ratio for All Indexes" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>3</thr:total><content type="html">Here's a quick script to help you quantify how useful your indexes are, in the sense of how much they're used to speed up queries, compared to how much work it is for SQL Server to maintain them during inserts, updates, and deletes.  This only reflects the usage since the last SQL Server boot.-- Displays the read-to-update ratio of all indexes.  Good for finding ones that may not be needed.
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=ztvFFEkHKek:C1u1WAR_hes:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=ztvFFEkHKek:C1u1WAR_hes:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=ztvFFEkHKek:C1u1WAR_hes:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=ztvFFEkHKek:C1u1WAR_hes:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=ztvFFEkHKek:C1u1WAR_hes:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/ztvFFEkHKek" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/05/get-read-to-write-ratio-for-all-indexes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04HRXs7eSp7ImA9WhZXGEQ.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-7978540097505998677</id><published>2011-05-08T19:05:00.000-04:00</published><updated>2011-05-08T19:05:34.501-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-08T19:05:34.501-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="dbcc cleantable" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="is_ms_shipped" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.tables" /><title>Reclaim Space using  DBCC CLEANTABLE</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/7978540097505998677/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/05/reclaim-space-using-dbcc-cleantable.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/7978540097505998677?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/7978540097505998677?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/3mU8HgdiJfY/reclaim-space-using-dbcc-cleantable.html" title="Reclaim Space using  DBCC CLEANTABLE" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm5.static.flickr.com/4122/4915012962_1fd0852343_t.jpg" height="72" width="72" /><thr:total>1</thr:total><content type="html">


Image by The Real Estreya via Flickr



I just read Pradeep Adiga's excellent post on using DBCC CLEANTABLE to reclaim space left over after a column with a variable length type has been dropped from a table.

According to Books OnLine, the variable length data types are VARCHAR, NVARCHAR, VARCHAR(MAX), NVARCHAR(MAX), VARBINARY, VARBINARY(MAX), TEXT, NTEXT, IMAGE, SQL_VARIANT, and XML.  If you&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=3mU8HgdiJfY:ccUMDcZOjtc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=3mU8HgdiJfY:ccUMDcZOjtc:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=3mU8HgdiJfY:ccUMDcZOjtc:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=3mU8HgdiJfY:ccUMDcZOjtc:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=3mU8HgdiJfY:ccUMDcZOjtc:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/3mU8HgdiJfY" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/05/reclaim-space-using-dbcc-cleantable.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUASH89eip7ImA9WhZQF00.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-8485978157504945372</id><published>2011-04-25T00:37:00.000-04:00</published><updated>2011-04-25T00:37:29.162-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-25T00:37:29.162-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sys.indexes" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.extended_properties" /><category scheme="http://www.blogger.com/atom/ns#" term="SSMS" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.sp_addextendedproperty" /><category scheme="http://www.blogger.com/atom/ns#" term="extended properties" /><category scheme="http://www.blogger.com/atom/ns#" term="primary key" /><category scheme="http://www.blogger.com/atom/ns#" term="is_primary_key" /><category scheme="http://www.blogger.com/atom/ns#" term="index" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.tables" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.sp_dropextendedproperty" /><title>How to Hide Metadata Information Using Extended Properties</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/8485978157504945372/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/04/how-to-hide-metadata-information-using.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/8485978157504945372?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/8485978157504945372?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/kVPm7clB5Xg/how-to-hide-metadata-information-using.html" title="How to Hide Metadata Information Using Extended Properties" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-l7SiLq6_S5g/TbTLRQFLTEI/AAAAAAAAB5M/IpqcHGMGtfI/s72-c/ExtendedProperties1.jpg" height="72" width="72" /><thr:total>0</thr:total><content type="html">Ok, a more honest title for this post might be, 'How to Clean Up the Mess After You've Hosed the Extended Properties on Primary Key Constraints', but that wouldn't fit.

What I was trying to accomplish is a topic for another post. But while grumbling loudly while writing the code to fix what I had inadvertently done, I realized it could be used to "hide" information about tables. I say "hide", in&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=kVPm7clB5Xg:VdYiT6If35k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=kVPm7clB5Xg:VdYiT6If35k:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=kVPm7clB5Xg:VdYiT6If35k:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=kVPm7clB5Xg:VdYiT6If35k:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=kVPm7clB5Xg:VdYiT6If35k:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/kVPm7clB5Xg" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/04/how-to-hide-metadata-information-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ECQX0yeCp7ImA9WhZREk8.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-4967825760207153299</id><published>2011-04-07T21:21:00.000-04:00</published><updated>2011-04-07T21:21:00.390-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-07T21:21:00.390-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sys.schemas" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.stats" /><category scheme="http://www.blogger.com/atom/ns#" term="drop statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="escape" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.stats_columns" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.tables" /><title>Find and Kill All System-Named Statistics</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/4967825760207153299/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/04/find-and-kill-all-system-named.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/4967825760207153299?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/4967825760207153299?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/3-ot1f4ERnY/find-and-kill-all-system-named.html" title="Find and Kill All System-Named Statistics" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>0</thr:total><content type="html">I hate system-named objects.

Some of this is to be expected from someone like me, who, depending on the decade, could be called "persnickety", "perfectionist", "OCD", or "The Anal Retentive Chef."  But there's also a very practical reason to name all your database objects.



If you're using a third-party tool to synch up database schemas, you may find that every time you copy a system-named &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=3-ot1f4ERnY:GybFxr7rnwY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=3-ot1f4ERnY:GybFxr7rnwY:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=3-ot1f4ERnY:GybFxr7rnwY:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=3-ot1f4ERnY:GybFxr7rnwY:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=3-ot1f4ERnY:GybFxr7rnwY:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/3-ot1f4ERnY" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/04/find-and-kill-all-system-named.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UCSHs6fip7ImA9WhZSGUo.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-6020119271031345402</id><published>2011-04-05T00:54:00.000-04:00</published><updated>2011-04-05T00:54:29.516-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-05T00:54:29.516-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sys.indexes" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.dm_db_index_usage_stats" /><category scheme="http://www.blogger.com/atom/ns#" term="is_primary_key" /><category scheme="http://www.blogger.com/atom/ns#" term="index" /><category scheme="http://www.blogger.com/atom/ns#" term="sys.objects" /><category scheme="http://www.blogger.com/atom/ns#" term="nullif" /><category scheme="http://www.blogger.com/atom/ns#" term="isnull" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><title>What About "Under-Used" Indexes?</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/6020119271031345402/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/04/what-about-under-used-indexes.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/6020119271031345402?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/6020119271031345402?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/q0rxmRX3y04/what-about-under-used-indexes.html" title="What About &quot;Under-Used&quot; Indexes?" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>0</thr:total><content type="html">We've all spent time looking for unused indexes (right?), but today my boss asked about under-used indexes.  Now, I wrote a script a while ago to find completely unused indexes, but finding indexes that were only being used a little was just different enough to require a new script.
The script below displays all indexes, with the least-used (including unused) ones first, and totals for user and &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=q0rxmRX3y04:O3Ng4ctyHaU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=q0rxmRX3y04:O3Ng4ctyHaU:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=q0rxmRX3y04:O3Ng4ctyHaU:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=q0rxmRX3y04:O3Ng4ctyHaU:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=q0rxmRX3y04:O3Ng4ctyHaU:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/q0rxmRX3y04" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/04/what-about-under-used-indexes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUECSXo9fyp7ImA9WhZSF00.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-1042374007902550574</id><published>2011-04-01T21:27:00.000-04:00</published><updated>2011-04-01T21:27:48.467-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-01T21:27:48.467-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="coalesce" /><category scheme="http://www.blogger.com/atom/ns#" term="isnull" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="cast" /><category scheme="http://www.blogger.com/atom/ns#" term="implicit conversion" /><category scheme="http://www.blogger.com/atom/ns#" term="convert" /><title>ISNULL or COALESCE?  Sometimes it Really Does Matter</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/1042374007902550574/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/04/isnull-or-coalesce-sometimes-it.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/1042374007902550574?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/1042374007902550574?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/yXkHjPhBS6I/isnull-or-coalesce-sometimes-it.html" title="ISNULL or COALESCE?  Sometimes it Really Does Matter" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>1</thr:total><content type="html">After seeing some poor performance in a query that I couldn't figure out, I ended up reading a lot of discussions about the "ISNULL / COALESCE" debate.  Some people feel one is faster than the other, and some people like COALESCE because it's ANSI standard. (And they hold these opinions very strongly.)

I always thought the two were identical (when just two values are involved, of course), but it&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=yXkHjPhBS6I:ogH12tdPe3o:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=yXkHjPhBS6I:ogH12tdPe3o:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=yXkHjPhBS6I:ogH12tdPe3o:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=yXkHjPhBS6I:ogH12tdPe3o:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=yXkHjPhBS6I:ogH12tdPe3o:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/yXkHjPhBS6I" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/04/isnull-or-coalesce-sometimes-it.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcFRHc9cCp7ImA9Wx9UEEg.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-2948088977344960485</id><published>2011-02-07T00:38:00.013-05:00</published><updated>2011-02-07T00:53:35.968-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-07T00:53:35.968-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sys.dm_exec_requests" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="external fragmentation" /><category scheme="http://www.blogger.com/atom/ns#" term="dbcc checkdb" /><category scheme="http://www.blogger.com/atom/ns#" term="rebuild. reorganize" /><category scheme="http://www.blogger.com/atom/ns#" term="logical fragmentation" /><title>Monitor the Progress of Long-Running Events</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/2948088977344960485/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/02/monitor-progress-of-long-running-events.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/2948088977344960485?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/2948088977344960485?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/h1Ru5CRIRT0/monitor-progress-of-long-running-events.html" title="Monitor the Progress of Long-Running Events" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>1</thr:total><content type="html">I never knew you could monitor the progress of long-running processes like DBCC CHECKDB, backups, shrinking files, rebuilding indexes, etc. until I read an offhand comment by Kalen Delaney (which I can't find now).   Now I keep this script open in a SSMS window about 90% of my day!
-- Displays the progress of several kinds of commands.  See BOL.
; with cte1 as
(
    select command&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=h1Ru5CRIRT0:BvsljoCKvow:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=h1Ru5CRIRT0:BvsljoCKvow:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=h1Ru5CRIRT0:BvsljoCKvow:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=h1Ru5CRIRT0:BvsljoCKvow:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=h1Ru5CRIRT0:BvsljoCKvow:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/h1Ru5CRIRT0" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/02/monitor-progress-of-long-running-events.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMAQ387eCp7ImA9Wx9VFU0.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-7182236006084292491</id><published>2011-01-31T13:58:00.002-05:00</published><updated>2011-01-31T14:00:42.100-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-31T14:00:42.100-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="whitespace" /><category scheme="http://www.blogger.com/atom/ns#" term="profiler" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="replace" /><title>Removing All Duplicate Tabs, Linefeeds, Returns, and Spaces</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/7182236006084292491/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2011/01/removing-all-duplicate-tabs-linefeeds.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/7182236006084292491?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/7182236006084292491?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/0eLhhyHKEmQ/removing-all-duplicate-tabs-linefeeds.html" title="Removing All Duplicate Tabs, Linefeeds, Returns, and Spaces" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>0</thr:total><content type="html">The trace tables created by SQL Profiler are nice and all, but it's a pain to search through the TextData column.  The code below uses a brute force method to replace all contiguous whitespace characters with a single space.  This makes it possible to search the TextData column without differences in whitespace getting in the way.
    -- Removing All Duplicate Tabs, Linefeeds, Returns, and Spaces&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=0eLhhyHKEmQ:qP8rmp3q4mE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=0eLhhyHKEmQ:qP8rmp3q4mE:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=0eLhhyHKEmQ:qP8rmp3q4mE:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=0eLhhyHKEmQ:qP8rmp3q4mE:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=0eLhhyHKEmQ:qP8rmp3q4mE:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/0eLhhyHKEmQ" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2011/01/removing-all-duplicate-tabs-linefeeds.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcEQ389cSp7ImA9Wx5RFkQ.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-5462186547713846840</id><published>2010-08-24T19:53:00.000-04:00</published><updated>2010-08-24T19:53:22.169-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-24T19:53:22.169-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="single quotes" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="charindex" /><category scheme="http://www.blogger.com/atom/ns#" term="stuff" /><title>Remove All Text Between Single Quotes</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/5462186547713846840/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2010/08/remove-all-text-between-single-quotes.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/5462186547713846840?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/5462186547713846840?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/QcVFqlplVps/remove-all-text-between-single-quotes.html" title="Remove All Text Between Single Quotes" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>0</thr:total><content type="html">There's a zillion posts and articles about how to escape single quotes in T-SQL, but what I wanted to do was strip out the characters that were inside the single quotes.  After a ridiculous amount of Googling turned up nothing, I spent an even more ridiculous amount of time figuring it out.

The code below is a complete, working example of removing the characters from between two single quotes &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=QcVFqlplVps:4T8ni6EnO5w:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=QcVFqlplVps:4T8ni6EnO5w:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=QcVFqlplVps:4T8ni6EnO5w:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=QcVFqlplVps:4T8ni6EnO5w:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=QcVFqlplVps:4T8ni6EnO5w:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/QcVFqlplVps" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2010/08/remove-all-text-between-single-quotes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IDR3w4fCp7ImA9Wx5REU0.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-7930271969087346123</id><published>2010-08-18T00:26:00.000-04:00</published><updated>2010-08-18T00:26:16.234-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-18T00:26:16.234-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="nvarchar(max)" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><category scheme="http://www.blogger.com/atom/ns#" term="Job" /><category scheme="http://www.blogger.com/atom/ns#" term="sysjobhistory" /><category scheme="http://www.blogger.com/atom/ns#" term="sysjobs_view" /><category scheme="http://www.blogger.com/atom/ns#" term="sp_send_dbmail" /><title>ASCII Bar Chart of Job History</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/7930271969087346123/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2010/08/ascii-bar-chart-of-job-history.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/7930271969087346123?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/7930271969087346123?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/XsvxB9Nu_EE/ascii-bar-chart-of-job-history.html" title="ASCII Bar Chart of Job History" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>0</thr:total><content type="html">If you're like me, it's a lot easier to understand things with a picture.  With that in mind, here's a script you can run as a Job which will print out a visual representation of the Jobs that ran in the last 24 hours.  The results are emailed to whatever address you provide (near the end of the script).


-------------------------------------------------------------------------------
-- Prints a&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=XsvxB9Nu_EE:f9qRr37TdPU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=XsvxB9Nu_EE:f9qRr37TdPU:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=XsvxB9Nu_EE:f9qRr37TdPU:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=XsvxB9Nu_EE:f9qRr37TdPU:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=XsvxB9Nu_EE:f9qRr37TdPU:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/XsvxB9Nu_EE" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2010/08/ascii-bar-chart-of-job-history.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUARHw4eCp7ImA9Wx5SEk4.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-7577754396180145439</id><published>2010-08-07T23:14:00.000-04:00</published><updated>2010-08-07T23:14:05.230-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-07T23:14:05.230-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sys.sysprocesses" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><title>Scriplet: Display Connections Per User &amp; Database</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/7577754396180145439/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2010/08/scriplet-display-connections-per-user.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/7577754396180145439?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/7577754396180145439?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/QxAE32QsbJc/scriplet-display-connections-per-user.html" title="Scriplet: Display Connections Per User &amp; Database" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>0</thr:total><content type="html">A quick script to list out which users have how many connections with which databases.


-- Display users' connections per database.
SELECT DB_NAME(dbid) AS 'Database Name', 
       COUNT(dbid)   AS 'No Of Connections',
       loginame      AS 'Login Name'
  FROM sys.sysprocesses
 WHERE dbid &amp;gt; 0
 GROUP BY dbid, loginame
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=QxAE32QsbJc:jbDyfJqqG4s:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=QxAE32QsbJc:jbDyfJqqG4s:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=QxAE32QsbJc:jbDyfJqqG4s:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=QxAE32QsbJc:jbDyfJqqG4s:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=QxAE32QsbJc:jbDyfJqqG4s:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/QxAE32QsbJc" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2010/08/scriplet-display-connections-per-user.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQAR38_eip7ImA9Wx5TEE4.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-5693996987542874176</id><published>2010-07-25T01:39:00.000-04:00</published><updated>2010-07-25T01:39:06.142-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-25T01:39:06.142-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Visio" /><title>Lost the "Database Tab" in Visio 2010?</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/5693996987542874176/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2010/07/lost-database-tab-in-visio-2010.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/5693996987542874176?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/5693996987542874176?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/e6qACV1bidM/lost-database-tab-in-visio-2010.html" title="Lost the &quot;Database Tab&quot; in Visio 2010?" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_VgbWhtilQs0/TEuqTk6WWzI/AAAAAAAAB3w/Rvtsc9Dygl4/s72-c/VisioHelpSucks.jpg" height="72" width="72" /><thr:total>2</thr:total><content type="html">I've been using Visio since before Microsoft bought them, and I love Visio 2010, but the Microsoft Office help is worthless!  Every dialog has a "context-sensitive" help button with a little question mark on it, but - psyche! - it always opens to the main Visio help page.

Why not just search? Great idea! Try searching the Visio 2010 help for, oh, I don't know, something fundamental to Visio, &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=e6qACV1bidM:_F6VwBuhY_Y:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=e6qACV1bidM:_F6VwBuhY_Y:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=e6qACV1bidM:_F6VwBuhY_Y:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=e6qACV1bidM:_F6VwBuhY_Y:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=e6qACV1bidM:_F6VwBuhY_Y:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/e6qACV1bidM" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2010/07/lost-database-tab-in-visio-2010.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMGRXY7fCp7ImA9WxFUFE4.&quot;"><id>tag:blogger.com,1999:blog-4149930.post-6956839915459889869</id><published>2010-06-24T23:49:00.001-04:00</published><updated>2010-06-25T00:00:24.804-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-25T00:00:24.804-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="xp_fileexist" /><category scheme="http://www.blogger.com/atom/ns#" term="xp_cmdshell" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServerPedia Syndication" /><title>Determining if a Folder Exists Using xp_cmdshell</title><link rel="replies" type="application/atom+xml" href="http://sqlsoundings.blogspot.com/feeds/6956839915459889869/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqlsoundings.blogspot.com/2010/06/determining-if-folder-exists-using.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/6956839915459889869?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4149930/posts/default/6956839915459889869?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/YnzV/~3/y4kvFJnknm4/determining-if-folder-exists-using.html" title="Determining if a Folder Exists Using xp_cmdshell" /><author><name>Larry Leonard</name><uri>http://www.blogger.com/profile/01248746755565439137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="27" height="32" src="http://1.bp.blogspot.com/_VgbWhtilQs0/SlQZWAt2fPI/AAAAAAAABTM/0olpDCPp2dM/S220/FaceBookImage3.jpeg" /></author><thr:total>0</thr:total><content type="html">The code below creates a stored proc that will report if a passed-in Windows folder exists or not.  While it avoids using the undocumented xp_fileexist system proc, it uses xp_cmdshell, which in many places is the first thing that gets disabled because of the obvious security ramifications.  Still, it's a nice hack if you're working in the file system a lot.


IF OBJECT_ID('dbo.usp_FolderExist') &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=y4kvFJnknm4:KKyDOOg5mxM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=y4kvFJnknm4:KKyDOOg5mxM:YwkR-u9nhCs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=YwkR-u9nhCs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=y4kvFJnknm4:KKyDOOg5mxM:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?i=y4kvFJnknm4:KKyDOOg5mxM:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/YnzV?a=y4kvFJnknm4:KKyDOOg5mxM:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/YnzV?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/YnzV/~4/y4kvFJnknm4" height="1" width="1"/&gt;</content><feedburner:origLink>http://sqlsoundings.blogspot.com/2010/06/determining-if-folder-exists-using.html</feedburner:origLink></entry></feed>
