<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Return to LifeAsBob - SQL Server</title>
    <link>http://www.lifeasbob.com/</link>
    <description>Horkay Blog</description>
    <language>en-us</language>
    <copyright>Robert J. Horkay</copyright>
    <lastBuildDate>Tue, 24 Aug 2010 13:37:34 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>bobh@lifeasbob.com</managingEditor>
    <webMaster>bobh@lifeasbob.com</webMaster>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=07938899-2329-499d-8dac-42dee6d9349c</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,07938899-2329-499d-8dac-42dee6d9349c.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,07938899-2329-499d-8dac-42dee6d9349c.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=07938899-2329-499d-8dac-42dee6d9349c</wfw:commentRss>
      <title>SQL 2008 Cluster on Windows 2008 R2</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,07938899-2329-499d-8dac-42dee6d9349c.aspx</guid>
      <link>http://www.lifeasbob.com/2010/08/24/SQL2008ClusterOnWindows2008R2.aspx</link>
      <pubDate>Tue, 24 Aug 2010 13:37:34 GMT</pubDate>
      <description>&lt;p&gt;
Sometimes things get a bit frustruating, recently we had to setup a standard Active
/ Passive (though they, Micro$oft, call it something different now) cluster.&amp;nbsp;
The new thing here for us was it is SQL 2008 on Windows 2008 R2.
&lt;/p&gt;
&lt;p&gt;
So maybe these two little items will help you avoid some issues...
&lt;/p&gt;
&lt;p&gt;
&lt;img style="WIDTH: 499px; HEIGHT: 248px" height=248 src="http://www.lifeasbob.com/content/binary/NVE00006.JPG" width=601 border=0&gt;
&lt;/p&gt;
&lt;p&gt;
1.&amp;nbsp; Slip Stream Service pack 1 before installing.
&lt;/p&gt;
&lt;p&gt;
I don't remember the exact error, but the solution to the problem is to slip stream
service pack 1 into the sql server media before installing the cluster.
&lt;/p&gt;
&lt;p&gt;
2.&amp;nbsp; Uncheck the DHCP option and put in the Virtual IP Address.
&lt;/p&gt;
&lt;p&gt;
Also be aware the Windows 2008 is just a bit quirky at first, the new UAC (User Access
Controls) take a bit too get used to, as well as right clicking on your executables
and selecting "Run as Administrator", even though you are logged in as an administrator.
&lt;/p&gt;
&lt;p&gt;
My other favorite Windows 2008 message is when you are browsing a folder structure
in Exploder (err... I mean Explorer) and the OS throws up a prompt about "Not having
permissions, would you like to continue anyway ?".... How the f*** can you not have
permissions, but than continue anyway ?&amp;nbsp; Stupid Computer !&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Anyway, lots of good information on how UAC Protects you from yourself (sounds very
much like a Democrat !); read up on it:&amp;nbsp; &lt;span style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;a href="http://technet.microsoft.com/en-us/library/dd446675%28WS.10%29.aspx"&gt;http://technet.microsoft.com/en-us/library/dd446675%28WS.10%29.aspx&lt;/a&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=07938899-2329-499d-8dac-42dee6d9349c" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,07938899-2329-499d-8dac-42dee6d9349c.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=379d96b3-a42b-461b-9e19-f7d0cd384341</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,379d96b3-a42b-461b-9e19-f7d0cd384341.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,379d96b3-a42b-461b-9e19-f7d0cd384341.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=379d96b3-a42b-461b-9e19-f7d0cd384341</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently we renamed a server (VM Guest) that was hosting a stand-alone SQL Server,
default instance.  There always seems to be something I forget when this happens
and this was no exception.
</p>
        <p>
It seems this time I forgot about a linked server; in our environment we create a
linked server called LocalHost, which loops back to itself (this is for a monitoring
program that monitors long running jobs); when the server was renamed we started seeing
lots of NT Authority\Anonymous Login failures in the SQL Error Log, and the process
that monitors long running jobs was failing.
</p>
        <p>
A prayer never hurts when renaming a box hosting SQL Server, and I'm the kind
of guy who can be inspired by <a style="FONT-WEIGHT: bold" href="http://en.wikipedia.org/wiki/Britney_Spears">Britney</a> even
with the added weight!
</p>
        <img style="WIDTH: 297px; HEIGHT: 319px" height="319" src="http://www.lifeasbob.com/content/binary/britneypray.jpg" width="325" border="0" />
        <p>
So I decided to put this little blurp out there so I'd have a checklist to verify
things. 
</p>
        <p>
It seems most of this is a rehash of something I found here: <a href="http://msdn.microsoft.com/en-us/library/ms143799.aspx">http://msdn.microsoft.com/en-us/library/ms143799.aspx</a> ,
But I was too lazy too read down to the linked servers portion !  Sometimes articles
on MSDN and other peoples blog posts I save the the links to have a way of disappearing,
so I wanted to create my own blog post, just for selfish reason that I need my own
library of "checklists" and "how to".
</p>
        <p>
Checklist for renaming a sql server:
</p>
        <p>
1.  Rename the server (this is the sql instance, the server I will defer to the
proper operational teams to handle the necessary rename, active directory, dns
stuff).
</p>
        <p>
sp_dropserver &lt;old_name&gt;<br />
GO<br />
sp_addserver &lt;new_name&gt;, local<br />
GO
</p>
        <p>
sp_dropserver &lt;'old_name\instancename'&gt;<br />
GO<br />
sp_addserver &lt;'new_name\instancename'&gt;, local<br />
GO
</p>
        <p>
2.  Fix Linked Servers
</p>
        <p>
I just drop them and readd them
</p>
        <p>
3.  Fix connections.
</p>
        <p>
4.  Verify SQL Agent and SSIS Jobs.
</p>
        <p>
One Item I'm looking for help on is the groups that SQL Server 2005 creates, these
still exist with the old computer name in them, it definetly looks odd, but appears
functional.
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=379d96b3-a42b-461b-9e19-f7d0cd384341" />
      </body>
      <title>Checklist for Renaming a SQL Server</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,379d96b3-a42b-461b-9e19-f7d0cd384341.aspx</guid>
      <link>http://www.lifeasbob.com/2010/08/12/ChecklistForRenamingASQLServer.aspx</link>
      <pubDate>Thu, 12 Aug 2010 15:03:43 GMT</pubDate>
      <description>&lt;p&gt;
Recently we renamed a server (VM Guest) that was hosting a stand-alone SQL Server,
default instance.&amp;nbsp; There always seems to be something I forget when this happens
and this was no exception.
&lt;/p&gt;
&lt;p&gt;
It seems this time I forgot about a linked server; in our environment we create a
linked server called LocalHost, which loops back to itself (this is for a monitoring
program that monitors long running jobs); when the server was renamed we started seeing
lots of NT Authority\Anonymous Login failures in the SQL Error Log, and the process
that monitors long running jobs was failing.
&lt;/p&gt;
&lt;p&gt;
A prayer never hurts when renaming a box hosting SQL Server, and&amp;nbsp;I'm the kind
of guy who can be inspired by &lt;a style="FONT-WEIGHT: bold" href="http://en.wikipedia.org/wiki/Britney_Spears"&gt;Britney&lt;/a&gt; even
with the added weight!
&lt;/p&gt;
&lt;img style="WIDTH: 297px; HEIGHT: 319px" height=319 src="http://www.lifeasbob.com/content/binary/britneypray.jpg" width=325 border=0&gt; 
&lt;p&gt;
So I decided to put this little blurp out there so I'd have a checklist to verify
things. 
&lt;/p&gt;
&lt;p&gt;
It seems most of this is a rehash of something I found here: &lt;a href="http://msdn.microsoft.com/en-us/library/ms143799.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms143799.aspx&lt;/a&gt; ,
But I was too lazy too read down to the linked servers portion !&amp;nbsp; Sometimes articles
on MSDN and other peoples blog posts I save the the links to&amp;nbsp;have a way of disappearing,
so I wanted to create my own blog post, just for selfish reason that I need my own
library of "checklists" and "how to".
&lt;/p&gt;
&lt;p&gt;
Checklist for renaming a sql server:
&lt;/p&gt;
&lt;p&gt;
1.&amp;nbsp; Rename the server (this is the sql instance, the server I will defer to the
proper&amp;nbsp;operational teams to handle the necessary rename, active directory, dns
stuff).
&lt;/p&gt;
&lt;p&gt;
sp_dropserver &amp;lt;old_name&amp;gt;&lt;br&gt;
GO&lt;br&gt;
sp_addserver &amp;lt;new_name&amp;gt;, local&lt;br&gt;
GO
&lt;/p&gt;
&lt;p&gt;
sp_dropserver &amp;lt;'old_name\instancename'&amp;gt;&lt;br&gt;
GO&lt;br&gt;
sp_addserver &amp;lt;'new_name\instancename'&amp;gt;, local&lt;br&gt;
GO
&lt;/p&gt;
&lt;p&gt;
2.&amp;nbsp; Fix Linked Servers
&lt;/p&gt;
&lt;p&gt;
I just drop them and readd them
&lt;/p&gt;
&lt;p&gt;
3.&amp;nbsp; Fix connections.
&lt;/p&gt;
&lt;p&gt;
4.&amp;nbsp; Verify SQL Agent and SSIS Jobs.
&lt;/p&gt;
&lt;p&gt;
One Item I'm looking for help on is the groups that SQL Server 2005 creates, these
still exist with the old computer name in them, it definetly looks odd, but appears
functional.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=379d96b3-a42b-461b-9e19-f7d0cd384341" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,379d96b3-a42b-461b-9e19-f7d0cd384341.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=f7b1ddd1-f1d7-4f01-b301-2edc1b0478b9</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,f7b1ddd1-f1d7-4f01-b301-2edc1b0478b9.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,f7b1ddd1-f1d7-4f01-b301-2edc1b0478b9.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f7b1ddd1-f1d7-4f01-b301-2edc1b0478b9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <img src="http://www.lifeasbob.com/content/binary/raidersofthelostark.jpg" />
        <p>
Yes you can have sql server 2005 and sql server 2008 on the same cluster, this came
up while turning an active / passive cluster into an active / active cluster to make
better use of resources.  [They say not to use the terms active / passive any
more, but it'll take me until sql 2010 to get correct my jargon].
</p>
        <p>
See the section on ‘Multiple SQL Server Versions Within the Same Windows Server Cluster
(SQL Server 2000 and 2005 with SQL Server 2008)’ in the link below:
</p>
        <p>
          <a href="http://download.microsoft.com/download/6/9/D/69D1FEA7-5B42-437A-B3BA-A4AD13E34EF6/SQLServer2008FailoverCluster.docx">http://download.microsoft.com/download/6/9/D/69D1FEA7-5B42-437A-B3BA-A4AD13E34EF6/SQLServer2008FailoverCluster.docx</a>
        </p>
        <p>
I've uploaded the document here,<a href="http://www.lifeasbob.com/content/binary/SQLServer2008FailoverCluster.docx">SQLServer2008FailoverCluster.docx
(3.75 MB)</a>, as I have a tendency to need to support things longer than Microsoft
makes them available.
</p>
        <p>
I did run into an issue with a necessary patch for the operating system that the installer
did not catch until I'd filled out all the information, it then through a warning
on the missing patch and would not let me proceed, of course the damned patch requires
a reboot so I had to start all over.
</p>
        <p>
This patch was for windows 2003, filestream support... of course I did not select
to enable filestreaming, but no matter, it insisted on it.   At least it
(the installer) found the issue before it started, as I really hate bombing or failed
installations, but it was still a pia to go back, down load the patch, install it,
reboot it, and then restart setup....i thought the whole point of the prerequisite
checks was to find pre-reqs !  <a href="http://support.microsoft.com/kb/937444">http://support.microsoft.com/kb/937444</a> 
</p>
        <p>
 
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=f7b1ddd1-f1d7-4f01-b301-2edc1b0478b9" />
      </body>
      <title>SQL2005 and SQL 2008 on the same Cluster</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,f7b1ddd1-f1d7-4f01-b301-2edc1b0478b9.aspx</guid>
      <link>http://www.lifeasbob.com/2010/05/13/SQL2005AndSQL2008OnTheSameCluster.aspx</link>
      <pubDate>Thu, 13 May 2010 17:35:00 GMT</pubDate>
      <description>&lt;img src="http://www.lifeasbob.com/content/binary/raidersofthelostark.jpg"&gt; 
&lt;p&gt;
Yes you can have sql server 2005 and sql server 2008 on the same cluster, this came
up while turning an active / passive cluster into an active / active cluster to make
better use of resources.&amp;nbsp; [They say not to use the terms active / passive any
more, but it'll take me until sql 2010 to get correct my jargon].
&lt;/p&gt;
&lt;p&gt;
See the section on ‘Multiple SQL Server Versions Within the Same Windows Server Cluster
(SQL Server 2000 and 2005 with SQL Server 2008)’ in the link below:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://download.microsoft.com/download/6/9/D/69D1FEA7-5B42-437A-B3BA-A4AD13E34EF6/SQLServer2008FailoverCluster.docx"&gt;http://download.microsoft.com/download/6/9/D/69D1FEA7-5B42-437A-B3BA-A4AD13E34EF6/SQLServer2008FailoverCluster.docx&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I've uploaded the document here,&lt;a href="http://www.lifeasbob.com/content/binary/SQLServer2008FailoverCluster.docx"&gt;SQLServer2008FailoverCluster.docx
(3.75 MB)&lt;/a&gt;, as I have a tendency to need to support things longer than Microsoft
makes them available.
&lt;/p&gt;
&lt;p&gt;
I did run into an issue with a necessary patch for the operating system that the installer
did not catch until I'd filled out all the information, it then through a warning
on the missing patch and would not let me proceed, of course the damned patch requires
a reboot so I had to start all over.
&lt;/p&gt;
&lt;p&gt;
This patch was for windows 2003, filestream support... of course I did not select
to enable filestreaming, but no matter, it insisted on it.&amp;nbsp;&amp;nbsp; At least it
(the installer) found the issue before it started, as I really hate bombing or failed
installations, but it was still a pia to go back, down load the patch, install it,
reboot it, and then restart setup....i thought the whole point of the prerequisite
checks was to find pre-reqs !&amp;nbsp; &lt;a href="http://support.microsoft.com/kb/937444"&gt;http://support.microsoft.com/kb/937444&lt;/a&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=f7b1ddd1-f1d7-4f01-b301-2edc1b0478b9" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,f7b1ddd1-f1d7-4f01-b301-2edc1b0478b9.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=78c518cd-69d8-4875-a425-7fe44d736872</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,78c518cd-69d8-4875-a425-7fe44d736872.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,78c518cd-69d8-4875-a425-7fe44d736872.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=78c518cd-69d8-4875-a425-7fe44d736872</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
You know Microsoft SQL Server is considered an enterprise database when Management
tells you it costs too much !  Micro$oft has finally done it, and management
has declared they don't want it.  I don't necessarily agree, but I do follow
orders well.
</p>
        <p>
The cost increase of 25% and virtualization licensing changes in R2 are unacceptable.
</p>
        <p>
We're now reviewing Open Source databases and conversion costs, we're also contacting
all our vendors and will be insisting on supporting some other DBMS than Microsoft
SQL Server either now or by the end of the current contracts.
</p>
        <p>
Microsoft has done a great job with sql 2008 r2, most features we don't need 
[BI / MDM], didn't ask for, don't want and a cost increase to boot.  There are
good features in SQL 2008 R2, but not at this cost; especially when we won't be utilizing
most of the new features.
</p>
        <p>
I'm not looking forward to Open Source, but I might be impressed, 10 years ago IBM
DB2 pricing was reaching the tipping point and I began to learn a little respected
database called Microsoft SQL Server, now it's time to begin learning something new.
</p>
        <p>
I'd love to hear from some shops that began supporting open source databases, as obviously
it will take some time to convert; but all new implementations on sql will most likely
cease.
</p>
        <p>
          <table>
            <tbody>
              <tr>
                <td>
                  <img src="http://www.lifeasbob.com/content/binary/postgresql.png" border="0" />
                </td>
                <td>
                  <img src="http://www.lifeasbob.com/content/binary/logo-mysql.jpg" border="0" />
                </td>
              </tr>
            </tbody>
          </table>
        </p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=78c518cd-69d8-4875-a425-7fe44d736872" />
      </body>
      <title>SQL 2008 R2 License / Cost = Open Source DBMS</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,78c518cd-69d8-4875-a425-7fe44d736872.aspx</guid>
      <link>http://www.lifeasbob.com/2010/04/27/SQL2008R2LicenseCostOpenSourceDBMS.aspx</link>
      <pubDate>Tue, 27 Apr 2010 14:35:12 GMT</pubDate>
      <description>&lt;p&gt;
You know Microsoft SQL Server is considered an enterprise database when Management
tells you it costs too much !&amp;nbsp; Micro$oft has finally done it, and management
has declared they don't want it.&amp;nbsp; I don't necessarily agree, but I do follow
orders well.
&lt;/p&gt;
&lt;p&gt;
The cost increase of 25% and virtualization licensing changes in R2 are unacceptable.
&lt;/p&gt;
&lt;p&gt;
We're now reviewing Open Source databases and conversion costs, we're also contacting
all our vendors and will be insisting on supporting some other DBMS than Microsoft
SQL Server either now or by the end of the current contracts.
&lt;/p&gt;
&lt;p&gt;
Microsoft has done a great job with sql 2008 r2, most features we don't need&amp;nbsp;
[BI / MDM], didn't ask for, don't want and a cost increase to boot.&amp;nbsp; There are
good features in SQL 2008 R2, but not at this cost; especially when we won't be utilizing
most of the new features.
&lt;/p&gt;
&lt;p&gt;
I'm not looking forward to Open Source, but I might be impressed, 10 years ago IBM
DB2 pricing was reaching the tipping point&amp;nbsp;and I began to learn a little respected
database called Microsoft SQL Server, now it's time to begin learning something new.
&lt;/p&gt;
&lt;p&gt;
I'd love to hear from some shops that began supporting open source databases, as obviously
it will take some time to convert; but all new implementations on sql will most likely
cease.
&lt;/p&gt;
&lt;p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/postgresql.png" border=0&gt; 
&lt;/td&gt;
&lt;td&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/logo-mysql.jpg" border=0&gt; 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=78c518cd-69d8-4875-a425-7fe44d736872" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,78c518cd-69d8-4875-a425-7fe44d736872.aspx</comments>
      <category>General Technology</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=ad655218-b99c-43b8-8c5c-328037c34878</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,ad655218-b99c-43b8-8c5c-328037c34878.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,ad655218-b99c-43b8-8c5c-328037c34878.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ad655218-b99c-43b8-8c5c-328037c34878</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hard to believe, but it's true !
</p>
        <p>
I've had a nice machine that came with windows vista, 64 bit; but it locked up constantly. 
Over the months i've tried many things, even went with installing windows xp 32 bit,
same behavior.  Finally I had concluded it must be a bad peice of hardware causing
this mystery lock-ups...and let the thing become a paper weight.
</p>
        <p>
Finally decided to try windows 7 last week, popped the dvd in, formatted the hard
drive (no sense upgrading a non-working os) and installed windows 7.
</p>
        <p>
Wow, windows 7, right out of the box, my machine finally works.
</p>
        <p>
It's been on for a week without a single "lock-up", amazing !  Micro$oft may
have gotten one right.
</p>
        <p>
 
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=ad655218-b99c-43b8-8c5c-328037c34878" />
      </body>
      <title>Windows 7 finally fixed my computer</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,ad655218-b99c-43b8-8c5c-328037c34878.aspx</guid>
      <link>http://www.lifeasbob.com/2010/04/26/Windows7FinallyFixedMyComputer.aspx</link>
      <pubDate>Mon, 26 Apr 2010 20:03:47 GMT</pubDate>
      <description>&lt;p&gt;
Hard to believe, but it's true !
&lt;/p&gt;
&lt;p&gt;
I've had a nice machine that came with windows vista, 64 bit; but it locked up constantly.&amp;nbsp;
Over the months i've tried many things, even went with installing windows xp 32 bit,
same behavior.&amp;nbsp; Finally I had concluded it must be a bad peice of hardware causing
this mystery lock-ups...and let the thing become a paper weight.
&lt;/p&gt;
&lt;p&gt;
Finally decided to try windows 7 last week, popped the dvd in, formatted the hard
drive (no sense upgrading a non-working os) and installed windows 7.
&lt;/p&gt;
&lt;p&gt;
Wow, windows 7, right out of the box, my machine finally works.
&lt;/p&gt;
&lt;p&gt;
It's been on for a week without a single "lock-up", amazing !&amp;nbsp; Micro$oft may
have gotten one right.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=ad655218-b99c-43b8-8c5c-328037c34878" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,ad655218-b99c-43b8-8c5c-328037c34878.aspx</comments>
      <category>General Technology</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=b62e4362-41e6-40a6-a571-a9ba83bd6102</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,b62e4362-41e6-40a6-a571-a9ba83bd6102.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,b62e4362-41e6-40a6-a571-a9ba83bd6102.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b62e4362-41e6-40a6-a571-a9ba83bd6102</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I always thought the definition of getting screwed twice was this; <a href="http://www.momlogic.com/2009/05/virginity_auction_taxes.php">A
German student who auctioned her virginity and ended up paying 50% in taxes</a>.
</p>
        <p>
But it turns out that identity values in SQL Server can also screw you twice!
</p>
        <img height="182" src="http://www.lifeasbob.com/content/binary/SQLSewer.jpg" width="264" border="0" />
        <p>
I used to really like identity values and problems have been rare, but this week,
inside of a few days I've been screwed twice by identity values.  This is also
the year of embracing merge replication, time to meet your new friend the guid!
</p>
        <p>
No need to rehash what happenned with identity values, but altering a table from int
to bigint with 30 billion+ rows is not possible.  Found two very helpful posts,
i include their links here as they were most helpful:
</p>
        <p>
To resolve (albeit temporarily) identity values running out for an int, do not forget
you have the negative values.
</p>
        <font color="#008000" size="2">
          <font color="#008000" size="2">
            <p>
DBCC CHECKIDENT ('ProcessActionHistory', RESEED, -2147483648);
</p>
          </font>
        </font>
        <p>
          <a href="http://sqlfool.com/2008/11/max-int-identity-value-reached-dbcc-checkident/">http://sqlfool.com/2008/11/max-int-identity-value-reached-dbcc-checkident/</a>
          <br />
          <a href="http://dbwhisperer.blogspot.com/2009/04/which-identity-column-is-running-out-of.html">http://dbwhisperer.blogspot.com/2009/04/which-identity-column-is-running-out-of.html</a>
        </p>
        <p>
Definetly we'll add a new automated health check, will probably fit in nicely with
our script that check row counts occasionally to also start checking identity columns
and raising alerts on certain thresholds.
</p>
        <p>
I'll also be pushing back much harder on development teams that want identity columns
with an int data type.
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b62e4362-41e6-40a6-a571-a9ba83bd6102" />
      </body>
      <title>Identity Values - Screwed twice !</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,b62e4362-41e6-40a6-a571-a9ba83bd6102.aspx</guid>
      <link>http://www.lifeasbob.com/2010/03/09/IdentityValuesScrewedTwice.aspx</link>
      <pubDate>Tue, 09 Mar 2010 18:07:45 GMT</pubDate>
      <description>&lt;p&gt;
I always thought the definition of getting screwed twice was this; &lt;a href="http://www.momlogic.com/2009/05/virginity_auction_taxes.php"&gt;A
German student who auctioned her virginity and ended up paying 50% in taxes&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
But it turns out that identity values in SQL Server can also screw you twice!
&lt;/p&gt;
&lt;img height=182 src="http://www.lifeasbob.com/content/binary/SQLSewer.jpg" width=264 border=0&gt; 
&lt;p&gt;
I used to really like identity values and problems have been rare, but this week,
inside of a few days I've been screwed twice by identity values.&amp;nbsp; This is also
the year of embracing merge replication, time to meet your new friend the guid!
&lt;/p&gt;
&lt;p&gt;
No need to rehash what happenned with identity values, but altering a table from int
to bigint with 30 billion+ rows is not possible.&amp;nbsp; Found two very helpful posts,
i include their links here as they were most helpful:
&lt;/p&gt;
&lt;p&gt;
To resolve (albeit temporarily) identity values running out for an int, do not forget
you have the negative values.
&lt;/p&gt;
&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt; 
&lt;p&gt;
DBCC CHECKIDENT ('ProcessActionHistory', RESEED, -2147483648);
&lt;/p&gt;
&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;
&lt;a href="http://sqlfool.com/2008/11/max-int-identity-value-reached-dbcc-checkident/"&gt;http://sqlfool.com/2008/11/max-int-identity-value-reached-dbcc-checkident/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://dbwhisperer.blogspot.com/2009/04/which-identity-column-is-running-out-of.html"&gt;http://dbwhisperer.blogspot.com/2009/04/which-identity-column-is-running-out-of.html&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Definetly we'll add a new automated health check, will probably fit in nicely with
our script that check row counts occasionally to also start checking identity columns
and raising alerts on certain thresholds.
&lt;/p&gt;
&lt;p&gt;
I'll also be pushing back much harder on development teams that want identity columns
with an int data type.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b62e4362-41e6-40a6-a571-a9ba83bd6102" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,b62e4362-41e6-40a6-a571-a9ba83bd6102.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=21d56e60-0b93-4c5a-bfb2-1228832e2707</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,21d56e60-0b93-4c5a-bfb2-1228832e2707.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,21d56e60-0b93-4c5a-bfb2-1228832e2707.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=21d56e60-0b93-4c5a-bfb2-1228832e2707</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Well, it continues to be a pain in my ass, the inability to grant truncate table permissions
on a table to specific users without giving them excessive rights.  SQL 2K5,
no solution, SQL 2K8 no solution, well we did get a bunch of other stuff, so we'll
continue to suffer.  I originally posted an article on Granting Truncate Table
permissions in 2008, here is that <a href="http://www.lifeasbob.com/2008/03/03/GrantTruncateTablePermissionsInSQLServer.aspx">link</a>. 
Recently the need has arisen to have the ability log failures for the solution. 
The code was modified by Holland Humphrey and I'm posting the solution again with
his updates.
</p>
        <p>
          <img style="WIDTH: 389px; HEIGHT: 222px" height="334" src="http://www.lifeasbob.com/content/binary/under_the_table.jpg" width="429" border="0" />
        </p>
        <p>
The solution basically uses a schema, dba, to hold 3 tables for a stored procedure
which is used to truncate tables.  The 3 tables, Truncate_List, Truncate_Audit
and Truncate_Fail.  A user is granted permissions to a stored procedure in the
dbo schema that performs the work and verifies that the table is authorized for truncate,
and logs the success to truncate_audit and the failure to truncate_fail.  One
could argue that truncate_audit could hold both success and failure, but I'll leave
any possible enhancements up to those that desire to do so.
</p>
        <p>
The original inspiration for this actually came from the Oracle group where I work. 
Oracle has the same problem as sql "Grant Truncate on {table} to {User}"...so simple....but
it's not there in SQL or Oracle.  I basically translated the Oracle solution
into SQL Server.
</p>
        <p>
Every upgrade we do from SQL 2000 to 2K5 or 2K8 uses this solution and allows us to
reduce our permissions set to the lowest possible necessary.
</p>
        <p>
Here are the scripts for the solution.
</p>
        <p>
1.  Create a Schema Called DBA {if you prefer something else, adjust the tables
and proc}.
</p>
        <p>
2.  <a href="http://www.lifeasbob.com/content/binary/TruncateSolution_CreateTables.txt">TruncateSolution_CreateTables.txt
(4.67 KB)</a></p>
        <p>
3.  <a href="http://www.lifeasbob.com/content/binary/TruncateSolution_CreateProc.txt">TruncateSolution_CreateProc.txt
(4.34 KB)</a></p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=21d56e60-0b93-4c5a-bfb2-1228832e2707" />
      </body>
      <title>Grant Truncate Table Permissions, re-visited !</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,21d56e60-0b93-4c5a-bfb2-1228832e2707.aspx</guid>
      <link>http://www.lifeasbob.com/2010/02/22/GrantTruncateTablePermissionsRevisited.aspx</link>
      <pubDate>Mon, 22 Feb 2010 20:30:36 GMT</pubDate>
      <description>&lt;p&gt;
Well, it continues to be a pain in my ass, the inability to grant truncate table permissions
on a table to specific users without giving them excessive rights.&amp;nbsp; SQL 2K5,
no solution, SQL 2K8 no solution, well we did get a bunch of other stuff, so we'll
continue to suffer.&amp;nbsp; I originally posted an article on Granting Truncate Table
permissions in 2008, here is that &lt;a href="http://www.lifeasbob.com/2008/03/03/GrantTruncateTablePermissionsInSQLServer.aspx"&gt;link&lt;/a&gt;.&amp;nbsp;
Recently the need has arisen to&amp;nbsp;have the ability log failures for the solution.&amp;nbsp;
The code was modified by Holland Humphrey and I'm posting the solution again with
his updates.
&lt;/p&gt;
&lt;p&gt;
&lt;img style="WIDTH: 389px; HEIGHT: 222px" height=334 src="http://www.lifeasbob.com/content/binary/under_the_table.jpg" width=429 border=0&gt;
&lt;/p&gt;
&lt;p&gt;
The solution basically uses a schema, dba, to hold 3 tables for a stored procedure
which is used to truncate tables.&amp;nbsp; The 3 tables, Truncate_List, Truncate_Audit
and Truncate_Fail.&amp;nbsp; A user is granted permissions to a stored procedure in the
dbo schema that performs the work and verifies that the table is authorized for truncate,
and logs the success to truncate_audit and the failure to truncate_fail.&amp;nbsp; One
could argue that truncate_audit could hold both success and failure, but I'll leave
any possible enhancements up to those that desire to do so.
&lt;/p&gt;
&lt;p&gt;
The original inspiration for this actually came from the Oracle group where I work.&amp;nbsp;
Oracle has the same problem as sql "Grant Truncate on {table} to {User}"...so simple....but
it's not there in SQL or Oracle.&amp;nbsp; I basically translated the Oracle solution
into SQL Server.
&lt;/p&gt;
&lt;p&gt;
Every upgrade we do from SQL 2000 to 2K5 or 2K8 uses this solution and allows us to
reduce our permissions set to the lowest possible necessary.
&lt;/p&gt;
&lt;p&gt;
Here are the scripts for the solution.
&lt;/p&gt;
&lt;p&gt;
1.&amp;nbsp; Create a Schema Called DBA {if you prefer something else, adjust the tables
and proc}.
&lt;/p&gt;
&lt;p&gt;
2.&amp;nbsp; &lt;a href="http://www.lifeasbob.com/content/binary/TruncateSolution_CreateTables.txt"&gt;TruncateSolution_CreateTables.txt
(4.67 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
3.&amp;nbsp; &lt;a href="http://www.lifeasbob.com/content/binary/TruncateSolution_CreateProc.txt"&gt;TruncateSolution_CreateProc.txt
(4.34 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=21d56e60-0b93-4c5a-bfb2-1228832e2707" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,21d56e60-0b93-4c5a-bfb2-1228832e2707.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=c5bbee65-766a-48bf-b341-d15a4acc4ee2</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,c5bbee65-766a-48bf-b341-d15a4acc4ee2.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,c5bbee65-766a-48bf-b341-d15a4acc4ee2.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=c5bbee65-766a-48bf-b341-d15a4acc4ee2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img src="http://www.lifeasbob.com/content/binary/shelving_in_silhouette.jpg" border="0" />
        </p>
        <p>
Starting in December I purchased the following books.  Most of these were related
to new projects where I work and knew I'd need to sharpen a few skills, Encryption,
SQL Express, Merge Replication and security.
</p>
        <ul>
          <li>
Beginning SQL Server 2008 Express for Developers: From Novice to Professional - Robin
Dewson</li>
          <li>
Enterprise Data Synchronization with Microsoft SQL Server 2008 and SQL Server Compact
3.5 
</li>
          <li>
Mobile Merge Replication - Rob Tiffany</li>
          <li>
SQL Server MVP Deep Dives</li>
          <li>
Expert SQL Server 2008 Encryption - Michael Coles, Rodney Landrum</li>
          <li>
SQL Server Forensic Analysis - Kevvie Fowler [bought but not reviewed]<br /></li>
        </ul>
        <p align="center">
          <strong>
            <u>Reviews:</u>
          </strong>
        </p>
        <p>
          <strong>
            <u>Beginning SQL Server 2008 Express for Developers: From Novice to Professional
- Robin Dewson</u>
          </strong>
        </p>
        <p>
This book was a disappointment, but I knew when purchasing it that it was probably
not going to be of much help; but I had to start somewhere.  We're preparing
to migrate from MSDE to SQL Express 2K8 in 10,000 locations; I was involved in the
intial deployment (and patchings) of MSDE and I really need to figure out how to avoid
the gotchas with SQL Express; this book wasn't it.  Over-all it's a good book,
but it's not meant for an existing SQL Server DBA, I would expect even a Jr. DBA to
already be familiar with the content.  It truly is meant for an access developer
who wants to learn SQL Express; I gave it to our local access programmer at work {though
it's actually a she and she's not in IT or a programmer, seems that is where
most access db's begin life}, maybe she'll develop a new career path, we seriously
need more women in IT, I digress.
</p>
        <p>
          <strong>
            <u>Enterprise Data Synchronization with Microsoft SQL Server 2008 and SQL
Server Compact 3.5 Mobile Merge</u>
          </strong>
        </p>
        <p>
This book was great.  We're deploying Merge replication with up to possibly 10,000
differnt locations to SQL Express 2k5 and that is why I purchased this book. 
While not an exact guide or road map for what we're doing [we're not using SQL Server
compact edition], most of the concepts apply.  It has really been helpful, we're
still in the planning and proof of concept stages, so it remains to be seen if we'll
continue with this design at work, but I feel this book helped us greatly.
</p>
        <p>
          <strong>
            <u>SQL Server MVP Deep Dives</u>
          </strong>
        </p>
        <p>
This book was great.  I kind of avoided it at first, as I don't like books that
too many people jump on as good, but this one lived up to that promise.  Very
few parts of the book were lame ! [there's a glowing recommendation].  I put
a sticky next to each new thing I learned and when I was done, i'd say there were
at least 15-20 stickeys across the book, that's worth the money I paid for it. 
It's also nice as you can read this book in quick "snippets" flipping to what subject
interests you and what you have time to read.
</p>
        <p>
          <strong>
            <u>Expert SQL Server 2008 Encryption - Michael Coles, Rodney Landrum</u>
          </strong>
        </p>
        <p>
This book is good, though a bit dry, I'm still not all the way through it...reading
about encryption is not what I'd consider an exciting topic, but it is a skill i'm
going to need and it was seriously lacking.  We're preparing to bring in a 3rd
party hardware device to provide consistent encryption and key management across the
entire enterprise, which is why I needed this book.  So far it's been a great
help, as I don't feel like a complete moron as I attend the endless meetings on implementing
enterprise encryption where i work.
</p>
        <p>
          <u>
            <strong>SQL Server Forensic Analysis - Kevvie Fowler</strong>
          </u>
        </p>
        <p>
I haven't got to reading this one yet.  I'm looking forward to it, as security
has become a major focus in ways I couldn't even imagine 2 years ago.  I thought
the description of this book is interesting, as it approaches security from the aspect
of determine what was compromised, from that I hope to learn better practices in security
data....I'll update on that later.
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=c5bbee65-766a-48bf-b341-d15a4acc4ee2" />
      </body>
      <title>The Bob Book Review</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,c5bbee65-766a-48bf-b341-d15a4acc4ee2.aspx</guid>
      <link>http://www.lifeasbob.com/2010/02/18/TheBobBookReview.aspx</link>
      <pubDate>Thu, 18 Feb 2010 21:55:23 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/shelving_in_silhouette.jpg" border=0&gt; 
&lt;/p&gt;
&lt;p&gt;
Starting in December I purchased the following books.&amp;nbsp; Most of these were related
to new projects where I work and knew I'd need to sharpen a few skills, Encryption,
SQL Express, Merge Replication and security.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Beginning SQL Server 2008 Express for Developers: From Novice to Professional - Robin
Dewson&lt;/li&gt;
&lt;li&gt;
Enterprise Data Synchronization with Microsoft SQL Server 2008 and SQL Server Compact
3.5 
&lt;/li&gt;
&lt;li&gt;
Mobile Merge Replication - Rob Tiffany&lt;/li&gt;
&lt;li&gt;
SQL Server MVP Deep Dives&lt;/li&gt;
&lt;li&gt;
Expert SQL Server 2008 Encryption - Michael Coles, Rodney Landrum&lt;/li&gt;
&lt;li&gt;
SQL Server Forensic Analysis - Kevvie Fowler [bought but not reviewed]&lt;br&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align=center&gt;
&lt;strong&gt;&lt;u&gt;Reviews:&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Beginning SQL Server 2008 Express for Developers: From Novice to Professional
- Robin Dewson&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
This book was a disappointment, but I knew when purchasing it that it was probably
not going to be of much help; but I had to start somewhere.&amp;nbsp; We're preparing
to migrate from MSDE to SQL Express 2K8 in 10,000 locations; I was involved in the
intial deployment (and patchings) of MSDE and I really need to figure out how to avoid
the gotchas with SQL Express; this book wasn't it.&amp;nbsp; Over-all it's a good book,
but it's not meant for an existing SQL Server DBA, I would expect even a Jr. DBA to
already be familiar with the content.&amp;nbsp; It truly is meant for an access developer
who wants to learn SQL Express; I gave it to our local access programmer at work {though
it's actually a she and she's not in IT or a programmer, seems that is&amp;nbsp;where
most access db's begin life}, maybe she'll develop a new career path, we seriously
need more women in IT, I digress.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Enterprise Data Synchronization with Microsoft SQL Server 2008 and SQL
Server Compact 3.5 Mobile Merge&lt;/u&gt;&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
This book was great.&amp;nbsp; We're deploying Merge replication with up to possibly 10,000
differnt locations to SQL Express 2k5 and that is why I purchased this book.&amp;nbsp;
While not an exact guide or road map for what we're doing [we're not using SQL Server
compact edition], most of the concepts apply.&amp;nbsp; It has really been helpful, we're
still in the planning and proof of concept stages, so it remains to be seen if we'll
continue with this design at work, but I feel this book helped us greatly.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;SQL Server MVP Deep Dives&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
This book was great.&amp;nbsp; I kind of avoided it at first, as I don't like books that
too many people jump on as good, but this one lived up to that promise.&amp;nbsp; Very
few parts of the book were lame ! [there's a glowing recommendation].&amp;nbsp; I put
a sticky next to each new thing I learned and when I was done, i'd say there were
at least 15-20 stickeys across the book, that's worth the money I paid for it.&amp;nbsp;
It's also nice as you can read this book in quick "snippets" flipping to what subject
interests you and what you have time to read.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Expert SQL Server 2008 Encryption - Michael Coles, Rodney Landrum&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
This book is good, though a bit dry, I'm still not all the way through it...reading
about encryption is not what I'd consider an exciting topic, but it is a skill i'm
going to need and it was seriously lacking.&amp;nbsp; We're preparing to bring in a 3rd
party hardware device to provide consistent encryption and key management across the
entire enterprise, which is why I needed this book.&amp;nbsp; So far it's been a great
help, as I don't feel like a complete moron as I attend the endless meetings on implementing
enterprise encryption where i work.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;&lt;strong&gt;SQL Server Forensic Analysis - Kevvie Fowler&lt;/strong&gt;&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
I haven't got to reading this one yet.&amp;nbsp; I'm looking forward to it, as security
has become a major focus in ways I couldn't even imagine 2 years ago.&amp;nbsp; I thought
the description of this book is interesting, as it approaches security from the aspect
of determine what was compromised, from that I hope to learn better practices in security
data....I'll update on that later.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=c5bbee65-766a-48bf-b341-d15a4acc4ee2" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,c5bbee65-766a-48bf-b341-d15a4acc4ee2.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=5fbceb21-267b-4313-8df3-ec90422ae449</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,5fbceb21-267b-4313-8df3-ec90422ae449.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,5fbceb21-267b-4313-8df3-ec90422ae449.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=5fbceb21-267b-4313-8df3-ec90422ae449</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
January and February are peak times for my company's business; now I can start to
focus on new things, here is what I learned during peak and where 2010 will focus:
</p>
        <p>
          <a href="http://jakegarn.com/">
            <img src="http://www.lifeasbob.com/content/binary/capacity.bmp" border="0" />
          </a>
        </p>
        <ul>
          <li>
Capacity management is the 2nd most important thing dba's do.</li>
          <li>
Performance tuning and monitoring is the most important thing (during peak)</li>
          <li>
Locking and Blocking is the biggest scale issue i regularly see.</li>
          <li>
Mirroring on SQL Server standard edition sucks (especially for geographically disperse
sites).</li>
          <li>
Mirroring on SQL Server enterprise edition rocks (though the cost factor is prohibitive).</li>
          <li>
Informatica is no better an ETL Tool than SSIS</li>
          <li>
Oracle and SQL Server are a pain in the ass to make work together (Oracle
DBAs are'nt much help either)</li>
          <li>
1 terrabyte of disk space is almost enough !</li>
          <li>
Re-indexing and defragging is analogous to politics and religion and DBA's should
be barred from discussing the topic</li>
          <li>
Encryption is a pain in the ass.</li>
          <li>
Surprise - Merge replication actually works and is not near the PIA I thought</li>
          <li>
6gb of RAM is never enough</li>
          <li>
Polyserve is not worth the effort</li>
          <li>
VM Ware with VMotion is awesome</li>
          <li>
VM Ware is a good alternative to Polyserve</li>
          <li>
Hyper-V is not there yet</li>
          <li>
SQL 2008 R2 licensing sucks 
</li>
          <li>
SQL 2000 is finally no longer meeting the business requirements and we may finally
get funding to upgrade the remaining instances !</li>
        </ul>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=5fbceb21-267b-4313-8df3-ec90422ae449" />
      </body>
      <title>Peak is over</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,5fbceb21-267b-4313-8df3-ec90422ae449.aspx</guid>
      <link>http://www.lifeasbob.com/2010/02/04/PeakIsOver.aspx</link>
      <pubDate>Thu, 04 Feb 2010 21:12:30 GMT</pubDate>
      <description>&lt;p&gt;
January and February are peak times for my company's business; now I can start to
focus on new things, here is what I learned during peak and where 2010 will focus:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://jakegarn.com/"&gt;&lt;img src="http://www.lifeasbob.com/content/binary/capacity.bmp" border=0&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Capacity management is the 2nd most important thing dba's do.&lt;/li&gt;
&lt;li&gt;
Performance tuning and monitoring is the most important thing (during peak)&lt;/li&gt;
&lt;li&gt;
Locking and Blocking is the biggest scale issue i regularly see.&lt;/li&gt;
&lt;li&gt;
Mirroring on SQL Server standard edition sucks (especially for geographically disperse
sites).&lt;/li&gt;
&lt;li&gt;
Mirroring on SQL Server enterprise edition rocks (though the cost factor is prohibitive).&lt;/li&gt;
&lt;li&gt;
Informatica is no better an ETL Tool than SSIS&lt;/li&gt;
&lt;li&gt;
Oracle and SQL Server are a&amp;nbsp;pain in the ass&amp;nbsp;to make work together (Oracle
DBAs are'nt much help either)&lt;/li&gt;
&lt;li&gt;
1 terrabyte of disk space is almost enough !&lt;/li&gt;
&lt;li&gt;
Re-indexing and defragging is analogous to politics and religion and DBA's should
be barred from discussing the topic&lt;/li&gt;
&lt;li&gt;
Encryption is a pain in the ass.&lt;/li&gt;
&lt;li&gt;
Surprise - Merge replication actually works and is not near the PIA I thought&lt;/li&gt;
&lt;li&gt;
6gb of RAM is never enough&lt;/li&gt;
&lt;li&gt;
Polyserve is not worth the effort&lt;/li&gt;
&lt;li&gt;
VM Ware with VMotion is awesome&lt;/li&gt;
&lt;li&gt;
VM Ware is a good alternative to Polyserve&lt;/li&gt;
&lt;li&gt;
Hyper-V is not there yet&lt;/li&gt;
&lt;li&gt;
SQL 2008 R2 licensing sucks 
&lt;/li&gt;
&lt;li&gt;
SQL 2000 is finally no longer meeting the business requirements and we may finally
get funding to upgrade the remaining instances !&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=5fbceb21-267b-4313-8df3-ec90422ae449" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,5fbceb21-267b-4313-8df3-ec90422ae449.aspx</comments>
      <category>SQL Server</category>
      <category>Web_Blog</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=084b34ac-7b00-491c-8ba2-4582bda484d4</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,084b34ac-7b00-491c-8ba2-4582bda484d4.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,084b34ac-7b00-491c-8ba2-4582bda484d4.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=084b34ac-7b00-491c-8ba2-4582bda484d4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Migrating from one cluster technology to another or even with-in the same technology
is fairly easy.  Recently I'm run into an issue where we need to migrate a SQL
Server Instance from a HP Polyserve Cluster to a Microsoft Cluster.
</p>
        <p>
There were two issues I found in setting this up:
</p>
        <ul>
          <li>
Installing SQL Server on a Microsoft Cluster requires a virtual name 
</li>
          <li>
Keeping the exact same Port Number</li>
        </ul>
        <p>
The reason for the above two issues was to keep the down time to an absolute minimum
and ensure there were no changes necessary to the application or infrastructure (firewalls).
</p>
        <p>
Fortunately both HP Polyserve and Microsoft Clustering use virtual names, this is
what makes this possible.
</p>
        <p>
I found the following two links helpful:
</p>
        <p>
          <a href="http://msdn.microsoft.com/en-us/library/ms178083(SQL.90).aspx">How to: Rename
a SQL Server 2005 Virtual Server</a>
          <br />
          <a href="http://support.microsoft.com/kb/244980">How to change the network IP addresses
of SQL Server failover cluster instances<br /></a>
        </p>
        <p>
The key to making this happen is to install SQL Server using a temporary Virtual name
and IP Address and ensure to use the EXACT Same instance name.  Instance names
can not be changed with SQL Server 2005 (or at least it's not supported to change
them).  Changing the port number is pretty standard stuff.
</p>
        <p>
Now you can pre-test your migration of databases and user logins, and load test the
new hardware.  
</p>
        <p>
At the designated change time we performed the following.
</p>
        <ul>
          <li>
Take the Microsoft Cluster Off line 
</li>
          <li>
Take the Instance on HP Polyserve and delete the Instance and virtual name (binaries
and data files will be kept as a backout plan) 
</li>
          <li>
Using the SQL Server Configuration editor, change the IP address <strong>on all nodes</strong> in
the Microsoft Cluster: 
</li>
          <li>
Using the Cluster Administrator change the SQL Server IP Address 
</li>
          <li>
Using the Cluster Administrator change the SQL Server network name 
</li>
          <li>
Bring the Cluster on-line 
</li>
          <li>
Test</li>
        </ul>
        <p>
The one issue we ran into was with logical networks and VLANS, I don't have a complete
understanding of network topology, but only certain logical networks with-in our environment
can host different ranges of IP Addresses.  Initiall we built the new cluster
on a logical network that was unable to host the existing virtual name and the switch
failed, ensure to talk to your network, windows and DNS engineers about exactly what
your wanting to do so they can build things properly the first time, as they don't
like switching and changing things twice any more than DBA's do !
</p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/sql_network_switch.JPG" border="0" />
        </p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/sql_ip_switch.JPG" border="0" />
        </p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/sql_network_name_switch.JPG" border="0" />
        </p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=084b34ac-7b00-491c-8ba2-4582bda484d4" />
      </body>
      <title>Migrating from one Cluster to Another (Polyserve to Microsoft)</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,084b34ac-7b00-491c-8ba2-4582bda484d4.aspx</guid>
      <link>http://www.lifeasbob.com/2009/12/01/MigratingFromOneClusterToAnotherPolyserveToMicrosoft.aspx</link>
      <pubDate>Tue, 01 Dec 2009 19:54:25 GMT</pubDate>
      <description>&lt;p&gt;
Migrating from one cluster technology to another or even with-in the same technology
is fairly easy.&amp;nbsp; Recently I'm run into an issue where we need to migrate a SQL
Server Instance from a HP Polyserve Cluster to a Microsoft Cluster.
&lt;/p&gt;
&lt;p&gt;
There were two issues I found in setting this up:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Installing SQL Server on a Microsoft Cluster requires a virtual name 
&lt;li&gt;
Keeping the exact same Port Number&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The reason for the above two issues was to keep the down time to an absolute minimum
and ensure there were no changes necessary to the application or infrastructure (firewalls).
&lt;/p&gt;
&lt;p&gt;
Fortunately both HP Polyserve and Microsoft Clustering use virtual names, this is
what makes this possible.
&lt;/p&gt;
&lt;p&gt;
I found the following two links helpful:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/ms178083(SQL.90).aspx"&gt;How to: Rename
a SQL Server 2005 Virtual Server&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://support.microsoft.com/kb/244980"&gt;How to change the network IP addresses
of SQL Server failover cluster instances&lt;br&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The key to making this happen is to install SQL Server using a temporary Virtual name
and IP Address and ensure to use the EXACT Same instance name.&amp;nbsp; Instance names
can not be changed with SQL Server 2005 (or at least it's not supported to change
them).&amp;nbsp; Changing the port number is pretty standard stuff.
&lt;/p&gt;
&lt;p&gt;
Now you can pre-test your migration of databases and user logins, and load test the
new hardware.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
At the designated change time we performed the following.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Take the Microsoft Cluster Off line 
&lt;li&gt;
Take the Instance on HP Polyserve and delete the Instance and virtual name (binaries
and data files will be kept as a backout plan) 
&lt;li&gt;
Using the SQL Server Configuration editor, change the IP address &lt;strong&gt;on all nodes&lt;/strong&gt; in
the Microsoft Cluster: 
&lt;li&gt;
Using the Cluster Administrator change the SQL Server IP Address 
&lt;li&gt;
Using the Cluster Administrator change the SQL Server network name 
&lt;li&gt;
Bring the Cluster on-line 
&lt;li&gt;
Test&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The one issue we ran into was with logical networks and VLANS, I don't have a complete
understanding of network topology, but only certain logical networks with-in our environment
can host different ranges of IP Addresses.&amp;nbsp; Initiall we built the new cluster
on a logical network that was unable to host the existing virtual name and the switch
failed, ensure to talk to your network, windows and DNS engineers about exactly what
your wanting to do so they can build things properly the first time, as they don't
like switching and changing things twice any more than DBA's do !
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/sql_network_switch.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/sql_ip_switch.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/sql_network_name_switch.JPG" border=0&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=084b34ac-7b00-491c-8ba2-4582bda484d4" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,084b34ac-7b00-491c-8ba2-4582bda484d4.aspx</comments>
      <category>Polyserve</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=517a9bf2-ad51-4e8c-b5ee-f014e4b0d45f</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,517a9bf2-ad51-4e8c-b5ee-f014e4b0d45f.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,517a9bf2-ad51-4e8c-b5ee-f014e4b0d45f.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=517a9bf2-ad51-4e8c-b5ee-f014e4b0d45f</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
SQL Server security, logins, auditing and reporting still not where it needs to be
?  Maybe someone can help me with ideas, if so <a href="mailto://bobh@lifeasbob.com">email</a>, me
or leave me some comments.
</p>
        <p>
          <img style="WIDTH: 272px; HEIGHT: 265px" height="265" src="http://www.lifeasbob.com/content/binary/policewomancostume.jpg" width="298" border="0" />
        </p>
        <p>
I've been through a lot of requirements and implementing everything the information
security group wants is like Macgyver with duct tape.  Currently this is for
SQL 2005, but I'd like to know how to implement it for SQL 2008 as well.
</p>
        <p>
Currently I'm meeting the following Information Security requirements:
</p>
        <ul>
          <li>
Limit Logins by specific IP or IP Ranges in combination with Time of Day [login trigger] 
</li>
          <li>
Limit Logins by Time of Day [login trigger] 
</li>
          <li>
Disconnect logins that are connected past there authorized time. [job running every
5 minutes] 
</li>
          <li>
Keep Record of All Logins (success or Failures) [daily job to scrape error log] 
</li>
          <li>
Keep Counts of Login Failures [daily job to scrape error log] 
</li>
          <li>
Keep track of Date and Time Password was changed (sql authenticated only) [Tracing] 
</li>
          <li>
Provide reporting and alerting that shows counts of failure, by month, by id etc.
[Reporting Services and SQL Agent] 
</li>
          <li>
Limit number of concurrent connections by ID and by Global Count [login trigger],
so the max number of connections for an instance may be 1000, and the max for a user
maybe 5, and the max for the application id may be 300.</li>
        </ul>
        <p>
Now they want me to selectively enforce password length and expiration based on the
following requirements for SQL Server Authenticated:
</p>
        <ul>
          <li>
            <strong>Service accounts</strong>  28 characters, expire yearly  (accounts
that are not, or should not be used for general sign on’s and limited by what machine(s)
they can login from) 
</li>
          <li>
            <strong>Admin accounts</strong> 15 characters, expire yearly (accounts that are used
by DBA’s) 
</li>
          <li>
            <strong>User accounts</strong> 8 characters, expire every 90 days (normal user accounts)
[this is easy as our Active Directory can enforce this]</li>
        </ul>
        <p>
It just seems that meeting all these requirements in SQL becomes very difficult to
administer; we're running a combination of:
</p>
        <ul>
          <li>
Dedicated database for reporting, configuration and capture of statistics 
</li>
          <li>
Login Trigger (difficult to administer and one little issue everyone is locked out) 
</li>
          <li>
Tracing (to capture when a user changes their password) 
</li>
          <li>
SQL Agent jobs (to clean up, scrape and roll over reporting tables) 
</li>
          <li>
Reporting Services (for reporting) 
</li>
          <li>
Enabling the DAC 
</li>
          <li>
Enabling Login Auditing 
</li>
          <li>
Enabling CCC (Common Criteria Compliance)</li>
        </ul>
        <p>
My counter-parts in Oracle seem to have an easier time meeting all these requirements,
with less overhead, easier to administer and keep running, and less danger of locking
everyone out.
</p>
        <p>
SQL Server continues to frustrate me with this, anyone have suggestions or an easier
time with SQL Server 2005 or 2008?
</p>
        <p>
All these things should be available out of the box, duct taping all that stuff together
in sql server is absolutely brutal, documenting and training someone on it is even
worse.
</p>
        <p>
It does provide good job security, as let the <strong><u>suits</u></strong> out source
the DBA Staff after implementing all of these requirements and they'd sure have a
tough time finding someone to run this stuff easily!
</p>
        <p>
The "Suits" and "Information Security"!
</p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/suits.jpg" border="0" />
        </p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=517a9bf2-ad51-4e8c-b5ee-f014e4b0d45f" />
      </body>
      <title>SQL Server Security, not where it needs to be ?</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,517a9bf2-ad51-4e8c-b5ee-f014e4b0d45f.aspx</guid>
      <link>http://www.lifeasbob.com/2009/12/01/SQLServerSecurityNotWhereItNeedsToBe.aspx</link>
      <pubDate>Tue, 01 Dec 2009 19:08:40 GMT</pubDate>
      <description>&lt;p&gt;
SQL Server security, logins, auditing and reporting still not where it needs to be
?&amp;nbsp; Maybe someone can help me with ideas, if so &lt;a href="mailto://bobh@lifeasbob.com"&gt;email&lt;/a&gt;,&amp;nbsp;me
or leave me some comments.
&lt;/p&gt;
&lt;p&gt;
&lt;img style="WIDTH: 272px; HEIGHT: 265px" height=265 src="http://www.lifeasbob.com/content/binary/policewomancostume.jpg" width=298 border=0&gt;
&lt;/p&gt;
&lt;p&gt;
I've been through a lot of requirements and implementing everything the information
security group wants is like Macgyver with duct tape.&amp;nbsp; Currently this is for
SQL 2005, but I'd like to know how to implement it for SQL 2008 as well.
&lt;/p&gt;
&lt;p&gt;
Currently I'm meeting the following Information Security&amp;nbsp;requirements:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Limit Logins by specific IP or IP Ranges in combination with Time of Day [login trigger] 
&lt;li&gt;
Limit Logins by Time of Day [login trigger] 
&lt;li&gt;
Disconnect logins that are connected past there authorized time. [job running every
5 minutes] 
&lt;li&gt;
Keep Record of All Logins (success or Failures) [daily job to scrape error log] 
&lt;li&gt;
Keep Counts of Login Failures [daily job to scrape error log] 
&lt;li&gt;
Keep track of Date and Time Password was changed (sql authenticated only) [Tracing] 
&lt;li&gt;
Provide reporting and alerting that shows counts of failure, by month, by id etc.
[Reporting Services and SQL Agent] 
&lt;li&gt;
Limit number of concurrent connections by ID and by Global Count [login trigger],
so the max number of connections for an instance may be 1000, and the max for a user
maybe 5, and the max for the application id may be 300.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Now they want me to selectively enforce password length and expiration based on the
following requirements for SQL Server Authenticated:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Service accounts&lt;/strong&gt;&amp;nbsp; 28 characters, expire yearly&amp;nbsp; (accounts
that are not, or should not be used for general sign on’s and limited by what machine(s)
they can login from) 
&lt;li&gt;
&lt;strong&gt;Admin accounts&lt;/strong&gt; 15 characters, expire yearly (accounts that are used
by DBA’s) 
&lt;li&gt;
&lt;strong&gt;User accounts&lt;/strong&gt; 8 characters, expire every 90 days (normal user accounts)
[this is easy as our Active Directory can enforce this]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
It just seems that meeting all these requirements in SQL becomes very difficult to
administer; we're running a combination of:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Dedicated&amp;nbsp;database for reporting, configuration and capture of statistics 
&lt;li&gt;
Login Trigger (difficult to administer and one little issue everyone is locked out) 
&lt;li&gt;
Tracing (to capture when a user changes their password) 
&lt;li&gt;
SQL Agent jobs (to clean up, scrape and roll over reporting tables) 
&lt;li&gt;
Reporting Services (for reporting) 
&lt;li&gt;
Enabling the DAC 
&lt;li&gt;
Enabling Login Auditing 
&lt;li&gt;
Enabling CCC (Common Criteria Compliance)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
My counter-parts in Oracle seem to have an easier time meeting all these requirements,
with less overhead, easier to administer and keep running, and less danger of locking
everyone out.
&lt;/p&gt;
&lt;p&gt;
SQL Server continues to frustrate me with this, anyone have suggestions or an easier
time with SQL Server 2005 or 2008?
&lt;/p&gt;
&lt;p&gt;
All these things should be available out of the box, duct taping all that stuff together
in sql server is absolutely brutal, documenting and training someone on it is even
worse.
&lt;/p&gt;
&lt;p&gt;
It does provide good job security, as let the &lt;strong&gt;&lt;u&gt;suits&lt;/u&gt;&lt;/strong&gt; out source
the DBA Staff after implementing all of these requirements and they'd sure have a
tough time finding someone to run this stuff easily!
&lt;/p&gt;
&lt;p&gt;
The "Suits" and "Information Security"!
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/suits.jpg" border=0&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=517a9bf2-ad51-4e8c-b5ee-f014e4b0d45f" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,517a9bf2-ad51-4e8c-b5ee-f014e4b0d45f.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / Security</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=a4fc85e9-14af-403e-acc7-d4c621d11154</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,a4fc85e9-14af-403e-acc7-d4c621d11154.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,a4fc85e9-14af-403e-acc7-d4c621d11154.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a4fc85e9-14af-403e-acc7-d4c621d11154</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img src="http://www.lifeasbob.com/content/binary/moneyroll.jpg" border="0" />
        </p>
        <p>
Don't expect your queries to be in order without a select statement, guess what same
goes for SSIS!
</p>
        <p>
Today I had to trouble-shoot a package (not developed by me or our SQL DBA Group),
but regardless, it becomes our problem !
</p>
        <p>
SSIS was exporting a table to a flat file, turns out this flat file is really an XML
File.  The table is populated with XML from a stored procedure prior to the export. 
The data pump ole db source was a table, turns out it's not always in order, resulting
in malformed XML.  Change the source from table to a select statement with an
order by clause and all is working well, fortunately there was a rowid (identity)
column in the table already.
</p>
        <p>
Frustruating to the end user, as it was a package that had been working fine for months.
</p>
        <p>
Of course there was no primary key, making this a heap table; but either way, if the
requirement is to have the data ordered, than you need an order by statement, even
if the data is "in the table that way", and even for SSIS.  [Be nice if Microsoft
put a warning on there that the data access mode may not be in order.]
</p>
        <p>
This seems to be more of a problem on heap tables (no primay key) and Enterprise edition
sql (which supports Merry-go-round scans [i think that's what it's called]).
</p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/ssis_table_dump.jpg" border="0" />
        </p>
        <p>
 
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=a4fc85e9-14af-403e-acc7-d4c621d11154" />
      </body>
      <title>Table dump in SSIS, not in order</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,a4fc85e9-14af-403e-acc7-d4c621d11154.aspx</guid>
      <link>http://www.lifeasbob.com/2009/11/04/TableDumpInSSISNotInOrder.aspx</link>
      <pubDate>Wed, 04 Nov 2009 21:30:59 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/moneyroll.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Don't expect your queries to be in order without a select statement, guess what same
goes for SSIS!
&lt;/p&gt;
&lt;p&gt;
Today I had to trouble-shoot a package (not developed by me or our SQL DBA Group),
but regardless, it becomes our problem !
&lt;/p&gt;
&lt;p&gt;
SSIS was exporting a table to a flat file, turns out this flat file is really an XML
File.&amp;nbsp; The table is populated with XML from a stored procedure prior to the export.&amp;nbsp;
The data pump ole db source was a table, turns out it's not always in order, resulting
in malformed XML.&amp;nbsp; Change the source from table to a select statement with an
order by clause and all is working well, fortunately there was a rowid (identity)
column in the table already.
&lt;/p&gt;
&lt;p&gt;
Frustruating to the end user, as it was a package that had been working fine for months.
&lt;/p&gt;
&lt;p&gt;
Of course there was no primary key, making this a heap table; but either way, if the
requirement is to have the data ordered, than you need an order by statement, even
if the data is "in the table that way", and even for SSIS.&amp;nbsp; [Be nice if Microsoft
put a warning on there that the data access mode may not be in order.]
&lt;/p&gt;
&lt;p&gt;
This seems to be more of a problem on heap tables (no primay key) and Enterprise edition
sql (which supports Merry-go-round scans [i think that's what it's called]).
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/ssis_table_dump.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=a4fc85e9-14af-403e-acc7-d4c621d11154" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,a4fc85e9-14af-403e-acc7-d4c621d11154.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / SSIS</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=f879e08c-d9cb-427e-9289-402cb704ff73</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,f879e08c-d9cb-427e-9289-402cb704ff73.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,f879e08c-d9cb-427e-9289-402cb704ff73.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f879e08c-d9cb-427e-9289-402cb704ff73</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The patching game.
</p>
        <img src="http://www.lifeasbob.com/content/binary/PetePuma.jpg" border="0" />
        <p>
Better give me a whole lotta lumps..... 
</p>
        <p>
Last week Microsoft released a patch for a SQL Server Security vulnerability. 
This week Microsoft released SQL Server 2005 CU 6 (which includes the security patch
and some other fixes).
</p>
        <p>
Test those "other fixes" carefully.
</p>
        <p>
We just ran into a change in behavior for how SSIS evaluated variables that are passed
into Execute SQL Tasks as parameters, Not sure exactly which patch introduced the
change as they are cumulative and we were running CU 2 previously, so anything from
CU 3 on up could have been the cause.
</p>
        <p>
We were running on version 9.00.4211, which is SQL 2K5, SP3 CU2.  We upgraded
to the Security Fix (9.00.4262), and the SSIS package broke.  Hoping not to have
to trouble shoot the issue and needing to be on CU 6 anyway, we applied it, hoping
it would fix the issue...no luck, time to trouble shoot.
</p>
        <p>
The issue is really one of poor coding practice.
</p>
        <p>
There are some variables passed into an execute sql task to dynamically create a where
clause.  
</p>
        <p>
The variable in question was declared as an Integer
</p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/ssis_variable.jpg" border="0" />
        </p>
        <p>
The variable was than passed into the execute sql task, but it was of a varchar type,
below is the corrected parameter mapped as a numeric.
</p>
        <img src="http://www.lifeasbob.com/content/binary/SQL_Task_Parameter_Mapping.jpg" border="0" />
        <p>
The execute sql task is shown here, the parameter is the first one evaluated with
the if "? &lt;&gt; 2".
</p>
        <img src="http://www.lifeasbob.com/content/binary/ssis_dyanmic_query.jpg" border="0" />
        <p>
This execute sql task passed the parameter in is as '', blank, if the parameter mapping
was not set properly.  I confirmed this behavior behind the scenes with a profiler
trace as well.  Interestingly even with the parameter mapped properly as numeric,
it is still passed into sql server as a varchar !  But with the parameter mapped
as numeric, the varchar is properly populated with value of the variable being passed
in and the statement completes successfully.
</p>
        <img src="http://www.lifeasbob.com/content/binary/profiler_trace.jpg" border="0" />
        <p>
Test those SQL Server patches carefully, there is always the off chance of unintended
behavior change.  Ultimately it was "sloppy coding" to be passing an integer
variable in ssis, to a parameter mapped as varchar.  But it has been running
that way for 14-16 months without issue.
</p>
        <p>
Test carefully.
</p>
        <p>
9.00.4211.00 - 2005 SP3 CU 2<br />
9.00.4262.00 - QFE Security Fix<br />
9.00.4266.00 - 2005 sp3 cu 6
</p>
        <p>
In response on where to get sp3 cu 6:
</p>
        <font size="2">
          <p>
          </p>
        </font>
        <a href="http://support.microsoft.com/kb/974648/en-us">
          <u>
            <font color="#0000ff" size="2">
              <font color="#0000ff" size="2">http://support.microsoft.com/kb/974648/en-us
</font>
            </font>
          </u>
        </a>
        <p>
          <br />
 
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=f879e08c-d9cb-427e-9289-402cb704ff73" />
      </body>
      <title>The patching game.</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,f879e08c-d9cb-427e-9289-402cb704ff73.aspx</guid>
      <link>http://www.lifeasbob.com/2009/10/23/ThePatchingGame.aspx</link>
      <pubDate>Fri, 23 Oct 2009 14:04:41 GMT</pubDate>
      <description>&lt;p&gt;
The patching game.
&lt;/p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/PetePuma.jpg" border=0&gt; 
&lt;p&gt;
Better give me a whole lotta lumps..... 
&lt;/p&gt;
&lt;p&gt;
Last week Microsoft released a patch for a SQL Server Security vulnerability.&amp;nbsp;
This week Microsoft released SQL Server 2005 CU 6 (which includes the security patch
and some other fixes).
&lt;/p&gt;
&lt;p&gt;
Test those "other fixes" carefully.
&lt;/p&gt;
&lt;p&gt;
We just ran into a change in behavior for how SSIS evaluated variables that are passed
into Execute SQL Tasks as parameters, Not sure exactly which patch introduced the
change as they are cumulative and we were running CU 2 previously, so anything from
CU 3 on up could have been the cause.
&lt;/p&gt;
&lt;p&gt;
We were running on version 9.00.4211, which is SQL 2K5, SP3 CU2.&amp;nbsp; We upgraded
to the Security Fix (9.00.4262), and the SSIS package broke.&amp;nbsp; Hoping not to have
to trouble shoot the issue and needing to be on CU 6 anyway, we applied it, hoping
it would fix the issue...no luck, time to trouble shoot.
&lt;/p&gt;
&lt;p&gt;
The issue is really one of poor coding practice.
&lt;/p&gt;
&lt;p&gt;
There are some variables passed into an execute sql task to dynamically create a where
clause.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
The variable in question was declared as an Integer
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/ssis_variable.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
The variable was than passed into the execute sql task, but it was of a varchar type,
below is the corrected parameter mapped as a numeric.
&lt;/p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/SQL_Task_Parameter_Mapping.jpg" border=0&gt; 
&lt;p&gt;
The execute sql task is shown here, the parameter is the first one evaluated with
the if "? &amp;lt;&amp;gt; 2".
&lt;/p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/ssis_dyanmic_query.jpg" border=0&gt; 
&lt;p&gt;
This execute sql task passed the parameter in is as '', blank, if the parameter mapping
was not set properly.&amp;nbsp; I confirmed this behavior behind the scenes with a profiler
trace as well.&amp;nbsp; Interestingly even with the parameter mapped properly as numeric,
it is still passed into sql server as a varchar !&amp;nbsp; But with the parameter mapped
as numeric, the varchar is properly populated with value of the variable being passed
in and the statement completes successfully.
&lt;/p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/profiler_trace.jpg" border=0&gt; 
&lt;p&gt;
Test those SQL Server patches carefully, there is always the off chance of unintended
behavior change.&amp;nbsp; Ultimately it was "sloppy coding" to be passing an integer
variable in ssis, to a parameter mapped as varchar.&amp;nbsp; But it has been running
that way for 14-16 months without issue.
&lt;/p&gt;
&lt;p&gt;
Test carefully.
&lt;/p&gt;
&lt;p&gt;
9.00.4211.00 - 2005 SP3 CU 2&lt;br&gt;
9.00.4262.00 - QFE Security Fix&lt;br&gt;
9.00.4266.00 - 2005 sp3 cu 6
&lt;/p&gt;
&lt;p&gt;
In response on where to get sp3 cu 6:
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;a href="http://support.microsoft.com/kb/974648/en-us"&gt;&lt;u&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;http://support.microsoft.com/kb/974648/en-us
&lt;/u&gt;&gt;&gt;&lt;/a&gt;&gt;
&lt;p&gt;
&lt;br&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=f879e08c-d9cb-427e-9289-402cb704ff73" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,f879e08c-d9cb-427e-9289-402cb704ff73.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / SSIS</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=7f20fa82-c272-405f-bfb0-acb1296af503</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,7f20fa82-c272-405f-bfb0-acb1296af503.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,7f20fa82-c272-405f-bfb0-acb1296af503.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7f20fa82-c272-405f-bfb0-acb1296af503</wfw:commentRss>
      <title>Login Failure not followed by user and client</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,7f20fa82-c272-405f-bfb0-acb1296af503.aspx</guid>
      <link>http://www.lifeasbob.com/2009/10/02/LoginFailureNotFollowedByUserAndClient.aspx</link>
      <pubDate>Fri, 02 Oct 2009 19:57:37 GMT</pubDate>
      <description>&lt;p&gt;
I'm working on creating a robust login auditing system for sql server 2005 and 2008.&amp;nbsp;
Part of that process is scraping the error log for Error 18456 to keep counts and
provide reports on failing logins.&amp;nbsp; Works great, but it depends on the two line
entry in the error log of the following:
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;2009-10-01 00:02:00.34
Logon&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error: 18456, Severity: 14, &lt;strong&gt;State: 8&lt;/strong&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;2009-10-01 00:02:00.34
Logon&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Login failed for user '&amp;lt;user name&amp;gt;'. [CLIENT: &lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&amp;lt;ip
address&amp;gt;&lt;/span&gt;]&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;Suddenly the
process fails today, which is ok, that's why we test, test and soak test.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;Seems it is
possible to generate a 18456 error that is not followed by login failed for user message.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;Good coding
practices would have avoided an error (by checking to ensure the next line did contain
a login failed message).&amp;nbsp;&amp;nbsp;We were working on the assumption that the two
entries always happen together.&amp;nbsp; Not so.&amp;nbsp; Kind of makes me wonder where
it went!&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;This happened
on a SQL Server 2005, EE, 64 Bit, SP3, CU 4.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;The specific
entry is below:&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'"&gt;Error: 18456, Severity: 14,
State: 16.&lt;br&gt;
CHECKDB for database '&amp;lt;removed&amp;gt;' finished without errors on 2009-10-01 04:05:02.370
(local time). This is an informational message only; no user action is required.&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=7f20fa82-c272-405f-bfb0-acb1296af503" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,7f20fa82-c272-405f-bfb0-acb1296af503.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=b38ae2b8-1117-45ce-af20-75e6a62542aa</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,b38ae2b8-1117-45ce-af20-75e6a62542aa.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,b38ae2b8-1117-45ce-af20-75e6a62542aa.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b38ae2b8-1117-45ce-af20-75e6a62542aa</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <a href="http://en.wikipedia.org/wiki/Keeley_Hazell">
          <img src="http://www.lifeasbob.com/content/binary/keeleyhazelllynxpromo.jpg" border="0" />
        </a>
        <p>
I'm in the middle of an all-nighter for a SAN Migration.  Lots of down time,
here's what I found worth reading:
</p>
        <p>
          <a href="http://www.computerworld.com/s/article/9137708/Opinion_The_unspoken_truth_about_managing_geeks?taxonomyId=14&amp;pageNumber=1">The
unspoken truth about managing geeks.</a>
        </p>
        <p>
          <a href="http://www.cio.com/article/459868/Understanding_Service_Level_Agreements_for_Database_Development?taxonomyId=1419">Understanding
Service Level Agreements for Database Development.</a>
        </p>
        <p>
          <a href="http://www.infoworld.com/d/data-management/sql-servers-latest-security-hole-real-threat-801">Is
SQL Server's latest security hole a real threat?</a>
          <br />
        </p>
        <hr />
        <p>
Very interesting syntax of the in-clause I didn't know existed:
</p>
        <p>
SELECT<font color="#000000" size="2"></font><font color="#808080" size="2"><font color="#808080" size="2">*</font></font><font color="#000000" size="2"></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">FROM</font></font><font color="#000000" size="2"> person</font><font color="#808080" size="2"><font color="#808080" size="2">.</font></font><font size="2"><font color="#000000">contact</font></font></p>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">
            <p>
WHERE
</p>
          </font>
        </font>
        <font color="#000000" size="2">
        </font>
        <font color="#ff0000" size="2">
          <font color="#ff0000" size="2">'thomas'</font>
        </font>
        <font color="#000000" size="2">
        </font>
        <font color="#808080" size="2">
          <font color="#808080" size="2">in(</font>
        </font>
        <font color="#000000" size="2">Firstname</font>
        <font color="#808080" size="2">
          <font color="#808080" size="2">,</font>
        </font>
        <font color="#000000" size="2">LastName</font>
        <font color="#808080" size="2">
          <font color="#808080" size="2">,LEFT(</font>
        </font>
        <font color="#000000" size="2">emailaddress</font>
        <font color="#808080" size="2">
          <font color="#808080" size="2">,</font>
        </font>
        <font color="#000000" size="2">7</font>
        <font color="#808080" size="2">
          <font color="#808080" size="2">))</font>
        </font>
        <p>
          <a href="http://sqlblog.com/blogs/denis_gobo/archive/2009/04/09/13186.aspx">From the
I did not know this would work department</a>
          <br />
        </p>
        <hr />
        <p>
          <a href="http://www.masshightech.com/stories/2009/09/07/daily34-Big-competitors-spark-Netezzas-partner-friendly-strategy.html">Big
competitors spark Netezza’s partner-friendly strategy</a>
        </p>
        <p>
          <a style="FONT-WEIGHT: bold" href="http://www.popoholic.com/2008/09/02/keeley-hazell-sizzles-for-lynx/">Keeley
Hazell looks hot while she's shilling for something.</a>
        </p>
        <p>
Don't ask me how I'd go from Keeley to Jeremiah Johnson, but all nighters due that
to you, than and i've never been normal, it's boring.
</p>
        <p>
"where ya headed?"<br />
"Same place you are Jeremiah, Hell, in the end."
</p>
        <p>
Link to download sound track to the movie, <a href="http://littledelving.com/HappyHollow/CrowCorner/CrowCorner.html">Crow
Corner</a>., a long time ago I had it on LP, doubt I'd ever find it on cd or mp3,
but all night'ers have a way of helping you find things.
</p>
        <p>
 
</p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/JeremiahJohnson_Front.jpg" border="0" />
        </p>
        <p>
 
</p>
        <img src="http://www.lifeasbob.com/content/binary/JeremiahJohnson_back.jpg" border="0" />
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b38ae2b8-1117-45ce-af20-75e6a62542aa" />
      </body>
      <title>The Bob Saturday Night Link Look </title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,b38ae2b8-1117-45ce-af20-75e6a62542aa.aspx</guid>
      <link>http://www.lifeasbob.com/2009/09/13/TheBobSaturdayNightLinkLook.aspx</link>
      <pubDate>Sun, 13 Sep 2009 02:40:51 GMT</pubDate>
      <description>&lt;a href="http://en.wikipedia.org/wiki/Keeley_Hazell"&gt;&lt;img src="http://www.lifeasbob.com/content/binary/keeleyhazelllynxpromo.jpg" border=0&gt;&lt;/a&gt; 
&lt;p&gt;
I'm in the middle of an all-nighter for a SAN Migration.&amp;nbsp; Lots of down time,
here's what I found worth reading:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.computerworld.com/s/article/9137708/Opinion_The_unspoken_truth_about_managing_geeks?taxonomyId=14&amp;amp;pageNumber=1"&gt;The
unspoken truth about managing geeks.&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.cio.com/article/459868/Understanding_Service_Level_Agreements_for_Database_Development?taxonomyId=1419"&gt;Understanding
Service Level Agreements for Database Development.&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.infoworld.com/d/data-management/sql-servers-latest-security-hole-real-threat-801"&gt;Is
SQL Server's latest security hole a real threat?&lt;/a&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;
Very interesting syntax of the in-clause I didn't know existed:
&lt;/p&gt;
&lt;p&gt;
SELECT&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#808080 size=2&gt;&lt;font color=#808080 size=2&gt;*&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;FROM&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; person&lt;/font&gt;&lt;font color=#808080 size=2&gt;&lt;font color=#808080 size=2&gt;.&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt;contact&lt;/font&gt;
&lt;/p&gt;
&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;
WHERE
&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;&lt;font color=#ff0000 size=2&gt;'thomas'&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#808080 size=2&gt;&lt;font color=#808080 size=2&gt;in(&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;Firstname&lt;/font&gt;&lt;font color=#808080 size=2&gt;&lt;font color=#808080 size=2&gt;,&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;LastName&lt;/font&gt;&lt;font color=#808080 size=2&gt;&lt;font color=#808080 size=2&gt;,LEFT(&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;emailaddress&lt;/font&gt;&lt;font color=#808080 size=2&gt;&lt;font color=#808080 size=2&gt;,&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;7&lt;/font&gt;&lt;font color=#808080 size=2&gt;&lt;font color=#808080 size=2&gt;))&lt;/font&gt;&lt;/font&gt;&gt;
&lt;p&gt;
&lt;a href="http://sqlblog.com/blogs/denis_gobo/archive/2009/04/09/13186.aspx"&gt;From the
I did not know this would work department&lt;/a&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;
&lt;a href="http://www.masshightech.com/stories/2009/09/07/daily34-Big-competitors-spark-Netezzas-partner-friendly-strategy.html"&gt;Big
competitors spark Netezza’s partner-friendly strategy&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a style="FONT-WEIGHT: bold" href="http://www.popoholic.com/2008/09/02/keeley-hazell-sizzles-for-lynx/"&gt;Keeley
Hazell looks hot while she's shilling for something.&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Don't ask me how I'd go from Keeley to Jeremiah Johnson, but all nighters due that
to you, than and i've never been normal, it's boring.
&lt;/p&gt;
&lt;p&gt;
"where ya headed?"&lt;br&gt;
"Same place you are Jeremiah, Hell, in the end."
&lt;/p&gt;
&lt;p&gt;
Link to download sound track to the movie, &lt;a href="http://littledelving.com/HappyHollow/CrowCorner/CrowCorner.html"&gt;Crow
Corner&lt;/a&gt;., a long time ago I had it on LP, doubt I'd ever find it on cd or mp3,
but all night'ers have a way of helping you find things.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/JeremiahJohnson_Front.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/JeremiahJohnson_back.jpg" border=0&gt;&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b38ae2b8-1117-45ce-af20-75e6a62542aa" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,b38ae2b8-1117-45ce-af20-75e6a62542aa.aspx</comments>
      <category>General Technology</category>
      <category>SQL Server</category>
      <category>Web_Blog</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=bd41d6b5-c15d-4fb2-92dd-00ebed7da000</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,bd41d6b5-c15d-4fb2-92dd-00ebed7da000.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,bd41d6b5-c15d-4fb2-92dd-00ebed7da000.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=bd41d6b5-c15d-4fb2-92dd-00ebed7da000</wfw:commentRss>
      <title>HP SIM Manual Discovery causes issues</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,bd41d6b5-c15d-4fb2-92dd-00ebed7da000.aspx</guid>
      <link>http://www.lifeasbob.com/2009/09/10/HPSIMManualDiscoveryCausesIssues.aspx</link>
      <pubDate>Thu, 10 Sep 2009 17:05:55 GMT</pubDate>
      <description>&lt;p&gt;
Recently we upgraded to a new version of HP SIM (systems insight manager), of course
not testing it or letting the DBA's know.&amp;nbsp; Suddenly some things crash.&amp;nbsp;
The new version of HP Sim provides a "richer discovery model"; oh it's rich!
&lt;/p&gt;
&lt;p&gt;
Seems the new version performs some type of scan on the scsi bus, which causes our
multi-path software (EMC Powerpath) to loose connectivity to the SAN, this causes
the file system to "Panic", and all filesystems unmount.&amp;nbsp; Nice.
&lt;/p&gt;
&lt;p&gt;
SIM is a hardware monitoring solution from HP for HP servers.&amp;nbsp; The server administration
team loves it, the SQL DBA's don't mind it.&amp;nbsp; It of course uses SQL Server for
a back-end database, so it helps keep us employed as well !&amp;nbsp; Basically SIM provides
hardware inventory and monitoring of the servers. 
&lt;/p&gt;
&lt;p&gt;
Specifically:&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Version:&amp;nbsp; Systems Insight Manager 5.3 with SP1 - Windows&lt;br&gt;
Build version:&amp;nbsp; C.05.03.01.00&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Using the Manual Discovery Task that ships with the product.
&lt;/p&gt;
&lt;p&gt;
The issue was most notable with our clustered servers, especially Polyserve.&amp;nbsp;
Below were the error messages:
&lt;/p&gt;
&lt;div dir=ltr align=left&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;span class=680095415-10092009&gt;&lt;font face=Arial color=#0000ff size=2&gt;I/O error in
nodelist_get for filesystem on psv30: nlblocknr=10, blocknr=10, nlsize=8192, size=8192,
count=16.&lt;/font&gt;&lt;/span&gt;
&lt;/o:p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;o:p&gt;
&lt;span class=680095415-10092009&gt;&lt;font face=Arial color=#0000ff size=2&gt;umount: unmounting
filesystem from psv30. &lt;/font&gt;&lt;/span&gt;
&lt;/o:p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;o:p&gt;
&lt;span class=680095415-10092009&gt;&lt;font face=Arial color=#0000ff size=2&gt;Filesystem on
psv30 has finished disabling itself, and has no more writes to drain.&lt;/font&gt;&lt;/span&gt;
&lt;/o:p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;o:p&gt;
&lt;span class=680095415-10092009&gt;&lt;font face=Arial color=#0000ff size=2&gt;A psv-bound subdevice
(psv7 - 0x8001) has been removed from the system.&lt;/font&gt;&lt;/span&gt;
&lt;/o:p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;o:p&gt;
&lt;span class=680095415-10092009&gt;&lt;font face=Arial color=#0000ff size=2&gt;Filesystem on
psv39 has suffered a critical I/O error, and will be disabled to protect filesystem
integrity.&lt;/font&gt;&lt;/span&gt;
&lt;/o:p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;o:p&gt;
&lt;span class=680095415-10092009&gt;&lt;font face=Arial color=#0000ff size=2&gt;The device, \Device\Harddisk140\DR645,
is not ready for access yet.&lt;/font&gt;&lt;/span&gt;
&lt;/o:p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;o:p&gt;
&lt;span class=680095415-10092009&gt;&lt;font face=Arial color=#0000ff size=2&gt;\Device\MPIODisk398
is currently in a degraded state. One or more paths have failed, though the process
is now complete.&lt;/font&gt;&lt;/span&gt;
&lt;/o:p&gt;
&lt;/div&gt;
&lt;p&gt;
Work closely with your administrators and be careful of how these monitoring solutions
will affect your production servers.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=bd41d6b5-c15d-4fb2-92dd-00ebed7da000" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,bd41d6b5-c15d-4fb2-92dd-00ebed7da000.aspx</comments>
      <category>General Technology</category>
      <category>Polyserve</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=f12075c9-af2f-44d7-abf8-69d9e6c24ad3</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,f12075c9-af2f-44d7-abf8-69d9e6c24ad3.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,f12075c9-af2f-44d7-abf8-69d9e6c24ad3.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f12075c9-af2f-44d7-abf8-69d9e6c24ad3</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
There are many emphases for the SQL DBA, one of the major items is security. 
Where I work security and patching have taken on new importance over the past 12 months. 
Patching which used to be a yearly event, is now monthly or even weekly.  Combine
that with SOX Controls and other internal controls, there is a focus on security. 
Part of that is seen in SQL Server from Microsoft, kudos!  
</p>
        <p>
The product gained a new level of security with SQL Server 2005.  Service Pack
2 gave us Login Triggers / Service Broker Events.  SQL 2008 saw the Builtin\Administrators
account gone (separation of duties) and even more controls.
</p>
        <p>
Than today it was distressing to see a news report about Microsoft ignoring a vulnerability
with SQL Server, basically dismissing it as anyone with administrator privileges already
has control [What happenned to separation of duties?].  The whole point of where
security with SQL Server was going was to ensure that administrators could be properly
segmented.  Where I work they'd like to get to the point where a SQL DBA can't
even view or query the data that they administer.
</p>
        <p>
If you find the below security vulnerability to be an issue than complain to Microsoft. 
Also if you didn't know about this vulnerability, than you need to ensure to plug-in
to some other industry news sources to get your information on vulnerability and patches,
as you can't always count on Microsoft to disclose issues.
</p>
        <p>
-----Original Message-----<br />
From: Security Wire Daily [mailto:SearchSecurity@lists.techtarget.com] 
<br />
Sent: Wednesday, September 02, 2009 10:38 AM<br />
Subject: New SQL Server password flaw surfaces
</p>
        <p>
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<br />
SearchSecurity.com: Security Wire Daily<br />
Breaking security news, the latest industry developments and trends<br />
September 02, 2009<br />
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
</p>
        <p>
UNPATCHED VULNERABILITY DISCOVERED IN MICROSOFT SQL SERVER<br />
Michael S. Mimoso, Editor, Information Security magazine
</p>
        <p>
Microsoft SQL Server administrators are being warned today about an<br />
unpatched vulnerability in the popular database software that exposes<br />
user passwords in the clear, as well as credentials delivered by<br />
applications trying to access the database server.
</p>
        <p>
Researchers at San Mateo, Calif.-based Sentrigo Inc., announced the<br />
flaw this morning, and also revealed that Microsoft has no immediate<br />
plans to release a patch for the vulnerability. Sentrigo, meanwhile,<br />
said it has developed a free utility that will erase these passwords<br />
from memory.<br />
Read more:<br /><a href="http://go.techtarget.com/r/9124859/8704472">http://go.techtarget.com/r/9124859/8704472</a><br /></p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=f12075c9-af2f-44d7-abf8-69d9e6c24ad3" />
      </body>
      <title>Unpatched Vulnerabiltiy discovered in Microsoft SQL Server</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,f12075c9-af2f-44d7-abf8-69d9e6c24ad3.aspx</guid>
      <link>http://www.lifeasbob.com/2009/09/02/UnpatchedVulnerabiltiyDiscoveredInMicrosoftSQLServer.aspx</link>
      <pubDate>Wed, 02 Sep 2009 18:19:21 GMT</pubDate>
      <description>&lt;p&gt;
There are many emphases for the SQL DBA, one of the major items is security.&amp;nbsp;
Where I work security and patching have taken on new importance over the past 12 months.&amp;nbsp;
Patching which used to be a yearly event, is now monthly or even weekly.&amp;nbsp; Combine
that with SOX Controls and other internal controls, there is a focus on security.&amp;nbsp;
Part of that is seen in SQL Server from Microsoft, kudos!&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
The product gained a new level of security with SQL Server 2005.&amp;nbsp; Service Pack
2 gave us Login Triggers / Service Broker Events.&amp;nbsp; SQL 2008 saw the Builtin\Administrators
account gone (separation of duties) and even more controls.
&lt;/p&gt;
&lt;p&gt;
Than today it was distressing to see a news report about Microsoft ignoring a vulnerability
with SQL Server, basically dismissing it as anyone with administrator privileges already
has control [What happenned to separation of duties?].&amp;nbsp; The whole point of where
security with SQL Server was going was to ensure that administrators could be properly
segmented.&amp;nbsp; Where I work they'd like to get to the point where a SQL DBA can't
even view or query the data that they administer.
&lt;/p&gt;
&lt;p&gt;
If you find the below security vulnerability to be an issue than complain to Microsoft.&amp;nbsp;
Also if you didn't know about this vulnerability, than you need to ensure to plug-in
to some other industry news sources to get your information on vulnerability and patches,
as you can't always count on Microsoft to disclose issues.
&lt;/p&gt;
&lt;p&gt;
-----Original Message-----&lt;br&gt;
From: Security Wire Daily [mailto:SearchSecurity@lists.techtarget.com] 
&lt;br&gt;
Sent: Wednesday, September 02, 2009 10:38 AM&lt;br&gt;
Subject: New SQL Server password flaw surfaces
&lt;/p&gt;
&lt;p&gt;
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&lt;br&gt;
SearchSecurity.com: Security Wire Daily&lt;br&gt;
Breaking security news, the latest industry developments and trends&lt;br&gt;
September 02, 2009&lt;br&gt;
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
&lt;/p&gt;
&lt;p&gt;
UNPATCHED VULNERABILITY DISCOVERED IN MICROSOFT SQL SERVER&lt;br&gt;
Michael S. Mimoso, Editor, Information Security magazine
&lt;/p&gt;
&lt;p&gt;
Microsoft SQL Server administrators are being warned today about an&lt;br&gt;
unpatched vulnerability in the popular database software that exposes&lt;br&gt;
user passwords in the clear, as well as credentials delivered by&lt;br&gt;
applications trying to access the database server.
&lt;/p&gt;
&lt;p&gt;
Researchers at San Mateo, Calif.-based Sentrigo Inc., announced the&lt;br&gt;
flaw this morning, and also revealed that Microsoft has no immediate&lt;br&gt;
plans to release a patch for the vulnerability. Sentrigo, meanwhile,&lt;br&gt;
said it has developed a free utility that will erase these passwords&lt;br&gt;
from memory.&lt;br&gt;
Read more:&lt;br&gt;
&lt;a href="http://go.techtarget.com/r/9124859/8704472"&gt;http://go.techtarget.com/r/9124859/8704472&lt;/a&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=f12075c9-af2f-44d7-abf8-69d9e6c24ad3" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,f12075c9-af2f-44d7-abf8-69d9e6c24ad3.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=fef9c77b-382b-4fda-9445-702fd675133f</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,fef9c77b-382b-4fda-9445-702fd675133f.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,fef9c77b-382b-4fda-9445-702fd675133f.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=fef9c77b-382b-4fda-9445-702fd675133f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <br />
SQL Server SAN Migration
</p>
        <p>
I think this is my 3rd or 4th SAN Migration casued by:<br />
 - completely moving data centers 
<br />
 - changing the storage backends to different vendors<br />
 - consolidating SANS<br />
 - growing to a bigger san to consolidate more
</p>
        <p>
There are several different scenarios to consider<br />
 1.  Stand alone SQL Servers Instances on Internal Disk to SAN<br />
 2.  Stand alone SQL Servers on SAN Disk (changing sans).<br />
 3.  VM Ware SQL Servers (required to be on SAN)<br />
 4.  Microsoft Clustered SQL Servers<br />
 5.  Polyserve Clustered SQL Servers<br />
 6.  BCV's / SAN Mirroring / replication technologies<br />
---------------------------<br /><strong>The most important thing to remember is to backup.</strong>  The next
most important thing, no matter what the SAN Engineers, Windows Engineers or Vendors
tell you about SAN Migration, <strong>YOU AS THE DBA ARE RESPONSIBLE.</strong> 
Understand the migration plan for each scenario, regardless of what anyone says, the
DBA is always left holding the bag.  If you don't understand the migration plan
/ scenario, make them explain it, learn it, try and practice it.  I'll explain
with an example.  
</p>
        <p>
One of the important items in most scenarios is updating to latest drivers and versions
of software, even this step can be dangerous.  In a recent effort to patch servers
to the latest version of drivers the SAN disk just "disappeared", when it came back,
there was NO DATA.  No amount of research could yield what happenned to the data. 
Refer back to the most important thing!<br />
----------------------------
</p>
        <p>
All of the different scenarios are simple, with careful preperation and a good windows
and SAN team.  
</p>
        <p>
          <u>1.  Stand alone SQL Servers instance on Internal Disk to SAN.</u>
        </p>
        <p>
Usually the most difficult thing here is that you are taking an existing stable server
and adding a lot of new complexity to it.  Drivers and hardware for the SAN,
sometimes this does not always go well, if possible I try and get new hardware and
completely swap the machines, configuring the new machine in advance for the SAN and
installing sql; taking several dry runs to ensure it's stable.  The next issue
is the down time in copying the data from the internal disk to the san.  Than
switch the drive letters and start SQL.  Don't forget the most important thing.
</p>
        <p>
          <u>2.  Stand alone SQL Servers on SAN Disk (changing sans).</u>
        </p>
        <p>
Here is where having a good windows and san team can help you.  Most of the migrations
I've been involved with the Windows and SAN team will setup a mirror between the SANS. 
Than on migration day we stop SQL Server, the windows and san team ensure the mirror
is up to date, than split the mirror and hook the server up to the new storage and
ensure the drive letters and mount points come up.  SQL DBA restarts sql, boom,
your done.
</p>
        <p>
Sometimes if your switching san vendors, you can't setup a mirror.  Now things
get dicey.  Can you get "hooked" up to both sans simultaneously, of so than your
ok, stop sql, copy the data to the new san, reset drive letters and mount points,
restart SQL.  
</p>
        <p>
If you can not get "hooked" up to both sans simultaneously than you need to default
to some type of backup and restore mechanism, tapes or copying sql files to local
disk (if you have room).  I'm usually not a fan of this, as I find that different
vendors use different drivers, switching vendors means now you have both vendors drivers
on the machine, the machine decays and becomes unstable, NOT FUN.  Don't forget
the most important thing.
</p>
        <p>
          <u>3.  VM Ware SQL Servers (required to be on SAN).</u>
        </p>
        <p>
These have been my easiest san migrations.  That's because we have awesome dedicated
VM Ware administrators.  They do it all, just schedule the outage.  But
trust me, Don't forget the most important thing, check your backups went to tape,
double check your Disaster Recovery plan.
</p>
        <p>
          <u>4.  Microsoft Clustered SQL Servers</u>
        </p>
        <p>
I've only done Microsoft Cluster migrations with SAN Mirrors, and it has been uneventful. 
This is because the "mirrors" end result is the preservation of clustered resources
(quorum), drive letters etc.  But don't forget the most important thing. 
Again a great windows and san team makes this easier.  I'd fret to switch vendors
on the Clusters, but if I ever do I'll update this post.
</p>
        <p>
          <u>5.  Polyserve Clustered SQL Servers</u>
        </p>
        <p>
This is the SAN Migration worst case scenario, "The clustered file system". 
Below are the steps we followed for migrating sans with Polyserve.  Don't forget
the most important thing.
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
-Dump vsql and vsqlinstance information from cluster<br />
 -mx vsql dump &gt;&gt; vsql.txt<br />
 -mx vsqlinstance dump &gt;&gt; vsqlinstance.txt<br />
-Get a listing of all storage by copying the grid on storage summary to excel 
<br />
-stop and disable all SQL instances and VSQLs<br />
-copy the virtual root for each sql server instance to another server (outside the
cluster)<br />
-deport ALL dynamic volumes (paths are automatically unassigned)<br />
-stop cluster services on all cluster nodes<br />
-copy the entire c:\polyserve directory to another server (outside the cluster) for
each machine (CYA)<br />
-manage the storage to unpresent all LUNs from the old array<br />
-break the mirror relationships and then present all of the mirrored LUNs<br />
-create three new 1GB LUNs on the new array and present them for new mem parts<br />
-put partitions on the three new LUNs<br />
-go into the config utility on node 1 and delete old membership partitions and add
the three new membership partitions<br />
-start cluster services on this node<br />
-export the config to other nodes and start the service on the rest of the nodes<br />
-import all importable dynamic volumes<br />
-assign paths<br />
-enable instances and vsqls<br />
-done<br /><a href="http://www.lifeasbob.com/content/binary/Polyserve%20SAN%20Switch.doc">Polyserve
SAN Switch.doc (29.5 KB)</a></p>
          <p>
 
</p>
        </blockquote>
        <p>
          <u>6.  BCV's / SAN Mirroring / replication technologies</u>
        </p>
        <p>
Administring the advanced SAN technologies is different for each vendor and quite
proprietary.  You definetly want to test and work with each one individually
and ensure it all works.  The details of this are far outside the scope of a
simple blog post, but having great SAN engineers will make this easy, as they generally
setup the mirrors, clones and movement of them to different machines or remote locations.
</p>
        <p>
          <strong>Don't forget the most important thing.</strong>
        </p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=fef9c77b-382b-4fda-9445-702fd675133f" />
      </body>
      <title>SQL Server SAN Migration</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,fef9c77b-382b-4fda-9445-702fd675133f.aspx</guid>
      <link>http://www.lifeasbob.com/2009/08/25/SQLServerSANMigration.aspx</link>
      <pubDate>Tue, 25 Aug 2009 16:16:01 GMT</pubDate>
      <description>&lt;p&gt;
&lt;br&gt;
SQL Server SAN Migration
&lt;/p&gt;
&lt;p&gt;
I think this is my 3rd or 4th SAN Migration casued by:&lt;br&gt;
&amp;nbsp;- completely moving data centers 
&lt;br&gt;
&amp;nbsp;- changing the storage backends to different vendors&lt;br&gt;
&amp;nbsp;- consolidating SANS&lt;br&gt;
&amp;nbsp;- growing to a bigger san to consolidate more
&lt;/p&gt;
&lt;p&gt;
There are several different scenarios to consider&lt;br&gt;
&amp;nbsp;1.&amp;nbsp; Stand alone SQL Servers Instances on Internal Disk to SAN&lt;br&gt;
&amp;nbsp;2.&amp;nbsp; Stand alone SQL Servers on SAN Disk (changing sans).&lt;br&gt;
&amp;nbsp;3.&amp;nbsp; VM Ware SQL Servers (required to be on SAN)&lt;br&gt;
&amp;nbsp;4.&amp;nbsp; Microsoft Clustered SQL Servers&lt;br&gt;
&amp;nbsp;5.&amp;nbsp; Polyserve Clustered SQL Servers&lt;br&gt;
&amp;nbsp;6.&amp;nbsp; BCV's / SAN Mirroring / replication technologies&lt;br&gt;
---------------------------&lt;br&gt;
&lt;strong&gt;The most important thing to remember is to backup.&lt;/strong&gt;&amp;nbsp; The next
most important thing, no matter what the SAN Engineers, Windows Engineers or Vendors
tell you about SAN Migration, &lt;strong&gt;YOU AS THE DBA ARE RESPONSIBLE.&lt;/strong&gt;&amp;nbsp;
Understand the migration plan for each scenario, regardless of what anyone says, the
DBA is always left holding the bag.&amp;nbsp; If you don't understand the migration plan
/ scenario, make them explain it, learn it, try and practice it.&amp;nbsp; I'll explain
with an example.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
One of the important items in most scenarios is updating to latest drivers and versions
of software, even this step can be dangerous.&amp;nbsp; In a recent effort to patch servers
to the latest version of drivers the SAN disk just "disappeared", when it came back,
there was NO DATA.&amp;nbsp; No amount of research could yield what happenned to the data.&amp;nbsp;
Refer back to the most important thing!&lt;br&gt;
----------------------------
&lt;/p&gt;
&lt;p&gt;
All of the different scenarios are simple, with careful preperation and a good windows
and SAN team.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;1.&amp;nbsp; Stand alone SQL Servers instance on Internal Disk to SAN.&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
Usually the most difficult thing here is that you are taking an existing stable server
and adding a lot of new complexity to it.&amp;nbsp; Drivers and hardware for the SAN,
sometimes this does not always go well, if possible I try and get new hardware and
completely swap the machines, configuring the new machine in advance for the SAN and
installing sql; taking several dry runs to ensure it's stable.&amp;nbsp; The next issue
is the down time in copying the data from the internal disk to the san.&amp;nbsp; Than
switch the drive letters and start SQL.&amp;nbsp; Don't forget the most important thing.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;2.&amp;nbsp; Stand alone SQL Servers on SAN Disk (changing sans).&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
Here is where having a good windows and san team can help you.&amp;nbsp; Most of the migrations
I've been involved with the Windows and SAN team will setup a mirror between the SANS.&amp;nbsp;
Than on migration day we stop SQL Server, the windows and san team ensure the mirror
is up to date, than split the mirror and hook the server up to the new storage and
ensure the drive letters and mount points come up.&amp;nbsp; SQL DBA restarts sql, boom,
your done.
&lt;/p&gt;
&lt;p&gt;
Sometimes if your switching san vendors, you can't setup a mirror.&amp;nbsp; Now things
get dicey.&amp;nbsp; Can you get "hooked" up to both sans simultaneously, of so than your
ok, stop sql, copy the data to the new san, reset drive letters and mount points,
restart SQL.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
If you can not get "hooked" up to both sans simultaneously than you need to default
to some type of backup and restore mechanism, tapes or copying sql files to local
disk (if you have room).&amp;nbsp; I'm usually not a fan of this, as I find that different
vendors use different drivers, switching vendors means now you have both vendors drivers
on the machine, the machine decays and becomes unstable, NOT FUN.&amp;nbsp; Don't forget
the most important thing.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;3.&amp;nbsp; VM Ware SQL Servers (required to be on SAN).&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
These have been my easiest san migrations.&amp;nbsp; That's because we have awesome dedicated
VM Ware administrators.&amp;nbsp; They do it all, just schedule the outage.&amp;nbsp; But
trust me, Don't forget the most important thing, check your backups went to tape,
double check your Disaster Recovery plan.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;4.&amp;nbsp; Microsoft Clustered SQL Servers&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
I've only done Microsoft Cluster migrations with SAN Mirrors, and it has been uneventful.&amp;nbsp;
This is because the "mirrors" end result is the preservation of clustered resources
(quorum), drive letters etc.&amp;nbsp; But don't forget the most important thing.&amp;nbsp;
Again a great windows and san team makes this easier.&amp;nbsp; I'd fret to switch vendors
on the Clusters, but if I ever do I'll update this post.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;5.&amp;nbsp; Polyserve Clustered SQL Servers&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
This is the SAN Migration worst case scenario, "The clustered file system".&amp;nbsp;
Below are the steps we followed for migrating sans with Polyserve.&amp;nbsp; Don't forget
the most important thing.
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
-Dump vsql and vsqlinstance information from cluster&lt;br&gt;
&amp;nbsp;-mx vsql dump &amp;gt;&amp;gt; vsql.txt&lt;br&gt;
&amp;nbsp;-mx vsqlinstance dump &amp;gt;&amp;gt; vsqlinstance.txt&lt;br&gt;
-Get a listing of all storage by copying the grid on storage summary to excel 
&lt;br&gt;
-stop and disable all SQL instances and VSQLs&lt;br&gt;
-copy the virtual root for each sql server instance to another server (outside the
cluster)&lt;br&gt;
-deport ALL dynamic volumes (paths are automatically unassigned)&lt;br&gt;
-stop cluster services on all cluster nodes&lt;br&gt;
-copy the entire c:\polyserve directory to another server (outside the cluster) for
each machine (CYA)&lt;br&gt;
-manage the storage to unpresent all LUNs from the old array&lt;br&gt;
-break the mirror relationships and then present all of the mirrored LUNs&lt;br&gt;
-create three new 1GB LUNs on the new array and present them for new mem parts&lt;br&gt;
-put partitions on the three new LUNs&lt;br&gt;
-go into the config utility on node 1 and delete old membership partitions and add
the three new membership partitions&lt;br&gt;
-start cluster services on this node&lt;br&gt;
-export the config to other nodes and start the service on the rest of the nodes&lt;br&gt;
-import all importable dynamic volumes&lt;br&gt;
-assign paths&lt;br&gt;
-enable instances and vsqls&lt;br&gt;
-done&lt;br&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/Polyserve%20SAN%20Switch.doc"&gt;Polyserve
SAN Switch.doc (29.5 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;u&gt;6.&amp;nbsp; BCV's / SAN Mirroring / replication technologies&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
Administring the advanced SAN technologies is different for each vendor and quite
proprietary.&amp;nbsp; You definetly want to test and work with each one individually
and ensure it all works.&amp;nbsp; The details of this are far outside the scope of a
simple blog post, but having great SAN engineers will make this easy, as they generally
setup the mirrors, clones and movement of them to different machines or remote locations.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Don't forget the most important thing.&lt;/strong&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=fef9c77b-382b-4fda-9445-702fd675133f" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,fef9c77b-382b-4fda-9445-702fd675133f.aspx</comments>
      <category>General Technology</category>
      <category>Polyserve</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=bac1ce16-3ed0-48ce-9b67-89d330e7dfa0</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,bac1ce16-3ed0-48ce-9b67-89d330e7dfa0.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,bac1ce16-3ed0-48ce-9b67-89d330e7dfa0.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=bac1ce16-3ed0-48ce-9b67-89d330e7dfa0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ok, for whatever reason we compress the XML Blobs we store in the database. 
This created the problem for me to view the data, as the DBA is always asked to go
find this record in the XML.
</p>
        <p>
I ended up creating a little windows form application in VS2005, using C# that can
decompress the blobs so I can view the data.
</p>
        <p>
I also added a peice that shows how to compress the blobs and save them to a database. 
There was also a fun peice about displaying byte[] data in datagridview, it's in there!
</p>
        <p>
I've also created a sample database with one table and a few records that are compressed,
it's a sql server backup file, or you'd have to modify the code to create a table
with some compressed blobs to see it work.
</p>
        <p>
This was a just a fun thing to do, we get a lot of mileage out of compressing the
XML data.
</p>
        <p>
          <a href="http://www.lifeasbob.com/content/binary/BlobTest.bak">BlobTest.bak (2.58
MB)</a>
          <br />
          <a href="http://www.lifeasbob.com/content/binary/XMLBlobViewer.ZIP">XMLBlobViewer.ZIP
(64.2 KB)</a>
        </p>
        <p>
Screen shot:
</p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/xmlbobview.jpg" border="0" />
        </p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=bac1ce16-3ed0-48ce-9b67-89d330e7dfa0" />
      </body>
      <title>Compress Decompress Blobs</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,bac1ce16-3ed0-48ce-9b67-89d330e7dfa0.aspx</guid>
      <link>http://www.lifeasbob.com/2009/08/20/CompressDecompressBlobs.aspx</link>
      <pubDate>Thu, 20 Aug 2009 19:33:46 GMT</pubDate>
      <description>&lt;p&gt;
Ok, for whatever reason we compress the XML Blobs we store in the database.&amp;nbsp;
This created the problem for me to view the data, as the DBA is always asked to go
find this record in the XML.
&lt;/p&gt;
&lt;p&gt;
I ended up creating a little windows form application in VS2005, using C# that can
decompress the blobs so I can view the data.
&lt;/p&gt;
&lt;p&gt;
I also added a peice that shows how to compress the blobs and save them to a database.&amp;nbsp;
There was also a fun peice about displaying byte[] data in datagridview, it's in there!
&lt;/p&gt;
&lt;p&gt;
I've also created a sample database with one table and a few records that are compressed,
it's a sql server backup file, or you'd have to modify the code to create a table
with some compressed blobs to see it work.
&lt;/p&gt;
&lt;p&gt;
This was a just a fun thing to do, we get a lot of mileage out of compressing the
XML data.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/BlobTest.bak"&gt;BlobTest.bak (2.58
MB)&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/XMLBlobViewer.ZIP"&gt;XMLBlobViewer.ZIP
(64.2 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Screen shot:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/xmlbobview.jpg" border=0&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=bac1ce16-3ed0-48ce-9b67-89d330e7dfa0" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,bac1ce16-3ed0-48ce-9b67-89d330e7dfa0.aspx</comments>
      <category>General Technology</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=f75f0ce0-d75a-4bd1-802b-bf8eb71f0064</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,f75f0ce0-d75a-4bd1-802b-bf8eb71f0064.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,f75f0ce0-d75a-4bd1-802b-bf8eb71f0064.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f75f0ce0-d75a-4bd1-802b-bf8eb71f0064</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This post may raise more questions for you than it answers, but it really is something
that happenned in my shop and confused some people.  So I'm creating this post
as a place holder so I'll be able to reference this 10 months from now when the same
issue comes up and I've forgetten the solution.
</p>
        <p>
Basically for whatever reason we use Excel, darn !  No matter how I try and recreate
these Excel sheets in Reporting Services, some business users won't bite and they
still need excel files.  Generally these SSIS to Excel data pumps work fine....the
ones that generally trip the process up are ones with long text and multiple "named"
work sheets.  To solve the "named" work sheets problem we often use an Excel
template file that is copied to the destination and renamed, than the data pump occurs. 
As we migrate the SSIS packages from Development, QA to production, sometimes an "odd"
excel worksheet gets introduced, usually named "sheet1", lovely, below is the procedure
we used to correct this...
</p>
        <p>
Thanks to Tom Reeves from our team.
</p>
        <p>
          <strong>To Delete Unwanted sheets in Excel for use in SSIS</strong>
        </p>
        <p>
1) Map a local drive to the E: drive of the app server (ServerNameHere\E$)<br />
2) Open template file on server and delete unwanted tabs<br />
3) Open SSIS package 
<br />
a. You’ll need to make note of the tab name(s) that you are working with<br />
b. Copy query from the source object in the data flow<br />
4) Create a new DTS package – SQL2000<br />
a. 1 SQL Connection<br />
b. 1 Excel Connection<br />
c. 2 Execute SQL Tasks<br />
i. Both pointed to the Excel connection manager<br />
ii. One for Drop table and one for Create table<br />
5) Open the Transformation flow between the SQL connection and the Excel connection
- DTS<br />
6) Copy and paste the query from the SSIS package into the Source tab<br />
7) Click the Create button on the Destination tab and copy the code from the
window.  You can hit cancel on this screen now.<br />
8) Open one of the Execute SQL Tasks and set the connection manager to the Excel
connection and type your Drop sql statement.  
<br />
a. Example: drop table `SheetNameHere` - No dollar sign in the table name<br />
8) Open the other Execute SQL Task and set the connection manager to the Excel connection
and type your Create sql statement. 
<br />
Example: 
<br />
CREATE TABLE `SheetNameHere` (`Division_Code` Decimal (2,0) , 
<br />
`Division_Dept_Id` Decimal (7,0) , 
<br />
`Office_Dept_Id` Decimal (7,0) , 
<br />
`Last_Update_Date` DateTime , 
<br />
`Reason_Text_Opt_out` LongText , 
<br />
`Reason_Text_Opt_in` LongText , 
<br />
`WHQ_Comments` LongText , 
<br />
`WHQ_User` VarChar (30) , 
<br />
`WHQ_Last_Update_Date` DateTime , 
<br />
`military` Short , 
<br />
`office_type_code` VarChar (1) , 
<br />
`ABC` VarChar (10) , 
<br />
`Client_Segmentation` VarChar (50) , 
<br />
`number_of_windows` Long , 
<br />
`number_of_desks` Long , 
<br />
`Number_of_bilingual_tax_pros` VarChar (50) , 
<br />
`Year_round_indicator` VarChar (1) , 
<br />
`Latino_designation_year_prior` Long , 
<br />
`office_status` VarChar (1) , 
<br />
`Notary` Long , 
<br />
`ITIN` Long , 
<br />
`Spanish_Speaking_Preparer` Long  )<br /></p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=f75f0ce0-d75a-4bd1-802b-bf8eb71f0064" />
      </body>
      <title>How to delete unwanted Excel Work sheets in SSIS</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,f75f0ce0-d75a-4bd1-802b-bf8eb71f0064.aspx</guid>
      <link>http://www.lifeasbob.com/2009/08/04/HowToDeleteUnwantedExcelWorkSheetsInSSIS.aspx</link>
      <pubDate>Tue, 04 Aug 2009 18:13:00 GMT</pubDate>
      <description>&lt;p&gt;
This post may raise more questions for you than it answers, but it really is something
that happenned in my shop and confused some people.&amp;nbsp; So I'm creating this post
as a place holder so I'll be able to reference this 10 months from now when the same
issue comes up and I've forgetten the solution.
&lt;/p&gt;
&lt;p&gt;
Basically for whatever reason we use Excel, darn !&amp;nbsp; No matter how I try and recreate
these Excel sheets in Reporting Services, some business users won't bite and they
still need excel files.&amp;nbsp; Generally these SSIS to Excel data pumps work fine....the
ones that generally trip the process up are ones with long text and multiple "named"
work sheets.&amp;nbsp; To solve the "named" work sheets problem we often use an Excel
template file that is copied to the destination and renamed, than the data pump occurs.&amp;nbsp;
As we migrate the SSIS packages from Development, QA to production, sometimes an "odd"
excel worksheet gets introduced, usually named "sheet1", lovely, below is the procedure
we used to correct this...
&lt;/p&gt;
&lt;p&gt;
Thanks to Tom Reeves from our team.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;To Delete Unwanted sheets in Excel for use in SSIS&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
1)&amp;nbsp;Map a local drive to the E: drive of the app server (ServerNameHere\E$)&lt;br&gt;
2)&amp;nbsp;Open template file on server and delete unwanted tabs&lt;br&gt;
3)&amp;nbsp;Open SSIS package 
&lt;br&gt;
a.&amp;nbsp;You’ll need to make note of the tab name(s) that you are working with&lt;br&gt;
b.&amp;nbsp;Copy query from the source object in the data flow&lt;br&gt;
4)&amp;nbsp;Create a new DTS package – SQL2000&lt;br&gt;
a.&amp;nbsp;1 SQL Connection&lt;br&gt;
b.&amp;nbsp;1 Excel Connection&lt;br&gt;
c.&amp;nbsp;2 Execute SQL Tasks&lt;br&gt;
i.&amp;nbsp;Both pointed to the Excel connection manager&lt;br&gt;
ii.&amp;nbsp;One for Drop table and one for Create table&lt;br&gt;
5)&amp;nbsp;Open the Transformation flow between the SQL connection and the Excel connection
- DTS&lt;br&gt;
6)&amp;nbsp;Copy and paste the query from the SSIS package into the Source tab&lt;br&gt;
7)&amp;nbsp;Click the Create button on the Destination tab and copy the code from the
window.&amp;nbsp; You can hit cancel on this screen now.&lt;br&gt;
8)&amp;nbsp;Open one of the Execute SQL Tasks and set the connection manager to the Excel
connection and type your Drop sql statement.&amp;nbsp; 
&lt;br&gt;
a.&amp;nbsp;Example: drop table `SheetNameHere` - No dollar sign in the table name&lt;br&gt;
8) Open the other Execute SQL Task and set the connection manager to the Excel connection
and type your Create sql statement. 
&lt;br&gt;
Example: 
&lt;br&gt;
CREATE TABLE `SheetNameHere` (`Division_Code` Decimal (2,0) , 
&lt;br&gt;
`Division_Dept_Id` Decimal (7,0) , 
&lt;br&gt;
`Office_Dept_Id` Decimal (7,0) , 
&lt;br&gt;
`Last_Update_Date` DateTime , 
&lt;br&gt;
`Reason_Text_Opt_out` LongText , 
&lt;br&gt;
`Reason_Text_Opt_in` LongText , 
&lt;br&gt;
`WHQ_Comments` LongText , 
&lt;br&gt;
`WHQ_User` VarChar (30) , 
&lt;br&gt;
`WHQ_Last_Update_Date` DateTime , 
&lt;br&gt;
`military` Short , 
&lt;br&gt;
`office_type_code` VarChar (1) , 
&lt;br&gt;
`ABC` VarChar (10) , 
&lt;br&gt;
`Client_Segmentation` VarChar (50) , 
&lt;br&gt;
`number_of_windows` Long , 
&lt;br&gt;
`number_of_desks` Long , 
&lt;br&gt;
`Number_of_bilingual_tax_pros` VarChar (50) , 
&lt;br&gt;
`Year_round_indicator` VarChar (1) , 
&lt;br&gt;
`Latino_designation_year_prior` Long , 
&lt;br&gt;
`office_status` VarChar (1) , 
&lt;br&gt;
`Notary` Long , 
&lt;br&gt;
`ITIN` Long , 
&lt;br&gt;
`Spanish_Speaking_Preparer` Long&amp;nbsp; )&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=f75f0ce0-d75a-4bd1-802b-bf8eb71f0064" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,f75f0ce0-d75a-4bd1-802b-bf8eb71f0064.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / SSIS</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=bc59dc43-6a9f-4ef2-96d2-03d98d26f611</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,bc59dc43-6a9f-4ef2-96d2-03d98d26f611.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,bc59dc43-6a9f-4ef2-96d2-03d98d26f611.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=bc59dc43-6a9f-4ef2-96d2-03d98d26f611</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img src="http://www.lifeasbob.com/content/binary/patching.jpg" border="0" />
        </p>
        <p>
Patching SQL Server still has a long way to go !
</p>
        <p>
          <br />
Patching SQL Server still has many necessary improvements.  It's an endless cycle. 
Service Packs and Cumulative Updates.  The release process of the patches is
much better, but the technical windows installer portion of the process is painful. 
Ever look at a machine that has 4 SQL Server instances?  Take a close look at
your c:\windows\, C:\windows\installer, c:\Prog...\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix. 
Where I come from we call that a cluster f***!
</p>
        <p>
If you have 20-50 SQL Instances, it's a manageable process, when your dealing with
100's and 1000's it's a nightmare.
</p>
        <p>
Troubleshooting the process is a kin to the "needle in the haystack" analogy. 
Recently while applying SP3 to a SQL Server I received the following error:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
...<br />
Error Number             
: 11032<br />
Error Description         : Unable to install
Windows Installer MSP file<br />
------------------------------------------------------
</p>
        </blockquote>
        <p>
Fortunately I've seen so many errors applying SQL Server service packs and patches
(remember we patch 100's to 1000's so I'm not saying these errors are common place,
but even 5% can generate a huge volume of work).   Service pack Errors I've
Seen. 
<br />
 <a href="http://www.lifeasbob.com/2008/01/29/CumulativeHotfix53215InstallIssues.aspx">http://www.lifeasbob.com/2008/01/29/CumulativeHotfix53215InstallIssues.aspx</a></p>
        <p>
When searching for the 11032 error cause, the summary.log leads to another file, some
sqlrun_sql.msp.log.  Always search for “return value 3” in any MSI logs to quickly
find the error.  I found the following in the log file:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
MSI (s) (9C:78) [20:33:17:978]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI7F3.tmp,
Entrypoint: InstallFTERef<br />
FTECa.DLL: INFO: FTE: InstallFTERef(), Entering...<br />
FTECa.DLL: INFO: FTE: GetFTERefInstallParams: FTERef : ?*<br />
FTECa.DLL: ERROR: FTE: InstallFTERef: <strong><u>Fail to create FTERef file: D:\data\FTData\noiseCHS.txt</u></strong>,Err=3<br />
MSI (s) (9C:FC) [20:33:18:322]: User policy value 'DisableRollback' is 0<br />
MSI (s) (9C:FC) [20:33:18:322]: Machine policy value 'DisableRollback' is 0<br />
Action ended 20:33:18: InstallFinalize. Return value 3.
</p>
        </blockquote>
        <p>
Sure enough the path d:\data was wrong, it should be d:\mssql.1\data,  I copied
the FTData directory to a new one I created called d:\mssql.1\data and it completed
successfully.  It's not even worth the effort to think how this got screwed up,
the ftdata directory is picked up in the registry, so someone moved the directory
or hacked the registry.
</p>
        <p>
We did find one behavior change with SP3, DBCC CheckIdent.  DBCC CheckIdent used
to successfully take Null parameter, now it does not, easy enough to correct by testing
for Null and replacing with a zero.  We found this through a job that resets
the identity value of table, the job began failing when we applied sp3, sure enough
testing on sp2 shows it was successful.  Probably this is a good thing that sp3
tightened up the parameter validation on DBCC CheckIdent.  Example below:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
Declare @maxId Integer<br />
Select @maxId = Max([Identity_column]) + 1 From [Some Table]<br />
Print '--Resetting seed to' + Convert(varchar(10),@maxId)<br />
DBCC CheckIdent ('Some TABLE',reseed,@maxId)
</p>
        </blockquote>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=bc59dc43-6a9f-4ef2-96d2-03d98d26f611" />
      </body>
      <title>Patching SQL Server still has a long way to go !</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,bc59dc43-6a9f-4ef2-96d2-03d98d26f611.aspx</guid>
      <link>http://www.lifeasbob.com/2009/07/20/PatchingSQLServerStillHasALongWayToGo.aspx</link>
      <pubDate>Mon, 20 Jul 2009 17:08:34 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/patching.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Patching SQL Server still has a long way to go !
&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;
Patching SQL Server still has many necessary improvements.&amp;nbsp; It's an endless cycle.&amp;nbsp;
Service Packs and Cumulative Updates.&amp;nbsp; The release process of the patches is
much better, but the technical windows installer portion of the process is painful.&amp;nbsp;
Ever look at a machine that has 4 SQL Server instances?&amp;nbsp; Take a close look at
your c:\windows\, C:\windows\installer, c:\Prog...\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix.&amp;nbsp;
Where I come from we call that a cluster f***!
&lt;/p&gt;
&lt;p&gt;
If you have 20-50 SQL Instances, it's a manageable process, when your dealing with
100's and 1000's it's a nightmare.
&lt;/p&gt;
&lt;p&gt;
Troubleshooting the process is a kin to the "needle in the haystack" analogy.&amp;nbsp;
Recently while applying SP3 to a SQL Server I received the following error:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
...&lt;br&gt;
Error Number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
: 11032&lt;br&gt;
Error Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Unable to install
Windows Installer MSP file&lt;br&gt;
------------------------------------------------------
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Fortunately I've seen so many errors applying SQL Server service packs and patches
(remember we patch 100's to 1000's so I'm not saying these errors are common place,
but even 5% can generate a huge volume of work).&amp;nbsp;&amp;nbsp; Service pack Errors I've
Seen. 
&lt;br&gt;
&amp;nbsp;&lt;a href="http://www.lifeasbob.com/2008/01/29/CumulativeHotfix53215InstallIssues.aspx"&gt;http://www.lifeasbob.com/2008/01/29/CumulativeHotfix53215InstallIssues.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
When searching for the 11032 error cause, the summary.log leads to another file, some
sqlrun_sql.msp.log.&amp;nbsp; Always search for “return value 3” in any MSI logs to quickly
find the error.&amp;nbsp; I found the following in the log file:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
MSI (s) (9C:78) [20:33:17:978]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI7F3.tmp,
Entrypoint: InstallFTERef&lt;br&gt;
FTECa.DLL: INFO: FTE: InstallFTERef(), Entering...&lt;br&gt;
FTECa.DLL: INFO: FTE: GetFTERefInstallParams: FTERef : ?*&lt;br&gt;
FTECa.DLL: ERROR: FTE: InstallFTERef: &lt;strong&gt;&lt;u&gt;Fail to create FTERef file: D:\data\FTData\noiseCHS.txt&lt;/u&gt;&lt;/strong&gt;,Err=3&lt;br&gt;
MSI (s) (9C:FC) [20:33:18:322]: User policy value 'DisableRollback' is 0&lt;br&gt;
MSI (s) (9C:FC) [20:33:18:322]: Machine policy value 'DisableRollback' is 0&lt;br&gt;
Action ended 20:33:18: InstallFinalize. Return value 3.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Sure enough the path d:\data was wrong, it should be d:\mssql.1\data,&amp;nbsp; I copied
the FTData directory to a new one I created called d:\mssql.1\data and it completed
successfully.&amp;nbsp; It's not even worth the effort to think how this got screwed up,
the ftdata directory is picked up in the registry, so someone moved the directory
or hacked the registry.
&lt;/p&gt;
&lt;p&gt;
We did find one behavior change with SP3, DBCC CheckIdent.&amp;nbsp; DBCC CheckIdent used
to successfully take Null parameter, now it does not, easy enough to correct by testing
for Null and replacing with a zero.&amp;nbsp; We found this through a job that resets
the identity value of table, the job began failing when we applied sp3, sure enough
testing on sp2 shows it was successful.&amp;nbsp; Probably this is a good thing that sp3
tightened up the parameter validation on DBCC CheckIdent.&amp;nbsp; Example below:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
Declare @maxId Integer&lt;br&gt;
Select @maxId = Max([Identity_column]) + 1 From [Some Table]&lt;br&gt;
Print '--Resetting seed to' + Convert(varchar(10),@maxId)&lt;br&gt;
DBCC CheckIdent ('Some TABLE',reseed,@maxId)
&lt;/p&gt;
&lt;/blockquote&gt;&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=bc59dc43-6a9f-4ef2-96d2-03d98d26f611" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,bc59dc43-6a9f-4ef2-96d2-03d98d26f611.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=db381bf4-69a5-42b9-b1db-bf3e9593bd30</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,db381bf4-69a5-42b9-b1db-bf3e9593bd30.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,db381bf4-69a5-42b9-b1db-bf3e9593bd30.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=db381bf4-69a5-42b9-b1db-bf3e9593bd30</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Installing vendor databases on SQL Server is usually pretty straight forward. 
Not many DBA's like the process, but the proliferation of 3rd party products that
use SQL Server is continuing to grow.
</p>
        <p>
Recently this particular vendor, of course insisting their product was 64 bit and
SQL Server 2005 compatible, ran into problems for me.  It's only compatible after
you manually add registry entries that make the installshield program think there
is a 32 bit instance of MSDE !  Yah, that's compatible (oh by the way, those
registry entries also break the sql browser service so you whole instance becomes
unavailable unless it is accessed directly through a port number).  NICE !
</p>
        <p>
Getting through the above process was painful enough, than the installshield installer
errors out with a SQL Server error on creating a view, indicating that a dependent
object is missing.
</p>
        <p>
Technical support, while helpful is clueless.  "Never seen that before!" 
After 3 days of issues, i'm basically troubleshooting for them, taking traces from
our lab environment and comparing them.  Finally we stumble on to the fact that
installshield is creating a _setup directory where it is putting the SQL Server scripts. 
This folder (_setup), happens to be under the data directory where the MDF's
are being created (NICE).  This data directory happens to be a mount point!
</p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/GirlLightBulb.jpg" border="0" />
        </p>
        <p>
Ahhh, for whatever reason, Installshield runs the scripts differently from a mount
point vs. a drive letter.   We think it's either a bug in Installshield
or an issue with the permissions on the mount point.  We were not able to find
any differences in permissions, but sure enough when we changed the location of the
data files (which changes the location of the _setup directory), objects
in the database were created in the correct order.   3 days of my life gone.
</p>
        <p>
This vendor could have done many things differently.  Providing some type of
manual work around, scripts to create the database (this was not an option so I was
screwed), backups to manually restore, something, someway to escape the installshield
install (which was like version 5 !).
</p>
        <p>
And this was not a small dippy vendor, this is compliance software used by many
of the big banking and financial institutions.  No wonder so many found
them selves in danger of collapse !
</p>
        <p>
Watch those mount points. 
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=db381bf4-69a5-42b9-b1db-bf3e9593bd30" />
      </body>
      <title>Installshield, mount points and permissions</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,db381bf4-69a5-42b9-b1db-bf3e9593bd30.aspx</guid>
      <link>http://www.lifeasbob.com/2009/07/17/InstallshieldMountPointsAndPermissions.aspx</link>
      <pubDate>Fri, 17 Jul 2009 14:57:04 GMT</pubDate>
      <description>&lt;p&gt;
Installing vendor databases on SQL Server is usually pretty straight forward.&amp;nbsp;
Not many DBA's like the process, but the proliferation of 3rd party products that
use SQL Server is continuing to grow.
&lt;/p&gt;
&lt;p&gt;
Recently this particular vendor, of course insisting their product was 64 bit&amp;nbsp;and
SQL Server 2005 compatible, ran into problems for me.&amp;nbsp; It's only compatible after
you manually add registry entries that make the installshield program think there
is a 32 bit instance of MSDE !&amp;nbsp; Yah, that's compatible (oh by the way, those
registry entries also break the sql browser service so you whole instance becomes
unavailable unless it is accessed directly through a port number).&amp;nbsp; NICE !
&lt;/p&gt;
&lt;p&gt;
Getting through the above process was painful enough, than the installshield installer
errors out with a SQL Server error on&amp;nbsp;creating a view, indicating that a dependent
object is missing.
&lt;/p&gt;
&lt;p&gt;
Technical support, while helpful is clueless.&amp;nbsp; "Never seen that before!"&amp;nbsp;
After 3 days of issues, i'm basically troubleshooting for them, taking traces from
our lab environment and comparing them.&amp;nbsp; Finally we stumble on to the fact that
installshield is creating a _setup directory where it is putting the SQL Server scripts.&amp;nbsp;
This folder&amp;nbsp;(_setup), happens to be under the data directory where the MDF's
are being created (NICE).&amp;nbsp; This data directory happens to be a mount point!
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/GirlLightBulb.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Ahhh, for whatever reason, Installshield runs the scripts differently from a mount
point vs. a&amp;nbsp;drive letter.&amp;nbsp;&amp;nbsp;&amp;nbsp;We think it's&amp;nbsp;either a bug in&amp;nbsp;Installshield
or an issue with the permissions on the mount point.&amp;nbsp; We were not able to find
any differences in permissions, but sure enough when we changed the location of the
data files (which&amp;nbsp;changes the location of the _setup directory),&amp;nbsp;objects
in the database were created in the correct order.&amp;nbsp;&amp;nbsp; 3 days of my life gone.
&lt;/p&gt;
&lt;p&gt;
This vendor could have done many things differently.&amp;nbsp; Providing some type of
manual work around, scripts to create the database (this was not an option so I was
screwed), backups to manually restore, something, someway to escape the installshield
install (which was like version 5 !).
&lt;/p&gt;
&lt;p&gt;
And this was not&amp;nbsp;a small dippy vendor, this is compliance software used by many
of the big banking and financial institutions.&amp;nbsp; No wonder&amp;nbsp;so many found
them selves in danger of collapse !
&lt;/p&gt;
&lt;p&gt;
Watch those mount points.&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=db381bf4-69a5-42b9-b1db-bf3e9593bd30" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,db381bf4-69a5-42b9-b1db-bf3e9593bd30.aspx</comments>
      <category>Polyserve</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=c4b34c01-7f22-4bd4-9dd3-81e3f20b11dc</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,c4b34c01-7f22-4bd4-9dd3-81e3f20b11dc.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,c4b34c01-7f22-4bd4-9dd3-81e3f20b11dc.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=c4b34c01-7f22-4bd4-9dd3-81e3f20b11dc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The new loop.  I used to always default to using a vbs script to loop through
and delete files, now I use forfiles, a one liner, and much easier to look at, just
like the pic below!  Who knew looping could be so much fun.
</p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/girlsnextdoorshulahoops.jpg" border="0" />
        </p>
        <p>
Deleteing backups, log management...tiresome tasks.  Recently learned a new trick
from SQL Puma for deleting files using a utility from the windows resource kit. 
A program called forfiles.exe.  Much easier to use than deleting with a VBS Script
(see my posts on <a href="http://www.lifeasbob.com/2009/04/03/ArchiveLogs.aspx">Archive
Logs</a> and <a href="http://www.lifeasbob.com/2008/02/26/SQLServerLogManagement.aspx">SQL
Logs</a>).  Powershell will eventually make even forfiles obsolete, but it is
not on each of our servers and the windows support team is reluctant to put it there
:( ForFiles is on every one of our windows 2003 servers so it's good to go.
</p>
        <p>
To delete all backups older than 6 days:
</p>
        <font color="#0000ff" size="2">
          <p>
forfiles /p "i:\backups\full" /m "*.bak" /c "cmd /c del /Q @path" /d -6
</p>
        </font>
        <p>
Delete all files in the standard TEMP folders and all their subfolders after 9 days:
</p>
        <p>
          <font color="#0000ff">forfiles -p"%SYSTEMROOT%\TEMP" -s -c"cmd /c if @isdir==FALSE
echo del @file &amp; sleep 8 &amp; del @file" -d-9<br />
forfiles /p "%TEMP%" /s /c "cmd /c if @isdir==FALSE echo del @file &amp; sleep 8 &amp;
del @file" /d -9 </font>
        </p>
        <p>
Delete all *.TMP files in the system root (like C:\WINDOWS) that are older than 9
days:
</p>
        <p>
          <font color="#0000ff">forfiles /p "%SYSTEMROOT%" /m *.TMP /c "cmd /c if @isdir==FALSE
echo del @file &amp; sleep 8 &amp; del @file" /d -9</font>
        </p>
        <p>
Delete old IIS log files:
</p>
        <p>
          <font color="#0000ff">forfiles /p "%SYSTEMROOT%\system32\Logfiles\HttpErr" /c "cmd
/c if @isdir==FALSE echo del @file &amp; sleep 8 &amp; del @file" /d -99<br />
forfiles /p "%SYSTEMROOT%\system32\Logfiles\W3Svc1" /c "cmd /c if @isdir==FALSE echo
del @file &amp; sleep 8 &amp; del @file" /d -99<br />
forfiles /p "%SYSTEMROOT%\system32\Logfiles\SmtpSvc1" /c "cmd /c if @isdir==FALSE
echo del @file &amp; sleep 8 &amp; del @file" /d -99</font>
        </p>
        <p>
Dealing with spaces in filenames:
</p>
        <p>
          <font color="#0000ff">Forfiles -p R:\MyFiles -s -m *.* -d -365 -c "Cmd /C Echo </font>
          <a href="mailto:0x22@Path\@File0x22">
            <font color="#0000ff">0x22@Path\@File0x22</font>
          </a>
          <font color="#0000ff">"</font>
        </p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=c4b34c01-7f22-4bd4-9dd3-81e3f20b11dc" />
      </body>
      <title>ForFiles</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,c4b34c01-7f22-4bd4-9dd3-81e3f20b11dc.aspx</guid>
      <link>http://www.lifeasbob.com/2009/06/26/ForFiles.aspx</link>
      <pubDate>Fri, 26 Jun 2009 14:51:10 GMT</pubDate>
      <description>&lt;p&gt;
The new loop.&amp;nbsp; I used to always default to using a vbs script to loop through
and delete files, now I use forfiles, a one liner, and much easier to look at, just
like the pic below!&amp;nbsp; Who knew looping could be so much fun.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/girlsnextdoorshulahoops.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Deleteing backups, log management...tiresome tasks.&amp;nbsp; Recently learned a new trick
from SQL Puma for deleting files using a utility from the windows resource kit.&amp;nbsp;
A program called forfiles.exe.&amp;nbsp; Much easier to use than deleting with a VBS Script
(see my posts on &lt;a href="http://www.lifeasbob.com/2009/04/03/ArchiveLogs.aspx"&gt;Archive
Logs&lt;/a&gt; and &lt;a href="http://www.lifeasbob.com/2008/02/26/SQLServerLogManagement.aspx"&gt;SQL
Logs&lt;/a&gt;).&amp;nbsp; Powershell will eventually make even forfiles obsolete, but it is
not on each of our servers and the windows support team is reluctant to put it there
:( ForFiles is on every one of our windows 2003 servers so it's good to go.
&lt;/p&gt;
&lt;p&gt;
To delete all backups older than&amp;nbsp;6 days:
&lt;/p&gt;
&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;
forfiles /p "i:\backups\full" /m "*.bak" /c "cmd /c del /Q @path" /d -6
&lt;/p&gt;
&lt;/font&gt; 
&lt;p&gt;
Delete all files in the standard TEMP folders and all their subfolders after 9 days:
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#0000ff&gt;forfiles -p"%SYSTEMROOT%\TEMP" -s -c"cmd /c if @isdir==FALSE echo
del @file &amp;amp; sleep 8 &amp;amp; del @file" -d-9&lt;br&gt;
forfiles /p "%TEMP%" /s /c "cmd /c if @isdir==FALSE echo del @file &amp;amp; sleep 8 &amp;amp;
del @file" /d -9 &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Delete all *.TMP files in the system root (like C:\WINDOWS) that are older than 9
days:
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#0000ff&gt;forfiles /p "%SYSTEMROOT%" /m *.TMP /c "cmd /c if @isdir==FALSE
echo del @file &amp;amp; sleep 8 &amp;amp; del @file" /d -9&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
Delete old IIS log files:
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#0000ff&gt;forfiles /p "%SYSTEMROOT%\system32\Logfiles\HttpErr" /c "cmd /c
if @isdir==FALSE echo del @file &amp;amp; sleep 8 &amp;amp; del @file" /d -99&lt;br&gt;
forfiles /p "%SYSTEMROOT%\system32\Logfiles\W3Svc1" /c "cmd /c if @isdir==FALSE echo
del @file &amp;amp; sleep 8 &amp;amp; del @file" /d -99&lt;br&gt;
forfiles /p "%SYSTEMROOT%\system32\Logfiles\SmtpSvc1" /c "cmd /c if @isdir==FALSE
echo del @file &amp;amp; sleep 8 &amp;amp; del @file" /d -99&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
Dealing with spaces in filenames:
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#0000ff&gt;Forfiles -p R:\MyFiles -s -m *.* -d -365 -c "Cmd /C Echo &lt;/font&gt;&lt;a href="mailto:0x22@Path\@File0x22"&gt;&lt;font color=#0000ff&gt;0x22@Path\@File0x22&lt;/font&gt;&lt;/a&gt;&lt;font color=#0000ff&gt;"&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=c4b34c01-7f22-4bd4-9dd3-81e3f20b11dc" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,c4b34c01-7f22-4bd4-9dd3-81e3f20b11dc.aspx</comments>
      <category>General Technology</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=40a43d05-603c-40e4-9a31-6f3c369c2e1f</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,40a43d05-603c-40e4-9a31-6f3c369c2e1f.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,40a43d05-603c-40e4-9a31-6f3c369c2e1f.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=40a43d05-603c-40e4-9a31-6f3c369c2e1f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This script copies jobs from one msdb database to another, useful for when SQL Server
is re-installed, and the DBA Forgot to script out the sql agent jobs; but you still
have the old msdb mdf and ldf.  
</p>
        <p>
Simply attach the database as msdb_old.
</p>
        <p>
It is also possible to use this via a linked server and copy some sqlagent jobs from
one server to another; this script is specific to sql server 2005.  
</p>
        <p>
One item I had to adjust is that some of the jobs appeared "greyed" out afterwards
and I had to open each job and adjust the target server to "local".  
</p>
        <p>
But it was still quicker than re-creating all the jobs.  (I was unable to restore
the previous version of the msdb database because it was at a lower service pack level
than what the new server was built at - had I been smart as the new server was built
there would have been a restore of the msdb database completed when the new server
was at the same level, but I missed that step and was then left with the task of recreating
all the jobs, argh).
</p>
        <p>
I'd be cautious using this script if there were a lot of reporting subscription jobs
(as there would have to be some synchronizations with the report database and website),
but in this particular case all the jobs were custom backups, tlogs, exports, imports
and other purely tsql and ssis related tasks.
</p>
        <p>
          <a href="http://www.lifeasbob.com/Code/ScriptVault.aspx?script_id=80">http://www.lifeasbob.com/Code/ScriptVault.aspx?script_id=80</a> 
</p>
        <p>
 
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=40a43d05-603c-40e4-9a31-6f3c369c2e1f" />
      </body>
      <title>Copy Jobs from one Server to Another</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,40a43d05-603c-40e4-9a31-6f3c369c2e1f.aspx</guid>
      <link>http://www.lifeasbob.com/2009/06/24/CopyJobsFromOneServerToAnother.aspx</link>
      <pubDate>Wed, 24 Jun 2009 15:43:24 GMT</pubDate>
      <description>&lt;p&gt;
This script copies jobs from one msdb database to another, useful for when SQL Server
is re-installed, and the DBA Forgot to script out the sql agent jobs; but you still
have the old msdb mdf and ldf.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Simply attach the database as msdb_old.
&lt;/p&gt;
&lt;p&gt;
It is also possible to use this via a linked server and copy some sqlagent jobs from
one server to another; this script is specific to sql server 2005.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
One item I had to adjust is that some of the jobs appeared "greyed" out afterwards
and I had to open each job and adjust the target server to "local".&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
But it was still quicker than re-creating all the jobs.&amp;nbsp; (I was unable to restore
the previous version of the msdb database because it was at a lower service pack level
than what the new server was built at - had I been smart as the new server was built
there would have been a restore of the msdb database completed when the new server
was at the same level, but I missed that step and was then left with the task of recreating
all the jobs, argh).
&lt;/p&gt;
&lt;p&gt;
I'd be cautious using this script if there were a lot of reporting subscription jobs
(as there would have to be some synchronizations with the report database and website),
but in this particular case all the jobs were custom backups, tlogs, exports, imports
and other purely tsql and ssis related tasks.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.lifeasbob.com/Code/ScriptVault.aspx?script_id=80"&gt;http://www.lifeasbob.com/Code/ScriptVault.aspx?script_id=80&lt;/a&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=40a43d05-603c-40e4-9a31-6f3c369c2e1f" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,40a43d05-603c-40e4-9a31-6f3c369c2e1f.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / SQL Agent</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=09081e3c-12a4-444b-85dc-d90ab7cca192</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,09081e3c-12a4-444b-85dc-d90ab7cca192.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,09081e3c-12a4-444b-85dc-d90ab7cca192.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=09081e3c-12a4-444b-85dc-d90ab7cca192</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Affinity mask keeping SQL Server Agent from starting.
</p>
        <img src="http://www.lifeasbob.com/content/binary/one_more_beer2.jpg" border="0" />
        <p>
Recently had a unique issue in one of our HP Polyserve clustered environments. 
One of the unique aspects of HP Polyserve is that you can cluster different types
of hardware.  This can reduce costs and risks (as a bug in firmware or hardware
on one machine is also most likely going to exist in the other node, especially if
they are the same make, model, and usually purchased together).
</p>
        <br />
        <p>
We had an affinity mask set on a 16 processor machine, the instance was intentionally
re-hosted to another server in the cluster, which was an 8 way machine.  The
instance did start, but SQL Agent would not.
</p>
        <br />
        <p>
The following error messages were found in the sql errorlog:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font color="#ff0000">initconfig: Warning: affinity mask specified is not valid. Defaulting
to no affinity. Use sp_configure 'affinity mask' or 'affinity64 mask' to configure
the system to be compatible with the CPU mask on the system. You can also configure
the system based on the number of licensed CPUs.</font>
          </p>
          <br />
          <p>
            <font color="#ff0000">SQL Server blocked access to procedure 'dbo.sp_sqlagent_has_server_access'
of component 'Agent XPs' because this component is turned off as part of the security
configuration for this server. A system administrator can enable the use of 'Agent
XPs' by using sp_configure. For more information about enabling 'Agent XPs', see "Surface
Area Configuration" in SQL Server Books Online.</font>
          </p>
        </blockquote>
        <p>
A quick bit of research showed a similiar issue in a Microsoft Cluster, where the
one node did not have the correct permissions for the "lock pages in memory" setting,
causing the same result of SQL Agent not starting, you can see a great write up of
this in <a href="http://blogs.msdn.com/suhde/archive/2009/03/14/sql-server-agent-is-unable-to-failover-on-a-cluster.aspx">Suhas'
blog</a>.
</p>
        <br />
        <p>
Seems if the "start up" process for a SQL Server instance is interupted that the settings
changed from the defaults in sp_configure are not set and the process does not continue. 
From what I can determine this "start up" process is the settings contained in sp_configure,
if any of these fail along the way the process just stops or rolls them back and the
other settings like "Agent XPs" (required to start sql agent), will not occur.
</p>
        <br />
        <p>
I think this is a behavior that should not exist in SQL Server, why does an incorrect
affinity mask keep SQL Server from finishing running the other settings set by sp_configure
?  These options should be mutually exclusive and one failure should not preclude
others from running.
</p>
        <p>
I've had similar issues with how SQL Server starts up affecting SQL Agent, and it
does not appear to be a priority to fix, see my post on <a href="http://www.lifeasbob.com/2008/02/06/SQLAgentWillNotStartWhenAUserDatabaseIsInRecovery.aspx">SQL
Agent will not start when a user database is in recovery</a>. 
</p>
        <br />
        <p>
This was easy to fix, but required setting a correct affinity mask and stopping and
starting the service.  Generally we don't use an affinity mask on many instances. 
HP Polyserve provides pre and post start up scripts which we'll use to address the
issue in the future, though in extreme cases of failure no pre shutdown script will
be effective.  Plan your failover capacity carefully.<br /></p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=09081e3c-12a4-444b-85dc-d90ab7cca192" />
      </body>
      <title>Some Days you need one of these...</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,09081e3c-12a4-444b-85dc-d90ab7cca192.aspx</guid>
      <link>http://www.lifeasbob.com/2009/05/20/SomeDaysYouNeedOneOfThese.aspx</link>
      <pubDate>Wed, 20 May 2009 20:26:52 GMT</pubDate>
      <description>&lt;p&gt;
Affinity mask keeping SQL Server Agent from starting.
&lt;/p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/one_more_beer2.jpg" border=0&gt; 
&lt;p&gt;
Recently had a unique issue in one of our HP Polyserve clustered environments.&amp;nbsp;
One of the unique aspects of HP Polyserve is that you can cluster different types
of hardware.&amp;nbsp; This can reduce costs and risks (as a bug in firmware or hardware
on one machine is also most likely going to exist in the other node, especially if
they are the same make, model, and usually purchased together).
&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;
We had an affinity mask set on a 16 processor machine, the instance was intentionally
re-hosted to another server in the cluster, which was an 8 way machine.&amp;nbsp; The
instance did start, but SQL Agent would not.
&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;
The following error messages were found in the sql errorlog:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font color=#ff0000&gt;initconfig: Warning: affinity mask specified is not valid. Defaulting
to no affinity. Use sp_configure 'affinity mask' or 'affinity64 mask' to configure
the system to be compatible with the CPU mask on the system. You can also configure
the system based on the number of licensed CPUs.&lt;/font&gt;
&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;
&lt;font color=#ff0000&gt;SQL Server blocked access to procedure 'dbo.sp_sqlagent_has_server_access'
of component 'Agent XPs' because this component is turned off as part of the security
configuration for this server. A system administrator can enable the use of 'Agent
XPs' by using sp_configure. For more information about enabling 'Agent XPs', see "Surface
Area Configuration" in SQL Server Books Online.&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
A quick bit of research showed a similiar issue in a Microsoft Cluster, where the
one node did not have the correct permissions for the "lock pages in memory" setting,
causing the same result of SQL Agent not starting, you can see a great write up of
this in &lt;a href="http://blogs.msdn.com/suhde/archive/2009/03/14/sql-server-agent-is-unable-to-failover-on-a-cluster.aspx"&gt;Suhas'
blog&lt;/a&gt;.
&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;
Seems if the "start up" process for a SQL Server instance is interupted that the settings
changed from the defaults in sp_configure are not set and the process does not continue.&amp;nbsp;
From what I can determine this "start up" process is the settings contained in sp_configure,
if any of these fail along the way the process just stops or rolls them back and the
other settings like "Agent XPs" (required to start sql agent), will not occur.
&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;
I think this is a behavior that should not exist in SQL Server, why does an incorrect
affinity mask keep SQL Server from finishing running the other settings set by sp_configure
?&amp;nbsp; These options should be mutually exclusive and one failure should not preclude
others from running.
&lt;/p&gt;
&lt;p&gt;
I've had similar issues with how SQL Server starts up affecting SQL Agent, and it
does not appear to be a priority to fix, see my post on &lt;a href="http://www.lifeasbob.com/2008/02/06/SQLAgentWillNotStartWhenAUserDatabaseIsInRecovery.aspx"&gt;SQL
Agent will not start when a user database is in recovery&lt;/a&gt;.&amp;nbsp;
&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;
This was easy to fix, but required setting a correct affinity mask and stopping and
starting the service.&amp;nbsp; Generally we don't use an affinity mask on many instances.&amp;nbsp;
HP Polyserve provides pre and post start up scripts which we'll use to address the
issue in the future, though in extreme cases of failure no pre shutdown script will
be effective.&amp;nbsp; Plan your failover capacity carefully.&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=09081e3c-12a4-444b-85dc-d90ab7cca192" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,09081e3c-12a4-444b-85dc-d90ab7cca192.aspx</comments>
      <category>Polyserve</category>
      <category>SQL Server</category>
      <category>SQL Server / SQL Agent</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=27088201-ae49-4ae7-9a2b-92353d2b5da4</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,27088201-ae49-4ae7-9a2b-92353d2b5da4.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,27088201-ae49-4ae7-9a2b-92353d2b5da4.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=27088201-ae49-4ae7-9a2b-92353d2b5da4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently I had a nice experience of working an outage of a SQL Server caused by a
SAN Issue.  Here is where clustering breaks down.  Fortunately I work in
a big shop which uses Microsoft, Veritas, Polyserve and VM Ware clustering technologies;
but all of them have a single point of failure, the SAN.
</p>
        <p>
The official response to the problem was:
</p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <b>
            <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">We
are experiencing intermittent {vendor here} issues causing some SAN storage to become
read only. Server team is closely monitoring for this condition and putting the setting
back to read/write. A fix is available and being planned for Saturday night, unless
the issue becomes more prevalent that it is now. </span>
          </b>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <b>
            <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">
            </span>
          </b> 
</p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">Lovely. 
What is missing from the statement above is depending on which clustering technology
you are using, it may require a reboot to bring the storage back for windows (sometimes
all nodes !).  Veritas, Polyserve and VMWare seem to handle san / fiber hickups
the best.</span>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">
          </span> 
</p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">It
may be time to research a stretch cluster with different sans and some type of replication
or mirroring.  The uptime of 9's (pick your number) is a difficult task to reach
and in my opinion not truly possible with one SAN.  I've seen too many SAN Failures. 
SANS are supposed to be built in redundant everything, but somehow almost all my outages
on High Availability SQL Implementations are the SAN. </span>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">
          </span> 
</p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">Of
course it has to be something, i'm not inferring that a SAN is no good or poorly designed,
just that as every point of failure is addressed, another one appears.  </span>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">
          </span> 
</p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">How
the vendor could know about this issue and not let us know, is confusing in itself. 
The vendor is responsible for maintenance and patching of the SAN, seems they wanted
to keep this bug "close to the vest" and maybe just "roll" it in with some other firmware
patching.....i'm not impressed.</span>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">
          </span> 
</p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">Keep
your vendors accountable and ask them how often they patch the san, and what patches
are missing from your environment.  Work with the vendor so they know that you
are willing to accept patches and get them applied, don't wait for the bug to affect
you before applying it.</span>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">
          </span> 
</p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">This
may apply to SQL Server as well, how often do we patch to a specific level and try
and stay steady there, not wanting to apply all the cumulative updates, unless it
affects something.  It may be an affect you don't like.</span>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">
          </span> 
</p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">Be
more pro-active.</span>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
          <span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">
          </span> 
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=27088201-ae49-4ae7-9a2b-92353d2b5da4" />
      </body>
      <title>SAN Patching, you'd better !</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,27088201-ae49-4ae7-9a2b-92353d2b5da4.aspx</guid>
      <link>http://www.lifeasbob.com/2009/05/15/SANPatchingYoudBetter.aspx</link>
      <pubDate>Fri, 15 May 2009 18:14:28 GMT</pubDate>
      <description>&lt;p&gt;
Recently I had a nice experience of working an outage of a SQL Server caused by a
SAN Issue.&amp;nbsp; Here is where clustering breaks down.&amp;nbsp; Fortunately I work in
a big shop which uses Microsoft, Veritas, Polyserve and VM Ware clustering technologies;
but all of them have a single point of failure, the SAN.
&lt;/p&gt;
&lt;p&gt;
The official response to the problem was:
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;b&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;We
are experiencing intermittent {vendor here} issues causing some SAN storage to become
read only. Server team is closely monitoring for this condition and putting the setting
back to read/write. A fix is available and being planned for Saturday night, unless
the issue becomes more prevalent that it is now. &lt;/span&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;b&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/span&gt;&lt;/b&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;Lovely.&amp;nbsp;
What is missing from the statement above&amp;nbsp;is depending on which clustering technology
you are using, it may require a reboot to bring the storage back for windows (sometimes
all nodes !).&amp;nbsp; Veritas, Polyserve and VMWare seem to handle san / fiber hickups
the best.&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;It
may be time to research a stretch cluster with different sans and some type of replication
or mirroring.&amp;nbsp; The uptime of 9's (pick your number) is a difficult task to reach
and in my opinion not truly possible with one SAN.&amp;nbsp; I've seen too many SAN Failures.&amp;nbsp;
SANS are supposed to be built in redundant everything, but somehow almost all my outages
on High Availability SQL Implementations are the SAN. &lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;Of
course it has to be something, i'm not inferring that a SAN is no good or poorly designed,
just that as every point of failure is addressed, another one appears.&amp;nbsp; &lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;How
the vendor could know about this issue and not let us know, is confusing in itself.&amp;nbsp;
The vendor is responsible for maintenance and patching of the SAN, seems they wanted
to keep this bug "close to the vest" and maybe just "roll" it in with some other firmware
patching.....i'm not impressed.&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;Keep
your vendors accountable and ask them how often they patch the san, and what patches
are missing from your environment.&amp;nbsp; Work with the vendor so they know that you
are willing to accept patches and get them applied, don't wait for the bug to affect
you before applying it.&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;This
may apply to SQL Server as well, how often do we patch to a specific level and try
and stay steady there, not wanting to apply all the cumulative updates, unless it
affects something.&amp;nbsp; It may be an affect you don't like.&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;Be
more pro-active.&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=27088201-ae49-4ae7-9a2b-92353d2b5da4" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,27088201-ae49-4ae7-9a2b-92353d2b5da4.aspx</comments>
      <category>General Technology</category>
      <category>Polyserve</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=063a5688-d005-4001-aa1b-449e7b3c5ffc</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,063a5688-d005-4001-aa1b-449e7b3c5ffc.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,063a5688-d005-4001-aa1b-449e7b3c5ffc.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=063a5688-d005-4001-aa1b-449e7b3c5ffc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img src="http://www.lifeasbob.com/content/binary/officewomantrash.jpg" border="0" />
        </p>
        <p>
Windows has historically had a reliability issue in the enterprise (remember daily
reboots?), SQL Server received this tag right along with it.  Over many years
starting with the release of SQL Server 2000 Microsoft has been working to correct
this issue, now we need to start working on our vendors.
</p>
        <img src="http://www.lifeasbob.com/content/binary/baghdadbobms.jpg" border="0" />
        <br />
        <p>
Yesterday 5 Windows servers, crash in one day, of course all of them running SQL Servers. 
I've got 146 SQL Servers and go months with no issues, than BAM!  These were
all different "flavors" of SQL (2K, 2K5 and different service packs).  Most likely
not a SQL issue or even a windows issue, but regardless the product takes a hit and
so do I.
</p>
        <p>
The machines were so "unresponsive" that the only way to correct was to kill the power
to the machines.  Of course no logs and no indication of what the problem was. 
I highly suspect one of the many 3rd party crap that we run on these windoze machines: 
backup, anti-virus, san drivers, monitoring programs etc; though we'll never
know for sure what was to blame.
</p>
        <p>
Even our Microsoft Clustering did not save me! 
<br /><img src="http://www.lifeasbob.com/content/binary/raidersofthelostark.jpg" border="0" /><br />
No fail-over, no nothing, had to reboot both nodes of the cluster; plenty of room
still for the 3rd party clustering utilities as they also have failures as well, but
I seem to have higher up time with them...try Never Fail, Golden Gate, HP Polyserve
or Veritas.
</p>
        <p>
We still have a long way to go to increase stability, we've got to continue now to
harp on our 3rd party vendors that provide the services not built into windoze, just
wish we knew which one to call for this outage.
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=063a5688-d005-4001-aa1b-449e7b3c5ffc" />
      </body>
      <title>5 in 1 day!</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,063a5688-d005-4001-aa1b-449e7b3c5ffc.aspx</guid>
      <link>http://www.lifeasbob.com/2009/04/23/5In1Day.aspx</link>
      <pubDate>Thu, 23 Apr 2009 15:53:29 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/officewomantrash.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Windows has historically had a reliability issue in the enterprise (remember daily
reboots?), SQL Server received this tag right along with it.&amp;nbsp; Over many years
starting with the&amp;nbsp;release of SQL Server 2000 Microsoft has been working to correct
this issue, now we need to start working on our vendors.
&lt;/p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/baghdadbobms.jpg" border=0&gt;
&lt;br&gt;
&lt;p&gt;
Yesterday 5 Windows servers, crash in one day, of course all of them running SQL Servers.&amp;nbsp;
I've got 146 SQL Servers and go months with no issues, than BAM!&amp;nbsp; These were
all different "flavors" of SQL (2K, 2K5 and different service packs).&amp;nbsp; Most likely
not a SQL issue or even a windows issue, but regardless the product takes a hit and
so do I.
&lt;/p&gt;
&lt;p&gt;
The machines were so "unresponsive" that the only way to correct was to kill the power
to the machines.&amp;nbsp; Of course no logs and no indication of what the problem was.&amp;nbsp;
I highly suspect one of the many 3rd party crap that we run on these windoze machines:&amp;nbsp;
backup, anti-virus, san drivers,&amp;nbsp;monitoring programs&amp;nbsp;etc; though we'll never
know for sure what was to blame.
&lt;/p&gt;
&lt;p&gt;
Even our&amp;nbsp;Microsoft Clustering did not save me! 
&lt;br&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/raidersofthelostark.jpg" border=0&gt;
&lt;br&gt;
No fail-over, no nothing, had to reboot both nodes of the cluster; plenty of room
still for the 3rd party clustering utilities as they also have failures as well, but
I seem to have higher up time with them...try Never Fail, Golden Gate, HP Polyserve
or Veritas.
&lt;/p&gt;
&lt;p&gt;
We still have a long way to go to increase stability, we've got to continue now to
harp on our 3rd party vendors that provide the services not built into windoze, just
wish we knew which one to call for this outage.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=063a5688-d005-4001-aa1b-449e7b3c5ffc" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,063a5688-d005-4001-aa1b-449e7b3c5ffc.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=b797ea71-2154-4756-9bd3-708d1d26b2cf</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,b797ea71-2154-4756-9bd3-708d1d26b2cf.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,b797ea71-2154-4756-9bd3-708d1d26b2cf.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b797ea71-2154-4756-9bd3-708d1d26b2cf</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So I'm enjoying a cup of tea and decide, wouldn't it be nice to upgrade 1000's of
instances of MSDE sp3a to sp4?  <strong><font color="#ff0000">Nice, i love unsupported
products, let's do it !</font></strong><br /><img src="http://www.lifeasbob.com/content/binary/coffee_tea.bmp" border="0" /><br /></p>
        <p>
          <br />
Ugh, I know, but somethings aren't up to me, I deliver the results, this was the task,
it's in the skill set, get it done.  I ran into several issues where I had to
upgrade a MSDE instance from SP3a to SP4.  This should be a simple exercise,
and it was for many installations, but there is a consistent theme where the upgrade
fails and no manner of hitting, kicking or screaming helped.  
</p>
        <p>
 
</p>
        <p>
Uninstalling the original installation and installing the SP4 version of MSDE was
successful, but then the master database, logins, msdb all has to be restored to get
the instance back to a working state.
</p>
        <p>
I'd be fine with the uninstall and reinstall, <strong><u><font color="#0000ff">but
we're talking 1000's of installations</font></u></strong>, how many are going to have
a problem ?  Surely the solution can't be to uninstall and reinstall.
</p>
        <p>
I found some good documentation on troubleshooting sp3 to sp4 for MSDE (remember it's
been around awhile and is out of support).  The best link I found was <a href="http://support.microsoft.com/kb/901163">http://support.microsoft.com/kb/901163</a>,
unfortunately it didn't resolve the problem.
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
Consistently the error that keeps happening is UpgDetectBlankSaLogin Return value
3.<br />
---------Actual Log File-----------<br />
Starting custom action UpgDetectBlankSaLogin()<br />
Entering Function MyMsiEvaluateCondition<br />
MsiEvaluateCondition for VersionNT returned TRUE<br />
End Function MyMsiEvaluateCondition<br />
An error was encountered during connection to server: 3<br />
Ending custom action UpgDetectBlankSaLogin().<br />
Action ended 16:20:07: UpgDetectBlankSaLogin.2D02443E_7002_4C0B_ABC9_EAB2C064397B.
Return value 3.<br />
Action ended 16:20:07: INSTALL. Return value 3.<br />
----------END Actual Log file----------
</p>
        </blockquote>
        <p>
          <u>The sa password is definitely not blank</u>, no matter how much the sa password
was changed or it's complexity it always failed on this.
</p>
        <p>
Creativity is needed to get around this, enter the windows software development kit
(SDK) and Orca.  Orca is an MSI Editor, and is found in the Windows SDK. 
The SP4 Service pack contains the MSI Files, and I decided to remove the step that
runs the UpgDetectBlankSaLogin.    Simply find the step in the MSI
File (as shown below) and Delete (drop) the row associated with UpgDetectBlankSaLogin. 
Save and use it !
</p>
        <p>
          <br />
          <img src="http://www.lifeasbob.com/content/binary/UpgDetectBlankSaLogin.JPG" border="0" />
          <br />
        </p>
        <p>
Now this is a calculated risk and requires testing.  But it works, and on everyone
of these installations that was failing the now modified SP4 runs fine.
</p>
        <p>
This MSDE task took 3 days of my life away from me, hopefully you'll be more fortunate!
</p>
        <p>
 
</p>
        <p>
MSDE is on life support, and so is this solution, but if you can't solve the problem,
go around the problem.<br /></p>
        <img src="http://www.lifeasbob.com/content/binary/SQL Spider man.JPG" border="0" />
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b797ea71-2154-4756-9bd3-708d1d26b2cf" />
      </body>
      <title>MSDE SP4 failing (editing a MSI File)</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,b797ea71-2154-4756-9bd3-708d1d26b2cf.aspx</guid>
      <link>http://www.lifeasbob.com/2009/04/16/MSDESP4FailingEditingAMSIFile.aspx</link>
      <pubDate>Thu, 16 Apr 2009 16:45:19 GMT</pubDate>
      <description>&lt;p&gt;
So I'm enjoying a cup of tea and decide, wouldn't it be nice to upgrade 1000's of
instances of MSDE sp3a to sp4?&amp;nbsp; &lt;strong&gt;&lt;font color=#ff0000&gt;Nice, i love unsupported
products, let's do it !&lt;/font&gt;&lt;/strong&gt;
&lt;br&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/coffee_tea.bmp" border=0&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;
Ugh, I know, but somethings aren't up to me, I deliver the results, this was the task,
it's in the skill set, get it done.&amp;nbsp; I ran into several issues where I had to
upgrade a MSDE instance from SP3a to SP4.&amp;nbsp; This should be a simple exercise,
and it was for many installations, but there is a consistent theme where the upgrade
fails and no manner of hitting, kicking or screaming helped.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Uninstalling the original installation and installing the SP4 version of MSDE was
successful, but then the master database, logins, msdb all has to be restored to get
the instance back to a working state.
&lt;/p&gt;
&lt;p&gt;
I'd be fine with the uninstall and reinstall, &lt;strong&gt;&lt;u&gt;&lt;font color=#0000ff&gt;but we're
talking 1000's of installations&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;, how many are going to have a
problem ?&amp;nbsp; Surely the solution can't be to uninstall and reinstall.
&lt;/p&gt;
&lt;p&gt;
I found some good documentation on troubleshooting sp3 to sp4 for MSDE (remember it's
been around awhile and is out of support).&amp;nbsp; The best link I found was &lt;a href="http://support.microsoft.com/kb/901163"&gt;http://support.microsoft.com/kb/901163&lt;/a&gt;,
unfortunately it didn't resolve the problem.
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
Consistently the error that keeps happening is UpgDetectBlankSaLogin Return value
3.&lt;br&gt;
---------Actual Log File-----------&lt;br&gt;
Starting custom action UpgDetectBlankSaLogin()&lt;br&gt;
Entering Function MyMsiEvaluateCondition&lt;br&gt;
MsiEvaluateCondition for VersionNT returned TRUE&lt;br&gt;
End Function MyMsiEvaluateCondition&lt;br&gt;
An error was encountered during connection to server: 3&lt;br&gt;
Ending custom action UpgDetectBlankSaLogin().&lt;br&gt;
Action ended 16:20:07: UpgDetectBlankSaLogin.2D02443E_7002_4C0B_ABC9_EAB2C064397B.
Return value 3.&lt;br&gt;
Action ended 16:20:07: INSTALL. Return value 3.&lt;br&gt;
----------END Actual Log file----------
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;u&gt;The sa password is definitely not blank&lt;/u&gt;, no matter how much the sa password
was changed or it's complexity it always failed on this.
&lt;/p&gt;
&lt;p&gt;
Creativity is needed to get around this, enter the windows software development kit
(SDK) and Orca.&amp;nbsp; Orca is an MSI Editor, and is found in the Windows SDK.&amp;nbsp;
The SP4 Service pack contains the MSI Files, and I decided to remove the step that
runs the UpgDetectBlankSaLogin.&amp;nbsp;&amp;nbsp;&amp;nbsp; Simply find the step in the MSI
File (as shown below) and Delete (drop) the row associated with UpgDetectBlankSaLogin.&amp;nbsp;
Save and use it !
&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/UpgDetectBlankSaLogin.JPG" border=0&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
Now this is a calculated risk and requires testing.&amp;nbsp; But it works, and on everyone
of these installations that was failing the now modified SP4 runs fine.
&lt;/p&gt;
&lt;p&gt;
This MSDE task took 3 days of my life away from me, hopefully you'll be more fortunate!
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
MSDE is on life support, and so is this solution, but if you can't solve the problem,
go around the problem.&lt;br&gt;
&lt;/p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/SQL Spider man.JPG" border=0&gt;&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b797ea71-2154-4756-9bd3-708d1d26b2cf" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,b797ea71-2154-4756-9bd3-708d1d26b2cf.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=b304f404-8279-42e8-8c3f-94766a81ee09</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,b304f404-8279-42e8-8c3f-94766a81ee09.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,b304f404-8279-42e8-8c3f-94766a81ee09.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b304f404-8279-42e8-8c3f-94766a81ee09</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Remember this means buying it and paying maintenance.  SSIS is a great tool,
even if you did have to buy it, but because it's free and bundled with SQL Server
2005/8, we rarely look at other ETL Tools with an open mind.  Recently my list
of <a href="http://www.lifeasbob.com/2009/04/09/SSISPetPeeves2005.aspx">SSIS Pet Peeves</a> and
the <a href="http://www.lifeasbob.com/2009/04/03/ToughestSQLServer2005MigrationEver.aspx">Toughest
SQL Server 2005 Migration ever</a>, caused me to wonder, "Would I use SSIS if it wasn't
free and bundled with SQL Server?"
</p>
        <p>
I know the company i work did a RFP for ETL Tools, but I was never privy to the responses
or even allowed to participate in the process ( why include DBA's in the search for
an enterprise ETL Tool, that'd be foolish!).  Nothing ever came from this, so
that leads me to think that SSIS must still be the best value out there, probably
because it's free.  I sure would have liked to seen the responses, especially
on cost.
</p>
        <p>
I've found a nice web page on ETL Tools, though they want you to purchase their comparison,
but if nothing else you can see a nice list of ETL Vendors:
</p>
        <p>
          <a href="http://www.etltool.com/etltoolslist.htm">http://www.etltool.com/etltoolslist.htm</a>
        </p>
        <p>
No. List of ETL Tools Version   ETL Vendors 
<br />
1. Oracle Warehouse Builder (OWB) 11gR1 Oracle   
<br />
2. Data Integrator &amp; Services  XI 3.0 Business Objects, SAP 
<br />
3. IBM Information Server (Ascential) 8.0.1 IBM 
<br />
4. SAS Data Integration Studio 4.2 SAS Institute  
<br />
5. PowerCenter 8.5.1 Informatica   
<br />
6. Elixir Repertoire 7.2.2 Elixir  
<br />
7. Data Migrator 7.6 Information Builders 
<br />
8. Integration Services (SSIS) 10 Microsoft   
<br />
9. Talend Open Studio 1.1 Talend 
<br />
10. DataFlow Manager 6 Group 1 Software (Sagent) 
<br />
11. Data Integrator 8.12 Pervasive 
<br />
12. Transformation Server 5.4 IBM DataMirror 
<br />
13. Transformation Manager  5.2.2 ETL Solutions Ltd. 
<br />
14. Data Manager/Decision Stream 8.2 IBM Cognos 
<br />
15. DT/Studio 3.1 Embarcadero Technologies 
<br />
16. ETL4ALL 4.2 IKAN 
<br />
17. DB2 Warehouse Edition 9.1 IBM 
<br />
18. Pentaho Data Integration  3.0 Pentaho   
<br />
19. Adeptia Integration Server 4.9 Adeptia 
<br />
20. Clover ETL 2.5.2 Javlin   
</p>
        <p>
Interesting Blog post on evaluating some ETL Tools:<br /><a href="http://it.toolbox.com/blogs/evaluating-software/evaluate-etl-tools-4169">http://it.toolbox.com/blogs/evaluating-software/evaluate-etl-tools-4169</a></p>
        <p>
If anyone has any experiences with other ETL Tools and how they compare with SSIS,
i'd love to have you comment on this, letting me know why your using a different tool. 
After working with SSIS now on several large projects I'm now very comfortable with
SSIS and understand it's quirks, depending on it's "cost" compared to other products,
I'd use it, even if it wasn't free.  I hope Microsoft doesn't read this and decide
they want to start charging for ssis (and for sure there are already some features
of SSIS that aren't available under certain editions). 
</p>
        <p>
One of the greatest strengths of SSIS is how quickly we (DBA, User, Developer, BA,
QA Etc) can get at the data either for query, analysis, import or export...SSIS and
it's predecessor DTS were one of SQL Server's greatest strengths in this area. 
I work in a shop with other DBMS's and consistently SQL Server is more flexible in
this area, because of SSIS/DTS.  I do think they could have made SSIS Better
than it is, the learning curve compared to DTS is steep and the strong data typing
of the meta data can be difficult at best.<br /></p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b304f404-8279-42e8-8c3f-94766a81ee09" />
      </body>
      <title>SSIS - Would you use it if it wasn't free.</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,b304f404-8279-42e8-8c3f-94766a81ee09.aspx</guid>
      <link>http://www.lifeasbob.com/2009/04/10/SSISWouldYouUseItIfItWasntFree.aspx</link>
      <pubDate>Fri, 10 Apr 2009 18:50:56 GMT</pubDate>
      <description>&lt;p&gt;
Remember this means buying it and paying maintenance.&amp;nbsp; SSIS is a great tool,
even if you did have to buy it, but because it's free and bundled with SQL Server
2005/8, we rarely look at other ETL Tools with an open mind.&amp;nbsp; Recently my list
of &lt;a href="http://www.lifeasbob.com/2009/04/09/SSISPetPeeves2005.aspx"&gt;SSIS Pet Peeves&lt;/a&gt; and
the &lt;a href="http://www.lifeasbob.com/2009/04/03/ToughestSQLServer2005MigrationEver.aspx"&gt;Toughest
SQL Server 2005 Migration ever&lt;/a&gt;, caused me to wonder, "Would I use SSIS if it wasn't
free and bundled with SQL Server?"
&lt;/p&gt;
&lt;p&gt;
I know the company i work did a RFP for ETL Tools, but I was never privy to the responses
or even allowed to participate in the process ( why include DBA's in the search for
an enterprise ETL Tool, that'd be foolish!).&amp;nbsp; Nothing ever came from this, so
that leads me to think that SSIS must still be the best value out there, probably
because it's free.&amp;nbsp; I sure would have liked to seen the responses, especially
on cost.
&lt;/p&gt;
&lt;p&gt;
I've found a nice web page on ETL Tools, though they want you to purchase their comparison,
but if nothing else you can see a nice list of ETL Vendors:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.etltool.com/etltoolslist.htm"&gt;http://www.etltool.com/etltoolslist.htm&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
No. List of ETL Tools Version&amp;nbsp;&amp;nbsp; ETL Vendors 
&lt;br&gt;
1. Oracle Warehouse Builder (OWB) 11gR1 Oracle&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
2. Data Integrator &amp;amp; Services&amp;nbsp; XI 3.0 Business Objects, SAP 
&lt;br&gt;
3. IBM Information Server (Ascential) 8.0.1 IBM 
&lt;br&gt;
4. SAS Data Integration Studio 4.2 SAS Institute&amp;nbsp; 
&lt;br&gt;
5. PowerCenter 8.5.1 Informatica&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
6. Elixir Repertoire 7.2.2 Elixir&amp;nbsp; 
&lt;br&gt;
7. Data Migrator 7.6 Information Builders 
&lt;br&gt;
8. Integration Services (SSIS) 10 Microsoft&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
9. Talend Open Studio 1.1 Talend 
&lt;br&gt;
10. DataFlow Manager 6 Group 1 Software (Sagent) 
&lt;br&gt;
11. Data Integrator 8.12 Pervasive 
&lt;br&gt;
12. Transformation Server 5.4 IBM DataMirror 
&lt;br&gt;
13. Transformation Manager&amp;nbsp; 5.2.2 ETL Solutions Ltd. 
&lt;br&gt;
14. Data Manager/Decision Stream 8.2 IBM Cognos 
&lt;br&gt;
15. DT/Studio 3.1 Embarcadero Technologies 
&lt;br&gt;
16. ETL4ALL 4.2 IKAN 
&lt;br&gt;
17. DB2 Warehouse Edition 9.1 IBM 
&lt;br&gt;
18. Pentaho Data Integration&amp;nbsp; 3.0 Pentaho&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
19. Adeptia Integration Server 4.9 Adeptia 
&lt;br&gt;
20. Clover ETL 2.5.2 Javlin&amp;nbsp;&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Interesting Blog post on evaluating some ETL Tools:&lt;br&gt;
&lt;a href="http://it.toolbox.com/blogs/evaluating-software/evaluate-etl-tools-4169"&gt;http://it.toolbox.com/blogs/evaluating-software/evaluate-etl-tools-4169&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
If anyone has any experiences with other ETL Tools and how they compare with SSIS,
i'd love to have you comment on this, letting me know why your using a different tool.&amp;nbsp;
After working with SSIS now on several large projects I'm now very comfortable with
SSIS and understand it's quirks, depending on it's "cost" compared to other products,
I'd use it, even if it wasn't free.&amp;nbsp; I hope Microsoft doesn't read this and decide
they want to start charging for ssis (and for sure there are already some features
of SSIS that aren't available under certain editions). 
&lt;/p&gt;
&lt;p&gt;
One of the greatest strengths of SSIS is how quickly we (DBA, User, Developer, BA,
QA Etc) can get at the data either for query, analysis, import or export...SSIS and
it's predecessor DTS were one of SQL Server's greatest strengths in this area.&amp;nbsp;
I work in a shop with other DBMS's and consistently SQL Server is more flexible in
this area, because of SSIS/DTS.&amp;nbsp; I do think they could have made SSIS Better
than it is, the learning curve compared to DTS is steep and the strong data typing
of the meta data can be difficult at best.&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b304f404-8279-42e8-8c3f-94766a81ee09" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,b304f404-8279-42e8-8c3f-94766a81ee09.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / SSIS</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=72132c1f-eae5-4ad2-8d84-2427e1e49211</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,72132c1f-eae5-4ad2-8d84-2427e1e49211.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,72132c1f-eae5-4ad2-8d84-2427e1e49211.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=72132c1f-eae5-4ad2-8d84-2427e1e49211</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently I finished my first deep dive into using SQL Server Integration Services
(SSIS) on a project.  This was the conversion of 88 fairly complex DTS Packages
from SQL 2000 to 2005.  I've used SSIS numerous times in the past, but I still
considered myself at the "beginner" level, I'd say i'm almost "Intermediate" now that
I've completed this project.  
</p>
        <p>
          <strong>All of our SSIS Packages for this project were implemented on a separate layer
from the dbms, ultimately allowing application administrators the ability to control
the jobs (via windows task scheduler). </strong>  <font color="#0000ff">This
is one of the greatest benefits of SSIS is the ability to separate them from SQL Server.</font> 
The three cons to this are loss of SQL Agent for scheduling,  SQL Licensing and
Performance of some tasks (can't use SQL Destination).   The pro's out weigh
these con's, and in the very few instances where a con can't be overcome we do
allow the ssis package to run on the same layer (usually large loads from Oracle to
SQL where the SQL Destination object must be used for performance).  
</p>
        <p>
It is definitely nice to allow the administrator unfettered access to the box and
they are completely responsible for developing, deploying, configuring and scheduling
their own SSIS Packages, not the SQL DBA Team.  We have 4 SQL Server DBA's, 170
Instances; there are a lot more App/Dev labor hours than their our SQL DBA labor hours. 
The App/Dev team loves it too, it takes them a bit to get used to it, but everyone
of them loves it.  Make sure you have good SLA's as DBA's still need to understand
when large loads and complex ETL's will run against a database.
</p>
        <p>
During the process I compiled a list of "pet peeves" for SSIS, here they are. 
Hopefully as we adopt SQL 2008 SSIS, i'll be able to cross some of these off.
</p>
        <ul>
          <li>
Excel (the list of issues seems endless)</li>
          <ul>
            <li>
Columns longer than 500 Characters</li>
            <li>
Strong data typing (Data conversion on 50+ columns is brutal!)</li>
            <li>
Mapping columns after data conversion, ugh !</li>
          </ul>
          <li>
Using variables for dynamic file names is not intuitive</li>
          <ul>
            <li>
This is timestamps in filenames etc, once learned it's not difficult, but for others
viewing the package the first time it can be convoluted to determine how the variables
are used to manipulate the name of the file source</li>
          </ul>
          <li>
Using wild cards for FTP (either put or get) is not intuitive</li>
          <ul>
            <li>
Converting some previous DTS Tasks would perform a put (mput) of {timestamp}.*, this
ended up either remaining a batch file in ssis or creating a for loop that actually
performed individual puts (really not smart to login 10 times for 10 puts).</li>
          </ul>
          <li>
Mapping columns in data flow tasks 
</li>
          <ul>
            <li>
If the names don't match there is no option to just do a 1:1 in order match, frustrating
and tedious when your dealing with 50 or a 100 columns to perform manually</li>
          </ul>
          <li>
Configuration Files</li>
          <ul>
            <li>
A must to implement, but just seems to have a high learning curve</li>
          </ul>
          <li>
Restart of a failed packages (checkpoints)</li>
          <ul>
            <li>
Just didn't work the way we expected, but once learned was quite successfully</li>
          </ul>
          <li>
Oracle Integration</li>
          <ul>
            <li>
The pain here was and is endless, 3rd party tool is really necessary if your dealing
with lots of integration</li>
          </ul>
          <li>
Default Properties for Fail Parent and Fail Package 
</li>
          <ul>
            <li>
For us it seemed we always wanted this to true and the default was false, there seemed
to be no way to globally change this</li>
          </ul>
          <li>
Precedence Constraint Editor does not contain an expression builder</li>
          <ul>
            <li>
Oh how I missed the 3 ellipses</li>
          </ul>
          <li>
Executing another SSIS Package from an existing SSIS Package</li>
          <ul>
            <li>
We have several "shared" packages, but we weren't able to use the execute package
task due to limitations on changing the properties, so we ended up using the Execute
process task, which calls a batch file with the proper configuration file...ultimately
the execute package task was useless</li>
          </ul>
          <li>
Readability of Configuration files makes editing difficult 
</li>
          <ul>
            <li>
We end up using XML Notepad on most servers, it'd be nice to see the property name
as part of the node or an element so one could visually scan down the side and find
things quicker.</li>
          </ul>
        </ul>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=72132c1f-eae5-4ad2-8d84-2427e1e49211" />
      </body>
      <title>SSIS Pet Peeves (2005)</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,72132c1f-eae5-4ad2-8d84-2427e1e49211.aspx</guid>
      <link>http://www.lifeasbob.com/2009/04/09/SSISPetPeeves2005.aspx</link>
      <pubDate>Thu, 09 Apr 2009 19:02:53 GMT</pubDate>
      <description>&lt;p&gt;
Recently I finished my first deep dive into using SQL Server Integration Services
(SSIS) on a project.&amp;nbsp; This was the conversion of 88 fairly complex DTS Packages
from SQL 2000 to 2005.&amp;nbsp; I've used SSIS numerous times in the past, but I still
considered myself at the "beginner" level, I'd say i'm almost "Intermediate" now that
I've completed this project.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;All of our SSIS Packages for this project were implemented on a separate layer
from the dbms, ultimately allowing application administrators the ability to control
the jobs (via windows task scheduler).&amp;nbsp;&lt;/strong&gt;&amp;nbsp; &lt;font color=#0000ff&gt;This
is one of the greatest benefits of SSIS is the ability to separate them from SQL Server.&lt;/font&gt;&amp;nbsp;
The three cons to this are loss of SQL Agent for scheduling,&amp;nbsp; SQL Licensing and
Performance of some tasks (can't use SQL Destination).&amp;nbsp;&amp;nbsp; The pro's out weigh
these con's,&amp;nbsp;and in the very few instances where a con can't be overcome we do
allow the ssis package to run on the same layer (usually large loads from Oracle to
SQL where the SQL Destination object must be used for performance).&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
It is definitely nice to allow the administrator unfettered access to the box and
they are completely responsible for developing, deploying, configuring and scheduling
their own SSIS Packages, not the SQL DBA Team.&amp;nbsp; We have 4 SQL Server DBA's, 170
Instances; there are a lot more App/Dev labor hours than their our SQL DBA labor hours.&amp;nbsp;
The App/Dev team loves it too, it takes them a bit to get used to it, but everyone
of them loves it.&amp;nbsp; Make sure you have good SLA's as DBA's still need to understand
when large loads and complex ETL's will run against a database.
&lt;/p&gt;
&lt;p&gt;
During the process I compiled a list of "pet peeves" for SSIS, here they are.&amp;nbsp;
Hopefully as we adopt SQL 2008 SSIS, i'll be able to cross some of these off.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Excel (the list of issues seems endless)&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
Columns longer than 500 Characters&lt;/li&gt;
&lt;li&gt;
Strong data typing (Data conversion on 50+ columns is brutal!)&lt;/li&gt;
&lt;li&gt;
Mapping columns after data conversion, ugh !&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Using variables for dynamic file names is not intuitive&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
This is timestamps in filenames etc, once learned it's not difficult, but for others
viewing the package the first time it can be convoluted to determine how the variables
are used to manipulate the name of the file source&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Using wild cards for FTP (either put or get) is not intuitive&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
Converting some previous DTS Tasks would perform a put (mput) of {timestamp}.*, this
ended up either remaining a batch file in ssis or creating a for loop that actually
performed individual puts (really not smart to login 10 times for 10 puts).&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Mapping columns in data flow tasks 
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
If the names don't match there is no option to just do a 1:1 in order match, frustrating
and tedious when your dealing with 50 or a 100 columns to perform manually&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Configuration Files&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
A must to implement, but just seems to have a high learning curve&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Restart of a failed packages (checkpoints)&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
Just didn't work the way we expected, but once learned was quite successfully&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Oracle Integration&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
The pain here was and is endless, 3rd party tool is really necessary if your dealing
with lots of integration&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Default Properties for Fail Parent and Fail Package 
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
For us it seemed we always wanted this to true and the default was false, there seemed
to be no way to globally change this&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Precedence Constraint Editor does not contain an expression builder&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
Oh how I missed the 3 ellipses&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Executing another SSIS Package from an existing SSIS Package&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
We have several "shared" packages, but we weren't able to use the execute package
task due to limitations on changing the properties, so we ended up using the Execute
process task, which calls a batch file with the proper configuration file...ultimately
the execute package task was useless&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Readability of Configuration files makes editing difficult 
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
We end up using XML Notepad on most servers, it'd be nice to see the property name
as part of the node or an element so one could visually scan down the side and find
things quicker.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=72132c1f-eae5-4ad2-8d84-2427e1e49211" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,72132c1f-eae5-4ad2-8d84-2427e1e49211.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / SSIS</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We're still not ready to support sql 2008 (Company Infrastructure, vendors and DBA
Group are a little slow), maybe this June or July we'll do the first sql 2008 implementation).
</p>
        <p>
For me, most SQL Server migrations have been easy.  No mess, no fuss, hit the
"easy button".  We even do the migrations the "hard" way...new servers, named
instance, usually to a new clustered or consolidated environment using Polyserve or
VM, and we separate all DTS (ssis) and User jobs out to an application (ETL) server. 
As a DBA with 100's of servers it's a lot easier to let each application group manage
their own jobs, off the sql server, than for us to handle the requests. 
Usually the most difficult issue is connectivity, firewall and connection strings. 
Of 170 instances we support very rarely is there a difficult issue, we've dealt with
some odd performance issues here and there, but for the most part it's been smooth
sailing (hah, I remember being up for several days straight monitoring a system with
5K tps and watching it crash every day, but that's the extreme end of the bell curve).
</p>
        <p>
Finally we couldn't put it off any more, and it was time to tackle the elephant in
the room.  
</p>
        <p>
It's not a big Instance (5 databases, 60gb), but the challenges are big.  We're
dealing with 88 DTS Packages and 45 sql agent jobs, Connectivity to multiple Oracle
databases, AS400 and other SQL Servers, 60+ downstream consumers of data.  Excel
Flat Files, Text Files, Web services, 3rd party vendor imports and exports. 
Let the games begin.
</p>
        <p>
I knew I was screwed when I de-attached the databases from SQL 2000 and attached them
to sql 2005 and got the following errors:  "Attach database failed for Server
x.  An exception occurred while executing a T-SQL Statement or batch.  Converting
database x from version 539 to 611.  Microsoft SQL Server, Error 195. fn_convertdatetoint_notime
is not a recognized function name.  Incorrect syntax near the keyword 'left'". 
Ultimately we determined that this issues was caused by user functions in SQL 2000
setup in the master database, NOT Supported in sql 2005.  We also ran into isolated
issues where there were tsql syntax errors in sql 2000 that did not throw any errors,
but would not compile in 2005!
</p>
        <p>
          <strong>Linked Server Issues were also encountered.<br /></strong>   <font color="#0000ff">Setting up a linked server to the
AS400 on 64 Bit windows<br />
      Required a new version of the IBM iSeries driver<br />
      Required a patch to the IBM iseries driver<br />
      Required patching windows to install 64 bit odbc
drivers<br />
   Setting up a Linked server to SQL 2000 SP4<br />
      Required patching sql 2000, </font><a href="http://support.microsoft.com/kb/906954"><font color="#0000ff">http://support.microsoft.com/kb/906954</font></a><br /><font color="#0000ff">   Setting up a linked server to Oracle</font></p>
        <p>
Over-all the process took about a month (with 4 DBA's and other work), bulk of the
work was the DTS to SSIS packages.  We did look at some 3rd party utilities,
but they still left several hours work for each package, so we just did the brute
force method and did them one at a time.  Currently the process will spend 2-3
months running in parallel and being QA'd, than onto production.
</p>
        <p>
Hit the "next" button.<br /></p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3" />
      </body>
      <title>Toughest SQL Server 2005 migration ever !</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3.aspx</guid>
      <link>http://www.lifeasbob.com/2009/04/03/ToughestSQLServer2005MigrationEver.aspx</link>
      <pubDate>Fri, 03 Apr 2009 20:03:22 GMT</pubDate>
      <description>&lt;p&gt;
We're still not ready to support sql 2008 (Company Infrastructure, vendors and DBA
Group are a little slow), maybe this June or July we'll do the first sql 2008 implementation).
&lt;/p&gt;
&lt;p&gt;
For me, most SQL Server migrations have been easy.&amp;nbsp; No mess, no fuss, hit the
"easy button".&amp;nbsp; We even do the migrations the "hard" way...new servers, named
instance, usually to a new clustered or consolidated environment using Polyserve or
VM, and we separate all DTS (ssis) and User jobs out to an application (ETL) server.&amp;nbsp;
As a DBA with 100's of servers it's a lot easier to let each application group manage
their own jobs, off the sql server, than for&amp;nbsp;us to handle&amp;nbsp;the requests.&amp;nbsp;
Usually the most difficult issue is connectivity, firewall and connection strings.&amp;nbsp;
Of 170 instances we support very rarely is there a difficult issue, we've dealt with
some odd performance issues here and there, but for the most part it's been smooth
sailing (hah, I remember being up for several days straight monitoring a system with
5K tps and watching it crash every day, but that's the extreme end of the bell curve).
&lt;/p&gt;
&lt;p&gt;
Finally we couldn't put it off any more, and it was time to tackle the elephant in
the room.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
It's not a big Instance (5 databases, 60gb), but the challenges are big.&amp;nbsp; We're
dealing with 88 DTS Packages and 45 sql agent jobs, Connectivity to multiple Oracle
databases, AS400 and other SQL Servers, 60+ downstream consumers of data.&amp;nbsp; Excel
Flat Files, Text Files, Web services, 3rd party vendor imports and exports.&amp;nbsp;
Let the games begin.
&lt;/p&gt;
&lt;p&gt;
I knew I was screwed when I de-attached the databases from SQL 2000 and attached them
to sql 2005 and got the following errors:&amp;nbsp; "Attach database failed for Server
x.&amp;nbsp; An exception occurred while executing a T-SQL Statement or batch.&amp;nbsp; Converting
database x from version 539 to 611.&amp;nbsp; Microsoft SQL Server, Error 195. fn_convertdatetoint_notime
is not a recognized function name.&amp;nbsp; Incorrect syntax near the keyword 'left'".&amp;nbsp;
Ultimately we determined that this issues was caused by user functions in SQL 2000
setup in the master database, NOT Supported in sql 2005.&amp;nbsp; We also ran into isolated
issues where there were tsql syntax errors in sql 2000 that did not throw any errors,
but would not compile in 2005!
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Linked Server Issues were also encountered.&lt;br&gt;
&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;Setting up a linked server to the AS400
on 64 Bit windows&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Required a new version of the IBM iSeries driver&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Required a patch to the IBM iseries driver&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Required patching windows to install 64 bit odbc
drivers&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Setting up a Linked server to SQL 2000 SP4&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Required patching sql 2000, &lt;/font&gt;&lt;a href="http://support.microsoft.com/kb/906954"&gt;&lt;font color=#0000ff&gt;http://support.microsoft.com/kb/906954&lt;/font&gt;&lt;/a&gt;
&lt;br&gt;
&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Setting up a linked server to Oracle&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Over-all the process took about a month (with 4 DBA's and other work), bulk of the
work was the DTS to SSIS packages.&amp;nbsp; We did look at some 3rd party utilities,
but they still left several hours work for each package, so we just did the brute
force method and did them one at a time.&amp;nbsp; Currently the process will spend 2-3
months running in parallel and being QA'd, than onto production.
&lt;/p&gt;
&lt;p&gt;
Hit the "next" button.&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / Linked Server</category>
      <category>SQL Server / SSIS</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=754b4718-cf72-4bfe-89cd-34b13a82b34e</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,754b4718-cf72-4bfe-89cd-34b13a82b34e.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,754b4718-cf72-4bfe-89cd-34b13a82b34e.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=754b4718-cf72-4bfe-89cd-34b13a82b34e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently had to perform an update to some VBS Scripts I wrote in the past to archive
and delete logs.  (Previous post: <a href="http://www.lifeasbob.com/2008/02/26/SQLServerLogManagement.aspx">http://www.lifeasbob.com/2008/02/26/SQLServerLogManagement.aspx</a>) 
The scripts I've used in the past automatically move all files in a specific directory
to an archive directory, and then delete the archived directories that are older than
30 days.  This was nice, but most of the directory names and the number of days
were hard coded in the script, in addition it did not use wild cards (*.txt) to move
the files, so it was all files or nothing.
</p>
        <p>
I updated the VBS Scripts to take wild cards and directories (both source and target)
as parameters.   The annoying thing is I implement these jobs via windows
task scheduler (no sql agent on the box), and in order to call the vb scripts with
parameters I ended up using batch files as I had multiple iterations of different
wildcards and directories, guess we haven't come very far after all!
</p>
        <p>
Anyway you may find this stuff useful for things where someone creates a process which
generates lots and lots of files of any type.  In my case these were about 10
files per day, exported to excel, and we needed to archive them to different sub-directories
based on the wild card.  What you end up with looks like this in Task Scheduler
and File exploder...er, i mean explorer...
</p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/task_sched.JPG" border="0" />
          <br />
          <img src="http://www.lifeasbob.com/content/binary/logfiles.JPG" border="0" />
        </p>
        <p>
I've uploaded the examples of the vbs and bat files below, all have been renamed to
have a .txt extension, so rename them after download.
</p>
        <p>
          <a href="http://www.lifeasbob.com/content/binary/Archive_Daily_logs_bat.txt">Archive_Daily_logs_bat.txt
(.6 KB)</a> <br /><a href="http://www.lifeasbob.com/content/binary/Archive_Daily_Logs_vbs.txt">Archive_Daily_Logs_vbs.txt
(4.95 KB)</a><br /><a href="http://www.lifeasbob.com/content/binary/Archive_Delete_Dirs_bat.txt">Archive_Delete_Dirs_bat.txt
(.36 KB)</a><br /><a href="http://www.lifeasbob.com/content/binary/Archive_Delete_Dirs_vbs.txt">Archive_Delete_Dirs_vbs.txt
(.75 KB)</a><br /></p>
        <p>
For the powershell Evangelist's, yes this can all be done in powershell, but since
I only have powershell installed on 1 of 170 servers, it will have to wait. 
Eventually i'm sure we will push powershell to 170 servers.  Soon i'll be
creating a new powershell category and begin uploading and converting all these.
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=754b4718-cf72-4bfe-89cd-34b13a82b34e" />
      </body>
      <title>Archive Logs </title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,754b4718-cf72-4bfe-89cd-34b13a82b34e.aspx</guid>
      <link>http://www.lifeasbob.com/2009/04/03/ArchiveLogs.aspx</link>
      <pubDate>Fri, 03 Apr 2009 18:04:01 GMT</pubDate>
      <description>&lt;p&gt;
Recently had to perform an update to some VBS Scripts I wrote in the past to archive
and delete logs.&amp;nbsp; (Previous post: &lt;a href="http://www.lifeasbob.com/2008/02/26/SQLServerLogManagement.aspx"&gt;http://www.lifeasbob.com/2008/02/26/SQLServerLogManagement.aspx&lt;/a&gt;)&amp;nbsp;
The scripts I've used in the past automatically move all files in a specific directory
to an archive directory, and then delete the archived directories that are older than
30 days.&amp;nbsp; This was nice, but most of the directory names and the number of days
were hard coded in the script, in addition it did not use wild cards (*.txt) to move
the files, so it was all files or nothing.
&lt;/p&gt;
&lt;p&gt;
I updated the VBS Scripts to take wild cards and directories (both source and target)
as parameters.&amp;nbsp;&amp;nbsp; The annoying thing is I implement these jobs via windows
task scheduler (no sql agent on the box), and in order to call the vb scripts with
parameters I ended up using&amp;nbsp;batch files as I had multiple iterations of different
wildcards and directories, guess we haven't come very far after all!
&lt;/p&gt;
&lt;p&gt;
Anyway you may find this stuff useful for things where someone creates a process which
generates lots and lots of files of any type.&amp;nbsp; In my case these were about 10
files per day, exported to excel, and we needed to archive them to different sub-directories
based on the wild card.&amp;nbsp; What you end up with looks like this in Task Scheduler
and File exploder...er, i mean explorer...
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/task_sched.JPG" border=0&gt;
&lt;br&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/logfiles.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
I've uploaded the examples of the vbs and bat files below, all have been renamed to
have a .txt extension, so rename them after download.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/Archive_Daily_logs_bat.txt"&gt;Archive_Daily_logs_bat.txt
(.6 KB)&lt;/a&gt;&amp;nbsp;&lt;br&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/Archive_Daily_Logs_vbs.txt"&gt;Archive_Daily_Logs_vbs.txt
(4.95 KB)&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/Archive_Delete_Dirs_bat.txt"&gt;Archive_Delete_Dirs_bat.txt
(.36 KB)&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/Archive_Delete_Dirs_vbs.txt"&gt;Archive_Delete_Dirs_vbs.txt
(.75 KB)&lt;/a&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
For the powershell Evangelist's, yes this can all be done in powershell, but since
I only have powershell installed on 1 of 170 servers, it will have to wait.&amp;nbsp;
Eventually i'm sure we&amp;nbsp;will push powershell to 170 servers.&amp;nbsp; Soon i'll be
creating a new powershell category and begin uploading and converting all these.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=754b4718-cf72-4bfe-89cd-34b13a82b34e" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,754b4718-cf72-4bfe-89cd-34b13a82b34e.aspx</comments>
      <category>General Technology</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=5deab1f3-54dc-43da-8e67-d8aa2bbf8413</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,5deab1f3-54dc-43da-8e67-d8aa2bbf8413.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,5deab1f3-54dc-43da-8e67-d8aa2bbf8413.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=5deab1f3-54dc-43da-8e67-d8aa2bbf8413</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently I ran into an issue where I needed to edit a large number of dtsConfig xml
files.  I thought there was an option in the windows operating system to perform
a find and replace across multiple files, but alas I can't find it...
</p>
        <p>
Than I remember a vb script I had hobbled together from several other people to do
this.  There are several share ware, free ware and other programs to do this,
but I really think that find and replace is so basic of a task that it should
be easy to kick out... 
</p>
        <p>
So here it is, remember that vbs files are a security issue when downloading from
the internet, so i've uploaded them with a .txt extension.  Rename it to .vbs. 
There are two programs, a replace.vbs and Replace_in_All_files.vbs.  The latter
is the one that you must edit with the directory to look for files, extension of files
to search and the find and replace string.
</p>
        <p>
Use at your own risk.  The program will make a backup of the file.  VB Script
is not the most efficient find and replace program for very large files, but if you
have 100 or so dtsConfig files to edit, it works like a charm !
</p>
        <p>
The same type of program can be done in a Power Shell script, and it is the cool new
buzz language, but since it is only installed on 1 out 170 servers we support, it's
not quite useful yet....i'll post the power shell script later.
</p>
        <p>
          <a href="http://www.lifeasbob.com/content/binary/replace.txt">replace.txt (1.76 KB)</a>
        </p>
        <p>
          <a href="http://www.lifeasbob.com/content/binary/Replace_in_All_files.txt">Replace_in_All_files.txt
(1.5 KB)</a>
        </p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=5deab1f3-54dc-43da-8e67-d8aa2bbf8413" />
      </body>
      <title>Find and Replace across multiple files</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,5deab1f3-54dc-43da-8e67-d8aa2bbf8413.aspx</guid>
      <link>http://www.lifeasbob.com/2009/03/25/FindAndReplaceAcrossMultipleFiles.aspx</link>
      <pubDate>Wed, 25 Mar 2009 17:37:40 GMT</pubDate>
      <description>&lt;p&gt;
Recently I ran into an issue where I needed to edit a large number of dtsConfig xml
files.&amp;nbsp; I thought there was an option in the windows operating system to perform
a find and replace across multiple files, but alas I can't find it...
&lt;/p&gt;
&lt;p&gt;
Than I remember a vb script I had hobbled together from several other people to do
this.&amp;nbsp; There are several share ware, free ware and other programs to do this,
but I really think that find and replace is so&amp;nbsp;basic of a task that it should
be easy to kick out... 
&lt;/p&gt;
&lt;p&gt;
So here it is, remember that vbs files are a security issue when downloading from
the internet, so i've uploaded them with a .txt extension.&amp;nbsp; Rename it to .vbs.&amp;nbsp;
There are two programs, a replace.vbs and Replace_in_All_files.vbs.&amp;nbsp; The latter
is the one that you must edit with the directory to look for files, extension of files
to search and the find and replace string.
&lt;/p&gt;
&lt;p&gt;
Use at your own risk.&amp;nbsp; The program will make a backup of the file.&amp;nbsp; VB Script
is not the most efficient find and replace program for very large files, but if you
have 100 or so dtsConfig files to edit, it works like a charm !
&lt;/p&gt;
&lt;p&gt;
The same type of program can be done in a Power Shell script, and it is the cool new
buzz language, but since it is only installed on 1 out 170 servers we support, it's
not quite useful yet....i'll post the power shell script later.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/replace.txt"&gt;replace.txt (1.76 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/Replace_in_All_files.txt"&gt;Replace_in_All_files.txt
(1.5 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=5deab1f3-54dc-43da-8e67-d8aa2bbf8413" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,5deab1f3-54dc-43da-8e67-d8aa2bbf8413.aspx</comments>
      <category>General Technology</category>
      <category>SQL Server</category>
      <category>SQL Server / SSIS</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=e57e3328-b23e-4e6c-a8ab-21b65b9f78ca</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,e57e3328-b23e-4e6c-a8ab-21b65b9f78ca.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,e57e3328-b23e-4e6c-a8ab-21b65b9f78ca.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=e57e3328-b23e-4e6c-a8ab-21b65b9f78ca</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently had a need to ensure that some tables were indexed in a particular order,
mostly due to a very small maintenance window.  I did not want to create any
supporting tables to do this, so we quickly modified the reindex script to include
a priority and list the tables in the query.  If there were more than just a
handful, our thought was to use the extended properties of each table to add a priority,
and then order by that priority for the reindexing.
</p>
        <p>
The quick way for a few tables was just changing the select statement to:
</p>
        <span class="512143113-20032009">
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span> table_name,
table_schema, <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Case</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">when</span> table_name <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'Client'</span>,<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'conflict'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Then</span> 1
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">When</span> table_name <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'appointment'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">then</span> 2 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Else</span> 3 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> Priority <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> information_schema.tables
a <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span> a.table_type
= <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'BASE
TABLE'</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AND</span> a.table_name
&lt;&gt; <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'dtproperties'</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AND</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">NOT</span> (a.table_name <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">LIKE</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'tmp%'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ORDER</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span> Priority,table_name </span>
          </pre>
          <p>
          </p>
        </span>If you have many tables to do, and you need very fine grain control, than
use the extended properties, add one to each table that you need to control. 
It is not necessary to add it to every table unless you want to control the order
of all.  Below is the script example to do this for two tables.
<pre><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Create</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Table</span> BobTest
(bobTestId <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">identity</span>(1,1) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">primary</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">key</span>,
    bob_description <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">varchar</span>(100)) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Create</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Table</span> z_ReindexFirst
(testid <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">identity</span>(1,1) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">primary</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">key</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">EXEC</span> sys.sp_addextendedproperty
@name=N<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'ReindexPriority'</span>,
@value=N<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'1'</span> ,
     @level0type=N<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'SCHEMA'</span>,@level0name=N<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'dbo'</span>,
@level1type=N<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'TABLE'</span>,
     @level1name=N<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'BobTest'</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">EXEC</span> sys.sp_addextendedproperty
@name=N<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'ReindexPriority'</span>,
@value=N<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'2'</span> ,
     @level0type=N<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'SCHEMA'</span>,@level0name=N<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'dbo'</span>,
@level1type=N<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'TABLE'</span>,
     @level1name=N<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'z_ReindexFirst'</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CAST</span>(e.name <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">VARCHAR</span>(1000)) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> ext_prop_name, <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Coalesce</span>(<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CAST</span>(e.value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">VARCHAR</span>(1000)),0) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> ext_prop_value,
        t.name <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> sys.tables <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> t <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">LEFT</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">OUTER</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">JOIN</span> sys.extended_properties <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> e
                        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ON</span> t.[<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object_id</span>]
= e.major_id                         <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AND</span> e.minor_id
= 0      <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span> e.name <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">is</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">or</span> e.name=<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'ReindexPriority'</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ORDER</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span> e.value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">desc</span>,t.name <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">drop</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">table</span> bobTest <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">drop</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">table</span> z_ReindexFirst</span></pre><img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=e57e3328-b23e-4e6c-a8ab-21b65b9f78ca" /></body>
      <title>Reindex "bubble" order certain tables first</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,e57e3328-b23e-4e6c-a8ab-21b65b9f78ca.aspx</guid>
      <link>http://www.lifeasbob.com/2009/03/20/ReindexBubbleOrderCertainTablesFirst.aspx</link>
      <pubDate>Fri, 20 Mar 2009 17:53:03 GMT</pubDate>
      <description>&lt;p&gt;
Recently had a need to ensure that some tables were indexed in a particular order,
mostly due to a very small maintenance window.&amp;nbsp; I did not want to create any
supporting tables to do this, so we quickly modified the reindex script to include
a priority and list the tables in the query.&amp;nbsp; If there were more than just a
handful, our thought was to use the extended properties of each table to add a priority,
and then order by that priority for the reindexing.
&lt;/p&gt;
&lt;p&gt;
The quick way for a few tables was just changing the select statement to:
&lt;/p&gt;
&lt;span class=512143113-20032009&gt;&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; table_name,
table_schema, &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Case&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;when&lt;/span&gt; table_name &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;in&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'Client'&lt;/span&gt;,&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'conflict'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Then&lt;/span&gt; 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;When&lt;/span&gt; table_name &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;in&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'appointment'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;then&lt;/span&gt; 2 &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Else&lt;/span&gt; 3 &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;End&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;As&lt;/span&gt; Priority &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; information_schema.tables
a &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WHERE&lt;/span&gt; a.table_type
= &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'BASE
TABLE'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AND&lt;/span&gt; a.table_name
&amp;lt;&amp;gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'dtproperties'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AND&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;NOT&lt;/span&gt; (a.table_name &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;LIKE&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'tmp%'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ORDER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; Priority,table_name &lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;/span&gt;If you have many tables to do, and you need very fine grain control, than use
the extended properties, add one to each table that you need to control.&amp;nbsp; It
is not necessary to add it to every table unless you want to control the order of
all.&amp;nbsp; Below is the script example to do this for two tables.&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Create&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Table&lt;/span&gt; BobTest
(bobTestId &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;int&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;identity&lt;/span&gt;(1,1) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;primary&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;key&lt;/span&gt;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bob_description &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;varchar&lt;/span&gt;(100)) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Create&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Table&lt;/span&gt; z_ReindexFirst
(testid &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;int&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;identity&lt;/span&gt;(1,1) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;primary&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;key&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;EXEC&lt;/span&gt; sys.sp_addextendedproperty
@name=N&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'ReindexPriority'&lt;/span&gt;,
@value=N&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'1'&lt;/span&gt; ,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @level0type=N&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'SCHEMA'&lt;/span&gt;,@level0name=N&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'dbo'&lt;/span&gt;,
@level1type=N&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'TABLE'&lt;/span&gt;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @level1name=N&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'BobTest'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;EXEC&lt;/span&gt; sys.sp_addextendedproperty
@name=N&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'ReindexPriority'&lt;/span&gt;,
@value=N&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'2'&lt;/span&gt; ,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @level0type=N&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'SCHEMA'&lt;/span&gt;,@level0name=N&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'dbo'&lt;/span&gt;,
@level1type=N&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'TABLE'&lt;/span&gt;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @level1name=N&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'z_ReindexFirst'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CAST&lt;/span&gt;(e.name &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;VARCHAR&lt;/span&gt;(1000)) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;As&lt;/span&gt; ext_prop_name, &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Coalesce&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CAST&lt;/span&gt;(e.value &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;VARCHAR&lt;/span&gt;(1000)),0) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;As&lt;/span&gt; ext_prop_value,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;t.name &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; sys.tables &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; t &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;LEFT&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;OUTER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; sys.extended_properties &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; e
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; t.[&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object_id&lt;/span&gt;]
= e.major_id &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AND&lt;/span&gt; e.minor_id
= 0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WHERE&lt;/span&gt; e.name &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;is&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;null&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;or&lt;/span&gt; e.name=&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'ReindexPriority'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ORDER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; e.value &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;desc&lt;/span&gt;,t.name &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;drop&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;table&lt;/span&gt; bobTest &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;drop&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;table&lt;/span&gt; z_ReindexFirst&lt;/span&gt;&lt;/pre&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=e57e3328-b23e-4e6c-a8ab-21b65b9f78ca" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,e57e3328-b23e-4e6c-a8ab-21b65b9f78ca.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=fddeead4-8590-47f0-95a8-5c29879d4105</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,fddeead4-8590-47f0-95a8-5c29879d4105.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,fddeead4-8590-47f0-95a8-5c29879d4105.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=fddeead4-8590-47f0-95a8-5c29879d4105</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
SSRS - Reporting Services Subscriptions not sending
</p>
        <p>
Recently we ran into an issue with a Reporting Service Instance that was not sending
any email subscriptions.  We could find no errors or obvious issues.  Of
course a quick reboot solved the problem, but only temporarily, the next day, the
issue was right back.  Time to call out for help, Microsoft Support.
</p>
        <p>
Microsoft Support found the problem and provided us some useful scripts.  Basically
the issue was that someone had created a snapshot, that ran every night.  The
snapshot ran for 12+ hours, causing performance issues and other problems with all
other subscriptions.  This is a "shared" reporting service instance, set up for
several application groups.  The scripts from Microsoft were quite useful, i've
listed them here, all of them are in my <a href="http://www.lifeasbob.com/code/ScriptVault.aspx">Script
Vault</a>.
</p>
        <p>
I found the scripts very useful, as it addresses one of my continual issues, which
is addressing capacity in shared environments.  For our Shared Reporting Service
Environment, we create a Directory / Folder for each group and tweak permissions to
keep each application separated, than we turn over full permissions to each sub-folder
to the application group.  
</p>
        <p>
Obviously the danger here is that someone can create a poorly performing report that
effects the entire environment.  The scripts included below can help identify
which reports run the longest.  We then modified this query a bit more to roll-up
the report times, by sub-directory, so we can determine which application is using
the most capacity in the environment.  We can then engage this group to optimize
their reports or began capacity planning to build them a dedicated environment.
</p>
        <p>
Here is a script listing of what I added to the <a href="http://www.lifeasbob.com/code/ScriptVault.aspx">Script
Vault</a></p>
        <p>
1.  Find What User runs What Report - (Rpt Svc - Who Runs What)<br />
2.  Find what subscriptions have been run and when - (Rpt Svc - Subscr Run When)<br />
3.  Find what SQL Agent Schedule goes with what Report (Rpt Svc - SQL Agent to
Report)<br />
4.  Average Report RunTime - (Rpt Svc - Avg Rpt Runtime)<br />
5.  Average Report RunTime Per Parent Folder - (Rpt Svc - Avg RunTime Pnt Fld)
</p>
        <p>
We then used the last two queries to develop a Reporting Services reports that is
available to the administrators of each directory, so they can manage their own performance
and capacity, thanks to Tom Reeves,  for developing the last two.
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=fddeead4-8590-47f0-95a8-5c29879d4105" />
      </body>
      <title>SSRS - Reporting Services Subscriptions not sending</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,fddeead4-8590-47f0-95a8-5c29879d4105.aspx</guid>
      <link>http://www.lifeasbob.com/2009/03/09/SSRSReportingServicesSubscriptionsNotSending.aspx</link>
      <pubDate>Mon, 09 Mar 2009 16:57:18 GMT</pubDate>
      <description>&lt;p&gt;
SSRS - Reporting Services Subscriptions not sending
&lt;/p&gt;
&lt;p&gt;
Recently we ran into an issue with a Reporting Service Instance that was not sending
any email subscriptions.&amp;nbsp; We could find no errors or obvious issues.&amp;nbsp; Of
course a quick reboot solved the problem, but only temporarily, the next day, the
issue was right back.&amp;nbsp; Time to call out for help, Microsoft Support.
&lt;/p&gt;
&lt;p&gt;
Microsoft Support found the problem and provided us some useful scripts.&amp;nbsp; Basically
the issue was that someone had created a snapshot, that ran every night.&amp;nbsp; The
snapshot ran for 12+ hours, causing performance issues and other problems with all
other subscriptions.&amp;nbsp; This is a "shared" reporting service instance, set up for
several application groups.&amp;nbsp; The scripts from Microsoft were quite useful, i've
listed them here, all of them are in my &lt;a href="http://www.lifeasbob.com/code/ScriptVault.aspx"&gt;Script
Vault&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
I found the scripts very useful, as it addresses one of my continual issues, which
is addressing capacity in shared environments.&amp;nbsp; For our Shared Reporting Service
Environment, we create a Directory / Folder for each group and tweak permissions to
keep each application separated, than we turn over full permissions to each sub-folder
to the application group.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Obviously the danger here is that someone can create a poorly performing report that
effects the entire environment.&amp;nbsp; The scripts included below can help identify
which reports run the longest.&amp;nbsp; We then modified this query a bit more to roll-up
the report times, by sub-directory, so we can determine which application is using
the most capacity in the environment.&amp;nbsp; We can then engage this group to optimize
their reports or began capacity planning to build them a dedicated environment.
&lt;/p&gt;
&lt;p&gt;
Here is a script listing of what I added to the &lt;a href="http://www.lifeasbob.com/code/ScriptVault.aspx"&gt;Script
Vault&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
1.&amp;nbsp; Find What User runs What Report - (Rpt Svc - Who Runs What)&lt;br&gt;
2.&amp;nbsp; Find what subscriptions have been run and when - (Rpt Svc - Subscr Run When)&lt;br&gt;
3.&amp;nbsp; Find what SQL Agent Schedule goes with what Report (Rpt Svc - SQL Agent to
Report)&lt;br&gt;
4.&amp;nbsp; Average Report RunTime - (Rpt Svc - Avg Rpt Runtime)&lt;br&gt;
5.&amp;nbsp; Average Report RunTime Per Parent Folder - (Rpt Svc - Avg RunTime Pnt Fld)
&lt;/p&gt;
&lt;p&gt;
We then used the last two queries to develop a Reporting Services reports that is
available to the administrators of each directory, so they can manage their own performance
and capacity, thanks to Tom Reeves,&amp;nbsp; for developing the last two.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=fddeead4-8590-47f0-95a8-5c29879d4105" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,fddeead4-8590-47f0-95a8-5c29879d4105.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / Reporting Services</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=1ad50591-6863-4cbf-9a89-7f54d8797714</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,1ad50591-6863-4cbf-9a89-7f54d8797714.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,1ad50591-6863-4cbf-9a89-7f54d8797714.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=1ad50591-6863-4cbf-9a89-7f54d8797714</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Not sure if I just work for the most screwed up company in the world, or if I've just
had a long run where I only seem to work for screwed up companies.  Maybe i'm
drawn to them in some sort technology sociopath mental illness issue.  I was
once told that, ""People with Mental Illness Enrich Our Lives".   If the
same applies to a particular companies technology, than i'm enriched a lot! 
To the problem...
</p>
        <p>
 
</p>
        <p>
The infinite wisdom of the powers that be of my company changed the domain\user login
from domain\{first initials}{lastname} to a "generic number".  I know there are
a lot of "smiths" and "guptas", so the original naming convention was not perfect
either, but it worked for 80% of the employees.  The generic number is very frustrating
for SQL Server DBA's.
</p>
        <p>
 
</p>
        <p>
The fun of verifying users for SOX Audits, just became a joy on par with cleaning
toilets and replacing sewer lines, no longer easy enough to just run a query to get
user's and permissions, now you need to translate the cryptic AD Login, so that management
can verify each user....hmmm...thankyou sir, may I have another?  Imagine looking
at sp_who2, or Activity monitor, or whatever query you use to view who is connected
to your sql server and seeing, {domain}\x111111 as the user who is running a table
scan against every table in the most important database you have, and the user
was even nice enough to put a table lock hint on the query, nice!  
</p>
        <p>
 
</p>
        <p>
Now go find x111111 so you can ring his bell, or revoke their access and maybe they'll
call you.  The x111111 is useless to you, at least the other AD login convention
was useful most of the time, now it's completely useless.  Not only does it frustrate
me on troubleshooting problems, but also adding new users.   Even though
we modified the ticket system to ask for the login, invariably a significant number
of tickets don't include the login name, and we have to bounce tickets around until
we can find the users new cryptic AD Login.
</p>
        <p>
 
</p>
        <p>
To resolve this I had to write a utility that queries active directory and looks up
the id of x111111 and returns their name.  I've included the two scripts (vbs
- so rename them), one does a lookup by name (so horkay returns a553542) or by id
(so a553542 returns Robert Horkay).  We also incorporated them into a web page,
so that we could quickly and easily run these queries against Active Directory - (don't
forget that your web.config will need to impersonate an identity so that you can query
active directory).  
</p>
        <p>
 
</p>
        <p>
Next I'm going to have to write a custom version of the Activity Monitor, that uses
the CLR to translate the cryptic Active Directory Login to a usable name, so that
we don't have to bounce between management studio and a web page.
</p>
        <p>
 
</p>
VBS Scripts (ensure to rename the txt to vbs).<br /><a href="http://www.lifeasbob.com/content/binary/FindbyLogin.txt">FindbyLogin.txt
(1.58 KB)</a><br /><a href="http://www.lifeasbob.com/content/binary/FindByName.txt">FindByName.txt (1.96
KB)</a><br />
Web Page (remove .txt and change extension to .aspx and .vb)<br /><a href="http://www.lifeasbob.com/content/binary/AD_Users_aspx.txt">AD_Users_aspx.txt
(3.68 KB)</a><br /><a href="http://www.lifeasbob.com/content/binary/AD_Users_aspx_vb.txt">AD_Users_aspx_vb.txt
(4.94 KB)</a><br />
Web.config line for impersonation so the web pages will run [probably other ways to
do this through the application pool etc, but this is how i did it].<br /><font color="#006400">&lt;identity impersonate="true" userName="domain\sql-svc-acct"
password="removed"/&gt;</font><img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=1ad50591-6863-4cbf-9a89-7f54d8797714" /></body>
      <title>Lookup active directory logins</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,1ad50591-6863-4cbf-9a89-7f54d8797714.aspx</guid>
      <link>http://www.lifeasbob.com/2009/03/05/LookupActiveDirectoryLogins.aspx</link>
      <pubDate>Thu, 05 Mar 2009 18:05:30 GMT</pubDate>
      <description>&lt;p&gt;
Not sure if I just work for the most screwed up company in the world, or if I've just
had a long run where I only seem to work for screwed up companies.&amp;nbsp; Maybe i'm
drawn to them in some sort technology sociopath mental illness issue.&amp;nbsp; I was
once told that, ""People with Mental Illness Enrich Our Lives".&amp;nbsp;&amp;nbsp; If&amp;nbsp;the
same applies to a particular companies technology, than i'm enriched a lot!&amp;nbsp;
To the problem...
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
The infinite wisdom of the powers that be of my company changed the domain\user login
from domain\{first initials}{lastname} to a "generic number".&amp;nbsp; I know there are
a lot of "smiths" and "guptas", so the original naming convention was not perfect
either, but it worked for 80% of the employees.&amp;nbsp; The generic number is very frustrating
for SQL Server DBA's.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
The fun of verifying users for SOX Audits, just became a joy on par with cleaning
toilets and replacing sewer lines, no longer easy enough to just run a query to get
user's and permissions, now you need to translate the cryptic AD Login, so that management
can verify each user....hmmm...thankyou sir, may I have another?&amp;nbsp; Imagine looking
at sp_who2, or Activity monitor, or whatever query you use to view who is connected
to your sql server and seeing, {domain}\x111111 as the user who is running a table
scan against every table in the most important database you have, and&amp;nbsp;the user
was even nice enough to put a&amp;nbsp;table lock hint on the query, nice!&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Now go find x111111 so you can ring his bell, or revoke their access and maybe they'll
call you.&amp;nbsp; The x111111 is useless to you, at least the other AD login convention
was useful most of the time, now it's completely useless.&amp;nbsp; Not only does it frustrate
me on troubleshooting problems, but also adding new users.&amp;nbsp;&amp;nbsp; Even though
we modified the ticket system to ask for the login, invariably a significant number
of tickets don't include the login name, and we have to bounce tickets around until
we can find the users new cryptic AD Login.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
To resolve this I had to write a utility that queries active directory and looks up
the id of x111111 and returns their name.&amp;nbsp; I've included the two scripts (vbs
- so rename them), one does a lookup by name (so horkay returns a553542) or by id
(so a553542 returns Robert Horkay).&amp;nbsp; We also incorporated them into a web page,
so that we could quickly and easily run these queries against Active Directory - (don't
forget that your web.config will need to impersonate an identity so that you can query
active directory).&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Next I'm going to have to write a custom version of the Activity Monitor, that uses
the CLR to translate the cryptic Active Directory Login to a usable name, so that
we don't have to bounce between management studio and a web page.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
VBS Scripts (ensure to rename the txt to vbs).&lt;br&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/FindbyLogin.txt"&gt;FindbyLogin.txt
(1.58 KB)&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/FindByName.txt"&gt;FindByName.txt (1.96
KB)&lt;/a&gt;
&lt;br&gt;
Web Page (remove .txt and change extension to .aspx and .vb)&lt;br&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/AD_Users_aspx.txt"&gt;AD_Users_aspx.txt
(3.68 KB)&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.lifeasbob.com/content/binary/AD_Users_aspx_vb.txt"&gt;AD_Users_aspx_vb.txt
(4.94 KB)&lt;/a&gt;
&lt;br&gt;
Web.config line for impersonation so the web pages will run [probably other ways to
do this through the application pool etc, but this is how i did it].&lt;br&gt;
&lt;font color=#006400&gt;&amp;lt;identity impersonate="true" userName="domain\sql-svc-acct"
password="removed"/&amp;gt;&lt;/font&gt;&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=1ad50591-6863-4cbf-9a89-7f54d8797714" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,1ad50591-6863-4cbf-9a89-7f54d8797714.aspx</comments>
      <category>General Technology</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=6f079b42-6cb9-4df1-87ca-4c8ab33bbe9d</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,6f079b42-6cb9-4df1-87ca-4c8ab33bbe9d.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,6f079b42-6cb9-4df1-87ca-4c8ab33bbe9d.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=6f079b42-6cb9-4df1-87ca-4c8ab33bbe9d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Trouble shooting performance issues is one of the real differences between an operational
DBA (what we used to call Jr. DBA's) and a Sr. DBA.    
</p>
        <p>
Even with all the new tools, there is always that support call....It's been working
fine for the past 5 months, and today the application is performing poorly, and of
course it's a database issue.  At this point i'm usually biting my lip and silently
protesting, but often they are right, so it's time to dig into it.
</p>
        <p>
What's the error ?  <font color="#ff0000">Answer:  We don't know</font></p>
        <p>
What's the issue ? <font color="#ff0000">Answer:  We don't know, but it's slow.</font></p>
        <p>
These issues are particularly troublesome.  Poorly written error handlers in
the application, code developed by off-site vendors that support personnel don't understand,
we've all seen the issues...AND now it's your job to fix it! 
</p>
        <p>
We have so many more tools now with SQL Server 2005 and 2008, that it becomes important
to know which tool to use when, so the problem can be solved quickly.  I even
have a PDF document, "Troubleshooting SQL Server 2005/2008 Query Performance/Scalability
Issues" that we used our plotter printer on 3x4 paper just to help.
</p>
        <p>
I start in with profiler, as I want to try and see if there are any client side errors,
since it seems that the applicaiton is not performing any error handling or trapping
any errors.  Sure enough we find an error on violation of a unique index, PUNT,
back to the application team for more analysis; but why after 5 months would this
just now come up (of course there have been no changes.)  
</p>
        <p>
We finally find an issue with a stored procedure that seems to be hanging or timing
out and then progressing to the next step in the application causing the unique index
error, since we aren't trapping for errors on the client side and profiler can't find
client side time-outs, it was particulary bothersome to find.  Even the procedure
seems ok when executed through management studio and returns in sub-seconds, but something
happens when the application runs it (still haven't figured this out).
</p>
        <p>
Finally determine there is a degree of parallelism issue (DOP), which we found through
analyzing the wait types.  The wait types was not on our first list of items
to check.  Changing the DOP from 0 to 2, immediatly resolved the issue and dropped
the CPU from 40% to 15%.  Utlimately some indexing would help the query, but
we can't build indexes on the fly as the load is so heavy that even a table lock for
10-15 seconds would generate 100's of support calls; DOP can be done on the fly with
little effect.
</p>
        <p>
Analysis of the query plans shows that as the data grew the DOP changed the query
plan and began to cause issues with a wait type of CXPACKET.  
</p>
        <p>
This is why we still need real DBA's.
</p>
        <p>
 
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=6f079b42-6cb9-4df1-87ca-4c8ab33bbe9d" />
      </body>
      <title>Why we need Real DBA's</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,6f079b42-6cb9-4df1-87ca-4c8ab33bbe9d.aspx</guid>
      <link>http://www.lifeasbob.com/2009/02/11/WhyWeNeedRealDBAs.aspx</link>
      <pubDate>Wed, 11 Feb 2009 21:45:48 GMT</pubDate>
      <description>&lt;p&gt;
Trouble shooting performance issues is one of the real differences between an operational
DBA (what we used to call Jr. DBA's) and a Sr. DBA.&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Even with all the new tools, there is always that support call....It's been working
fine for the past 5 months, and today the application is performing poorly, and of
course it's a database issue.&amp;nbsp; At this point i'm usually biting my lip and silently
protesting, but often they are right, so it's time to dig into it.
&lt;/p&gt;
&lt;p&gt;
What's the error ?&amp;nbsp; &lt;font color=#ff0000&gt;Answer:&amp;nbsp; We don't know&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
What's the issue ? &lt;font color=#ff0000&gt;Answer:&amp;nbsp; We don't know, but it's slow.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
These issues are particularly troublesome.&amp;nbsp; Poorly written error handlers in
the application, code developed by off-site vendors that support personnel don't understand,
we've all seen the issues...AND now it's your job to fix it! 
&lt;/p&gt;
&lt;p&gt;
We have so many more tools now with SQL Server 2005 and 2008, that it becomes important
to know which tool to use when, so the problem can be solved quickly.&amp;nbsp; I even
have a PDF document, "Troubleshooting SQL Server 2005/2008 Query Performance/Scalability
Issues" that we used our plotter printer on&amp;nbsp;3x4 paper just to help.
&lt;/p&gt;
&lt;p&gt;
I start in with profiler, as I want to try and see if there are any client side errors,
since it seems that the applicaiton is not performing any error handling or trapping
any errors.&amp;nbsp; Sure enough we find an error on violation of a unique index, PUNT,
back to the application team for more analysis; but why after 5 months would this
just now come up (of course there have been no changes.)&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
We finally find an issue with a stored procedure that seems to be hanging or timing
out and then progressing to the next step in the application causing the unique index
error, since we aren't trapping for errors on the client side and profiler can't find
client side time-outs, it was particulary bothersome to find.&amp;nbsp; Even the procedure
seems ok when executed through management studio and returns in sub-seconds, but something
happens when the application runs it (still haven't figured this out).
&lt;/p&gt;
&lt;p&gt;
Finally determine there is a degree of parallelism issue (DOP), which we found through
analyzing the wait types.&amp;nbsp; The wait types was not on our first list of items
to check.&amp;nbsp; Changing the DOP from 0 to 2, immediatly resolved the issue and dropped
the CPU from 40% to 15%.&amp;nbsp; Utlimately some indexing would help the query, but
we can't build indexes on the fly as the load is so heavy that even a table lock for
10-15 seconds would generate 100's of support calls; DOP can be done on the fly with
little effect.
&lt;/p&gt;
&lt;p&gt;
Analysis of the query plans shows that as the data grew the DOP changed the query
plan and began to cause issues with a wait type of CXPACKET.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
This is why we still need real DBA's.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=6f079b42-6cb9-4df1-87ca-4c8ab33bbe9d" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,6f079b42-6cb9-4df1-87ca-4c8ab33bbe9d.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=b5a1dd31-c2bd-4df2-9037-b4733e16586a</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,b5a1dd31-c2bd-4df2-9037-b4733e16586a.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,b5a1dd31-c2bd-4df2-9037-b4733e16586a.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b5a1dd31-c2bd-4df2-9037-b4733e16586a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Most requests we can find a way to solve easily, sql server 2005 finally began to
give us great insight into what was happenning with DMV's, 2008 expanded on this.... 
But every so often those requests come along that I still can't solve.
</p>
        <p>
Application team is requesting to know the execution count of a particular stored
procedure by hour, from 3 days ago !
</p>
        <p>
I have no solution.
</p>
        <p>
It may be possible to "tap" the default trace and get a count of the procedure and
roll it into a table, which may help going forward, but not for the past.  The
volume of data generated could be quite large, as this particular server is performing
5,000 tps on average.
</p>
        <p>
It was explained to me that they are trying to figure out this count as it represents
a session timeout from the login page, and that specific counts from the iis log on
the hits to the logon page do not accurately reflect those that had a session timeout
vs. those that logged on again, hence the desire to know the counts by hour of the
stored procedure used to login.
</p>
        <p>
No help from the DBA on that one, any suggestions are welcomed...
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b5a1dd31-c2bd-4df2-9037-b4733e16586a" />
      </body>
      <title>Execution Count of Procedure by Hour ?</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,b5a1dd31-c2bd-4df2-9037-b4733e16586a.aspx</guid>
      <link>http://www.lifeasbob.com/2009/02/02/ExecutionCountOfProcedureByHour.aspx</link>
      <pubDate>Mon, 02 Feb 2009 20:19:53 GMT</pubDate>
      <description>&lt;p&gt;
Most requests we can find a way to solve easily, sql server 2005 finally began to
give us great insight into what was happenning with DMV's, 2008 expanded on this....&amp;nbsp;
But every so often those requests come along that I still can't solve.
&lt;/p&gt;
&lt;p&gt;
Application team is requesting to know the execution count of a particular stored
procedure by hour, from 3 days ago !
&lt;/p&gt;
&lt;p&gt;
I have no solution.
&lt;/p&gt;
&lt;p&gt;
It may be possible to "tap" the default trace and get a count of the procedure and
roll it into a table, which may help going forward, but not for the past.&amp;nbsp; The
volume of data generated could be quite large, as this particular server is performing
5,000 tps on average.
&lt;/p&gt;
&lt;p&gt;
It was explained to me that they are trying to figure out this count as it represents
a session timeout from the login page, and that specific counts from the iis log on
the hits to the logon page do not accurately reflect those that had a session timeout
vs. those that logged on again, hence the desire to know the counts by hour of the
stored procedure used to login.
&lt;/p&gt;
&lt;p&gt;
No help from the DBA on that one, any suggestions are welcomed...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b5a1dd31-c2bd-4df2-9037-b4733e16586a" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,b5a1dd31-c2bd-4df2-9037-b4733e16586a.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=87682799-fc1a-4469-9456-9174956cf175</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,87682799-fc1a-4469-9456-9174956cf175.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,87682799-fc1a-4469-9456-9174956cf175.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=87682799-fc1a-4469-9456-9174956cf175</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Mountpoints are fun and easily can solve issues with more than 26 drive letters (don't
ask), but recently we ran into several issues with monitoring the mountpoints. 
In particular we have a report that is based on past growth history of a database,
disk size and disk free space, and it estimates when a drive will be at 80% capacity
and when it will fill up.   With 100's of database servers this report can
prioritize and pro-actively identify which server will encounter a problem next and
when.  Of course the limitation is in bold, <strong>drive.</strong>  
</p>
        <p>
Report Example:
</p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/DriveSpace.JPG" border="0" />
        </p>
        <p>
When we began using Mountpoints the report was not as accurate and it needed to be
adjusted.  We have some internal services that collect the drive size and
free space to a central DBA database.  Review of this monitoring reveals it is
using a WMI Query, a quick review of the WMI SDK shows another call that will pick
up mountpoints, Select * from WIN32_Volume.  Life is good.
</p>
        <p>
Not so quick after hurdling from drives to drives and mountpoints, a problem was revealed
where the WMI call failed on two servers.  <font color="#ff1493">Englightenment</font>. 
These two sql servers have also been giving us odd issues with SQL Management Studio
(SSMS), which is highly dependent on WMI, SMO, .NET and probably some other stuff. 
Fixing WMI on these two servers fixed the issue and corrected the SSMS issues.
</p>
        <p>
Steps to fix WMI (Thanks to our Windows Team for the steps below):
</p>
        <div dir="ltr" align="left">
          <span class="197175017-29012009">
            <font face="Arial" color="#0000ff" size="2">1.
net stop winmgmt<br />
2. del %SystemRoot%\System32\WBEM\Repository /s /q</font>
          </span>
        </div>
        <div dir="ltr" align="left">
          <span class="197175017-29012009">
            <font face="Arial" color="#0000ff" size="2">
            </font>
          </span> 
</div>
        <div dir="ltr" align="left">
          <span class="197175017-29012009">
            <font face="Arial" color="#0000ff" size="2">If
that does not work, then I</font>
          </span>
        </div>
        <div dir="ltr" align="left">
          <span class="197175017-29012009">
            <font face="Arial" color="#0000ff" size="2">
            </font>
          </span> 
</div>
        <div dir="ltr" align="left">
          <span class="197175017-29012009">
            <font face="Arial" color="#0000ff" size="2">1. remove
all rights from %system32%\wbem\Repository\FS</font>
          </span>
        </div>
        <div dir="ltr" align="left">
          <span class="197175017-29012009">
            <font face="Arial" color="#0000ff" size="2">2. disable
the "Windows Management Instrumentation" service</font>
          </span>
        </div>
        <div dir="ltr" align="left">
          <span class="197175017-29012009">
            <font face="Arial" color="#0000ff" size="2">3.
reboot</font>
          </span>
        </div>
        <div dir="ltr" align="left">
          <span class="197175017-29012009">
            <font face="Arial" color="#0000ff" size="2">4.
add rights back to %system32%\wbem\Repository\FS</font>
          </span>
        </div>
        <div dir="ltr" align="left">
          <span class="197175017-29012009">
            <font face="Arial" color="#0000ff" size="2">5.
delete the contents of %system32%\wbem\Repository\FS</font>
          </span>
        </div>
        <div dir="ltr" align="left">
          <span class="197175017-29012009">
            <font face="Arial" color="#0000ff" size="2">6. set
the "Windows Management Instrumentation" service back to Automatic</font>
          </span>
        </div>
        <div dir="ltr" align="left">
          <span class="197175017-29012009">
            <font face="Arial" color="#0000ff" size="2">7.
start the "Windows Management Instrumentation" service</font>
          </span>
        </div>
        <p>
Here is a short quick Visual Basic Script (VBS) you can save to a text file with a
.VBS Extension to see the call to WMI to check disk space for mount points or drives. 
It filters out certain mount points for Polyserve as we don't want to monitor those,
also for some reason z:\ is mapped in our environment and this wmi script pulls that
with nulls, so you need to test for those.  You can also use Powershell, but
it is using a wmi call underneath the hood as well, and we have yet to install powershell
on all our servers.
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span> DiskSet <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">GetObject</span>(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"winmgmts:{impersonationLevel=impersonate}!//BCCMAPP02"</span>)_
    .ExecQuery(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Select
* from Win32_Volume"</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">For</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Each</span> objItem <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">In</span> DiskSet
    Ignore <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">False</span>     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">len</span>(objitem.name)
&gt;= 51 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">then</span>         <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">If</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">UCase</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Left</span>(objitem.name,51)) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> _
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">UCase</span>(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"C:\Program
Files\PolyServe\MatrixServer\conf\mounts"</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Then</span>             Ignore <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">True</span>         <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">If</span>     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">If</span>     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">If</span> Ignore <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">False</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Then</span>         <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">msgbox</span>(objItem.Name
&amp; vbCrLf &amp; <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Percent
Free = "</span> &amp; _             <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">round</span>((objItem.freespace/objItem.Capacity)*100,2)
&amp; _             <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"
= "</span> &amp; objItem.freeSpace &amp; <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"
= "</span> &amp; objItem.Capacity)     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">If</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Next</span></span>
        </pre>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=87682799-fc1a-4469-9456-9174956cf175" />
      </body>
      <title>WMI Mountpoints and enlightenment </title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,87682799-fc1a-4469-9456-9174956cf175.aspx</guid>
      <link>http://www.lifeasbob.com/2009/01/29/WMIMountpointsAndEnlightenment.aspx</link>
      <pubDate>Thu, 29 Jan 2009 18:33:07 GMT</pubDate>
      <description>&lt;p&gt;
Mountpoints are fun and easily can solve issues with more than 26 drive letters (don't
ask), but recently we ran into several issues with&amp;nbsp;monitoring the mountpoints.&amp;nbsp;
In particular we have a report that is based on past growth history of a database,
disk size and disk free space, and it estimates when a drive will be at 80% capacity
and when it will fill up.&amp;nbsp;&amp;nbsp; With 100's of database servers this report can
prioritize and pro-actively identify which server will encounter a problem next and
when.&amp;nbsp; Of course the limitation is in bold, &lt;strong&gt;drive.&lt;/strong&gt;&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Report Example:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/DriveSpace.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
When we began using Mountpoints the report was not as accurate and it needed to be
adjusted.&amp;nbsp; We have some internal services that&amp;nbsp;collect the drive size and
free space to a central DBA database.&amp;nbsp; Review of this monitoring reveals it is
using a WMI Query, a quick review of the WMI SDK shows another call that will pick
up mountpoints, Select * from WIN32_Volume.&amp;nbsp; Life is good.
&lt;/p&gt;
&lt;p&gt;
Not so quick after hurdling from drives to drives and mountpoints, a problem was revealed
where the WMI call failed on two servers.&amp;nbsp; &lt;font color=#ff1493&gt;Englightenment&lt;/font&gt;.&amp;nbsp;
These two sql servers have also been giving us odd issues with SQL Management Studio
(SSMS), which is highly dependent on WMI, SMO, .NET and probably some other stuff.&amp;nbsp;
Fixing WMI on these two servers fixed the issue and corrected the SSMS issues.
&lt;/p&gt;
&lt;p&gt;
Steps to fix WMI (Thanks to our Windows Team for the steps below):
&lt;/p&gt;
&lt;div dir=ltr align=left&gt;&lt;span class=197175017-29012009&gt;&lt;font face=Arial color=#0000ff size=2&gt;1.
net stop winmgmt&lt;br&gt;
2. del %SystemRoot%\System32\WBEM\Repository /s /q&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div dir=ltr align=left&gt;&lt;span class=197175017-29012009&gt;&lt;font face=Arial color=#0000ff size=2&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div dir=ltr align=left&gt;&lt;span class=197175017-29012009&gt;&lt;font face=Arial color=#0000ff size=2&gt;If
that does not work, then I&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div dir=ltr align=left&gt;&lt;span class=197175017-29012009&gt;&lt;font face=Arial color=#0000ff size=2&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div dir=ltr align=left&gt;&lt;span class=197175017-29012009&gt;&lt;font face=Arial color=#0000ff size=2&gt;1.&amp;nbsp;remove
all rights from %system32%\wbem\Repository\FS&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div dir=ltr align=left&gt;&lt;span class=197175017-29012009&gt;&lt;font face=Arial color=#0000ff size=2&gt;2.&amp;nbsp;disable
the "Windows Management Instrumentation" service&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div dir=ltr align=left&gt;&lt;span class=197175017-29012009&gt;&lt;font face=Arial color=#0000ff size=2&gt;3.
reboot&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div dir=ltr align=left&gt;&lt;span class=197175017-29012009&gt;&lt;font face=Arial color=#0000ff size=2&gt;4.
add rights back to %system32%\wbem\Repository\FS&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div dir=ltr align=left&gt;&lt;span class=197175017-29012009&gt;&lt;font face=Arial color=#0000ff size=2&gt;5.
delete the contents of %system32%\wbem\Repository\FS&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div dir=ltr align=left&gt;&lt;span class=197175017-29012009&gt;&lt;font face=Arial color=#0000ff size=2&gt;6.&amp;nbsp;set
the "Windows Management Instrumentation" service back to Automatic&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div dir=ltr align=left&gt;&lt;span class=197175017-29012009&gt;&lt;font face=Arial color=#0000ff size=2&gt;7.
start the "Windows Management Instrumentation" service&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;p&gt;
Here is a short quick Visual Basic Script (VBS) you can save to a text file with a
.VBS Extension to see the call to WMI to check disk space for mount points or drives.&amp;nbsp;
It filters out certain mount points for Polyserve as we don't want to monitor those,
also for some reason z:\ is mapped in our environment and this wmi script pulls that
with nulls, so you need to test for those.&amp;nbsp; You can also use Powershell, but
it is using a wmi call underneath the hood as well, and we have yet to install powershell
on all our servers.
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Set&lt;/span&gt; DiskSet &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;GetObject&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"winmgmts:{impersonationLevel=impersonate}!//BCCMAPP02"&lt;/span&gt;)_
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.ExecQuery(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Select
* from Win32_Volume"&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;For&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Each&lt;/span&gt; objItem &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;In&lt;/span&gt; DiskSet
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ignore &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;False&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;if&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;len&lt;/span&gt;(objitem.name)
&amp;gt;= 51 &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;then&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;If&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;UCase&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Left&lt;/span&gt;(objitem.name,51)) &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; _
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;UCase&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"C:\Program
Files\PolyServe\MatrixServer\conf\mounts"&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Then&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ignore &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;True&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;End&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;If&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;End&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;If&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;If&lt;/span&gt; Ignore &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;False&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Then&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;msgbox&lt;/span&gt;(objItem.Name
&amp;amp; vbCrLf &amp;amp; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Percent
Free = "&lt;/span&gt; &amp;amp; _ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;round&lt;/span&gt;((objItem.freespace/objItem.Capacity)*100,2)
&amp;amp; _ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"
= "&lt;/span&gt; &amp;amp; objItem.freeSpace &amp;amp; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"
= "&lt;/span&gt; &amp;amp; objItem.Capacity) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;End&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;If&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Next&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=87682799-fc1a-4469-9456-9174956cf175" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,87682799-fc1a-4469-9456-9174956cf175.aspx</comments>
      <category>General Technology</category>
      <category>Polyserve</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=982fb42e-f0c9-4c05-9b02-0a554d5324a4</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,982fb42e-f0c9-4c05-9b02-0a554d5324a4.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,982fb42e-f0c9-4c05-9b02-0a554d5324a4.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=982fb42e-f0c9-4c05-9b02-0a554d5324a4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The server could not load DCOM. [SQLSTATE 42000] (Error 7404).  The step failed.<br /></p>
        <p>
Began receiving this error from failed sql server jobs on a sql server 2000 box and
a windows 2000 box, after a reboot.
</p>
        <p>
We didn't spend too much time researching the issue, as we were still in a maintenance
window, so we performed another reboot and things worked fine.
</p>
        <p>
I've seen many dcom errors over the years, but not this particular one from SQL Server,
most likely com+ or ms dtc sub-systems (services) did not start or failed to start
on the reboot.  There were no system or event log entries that were immediately
helpful, though there were other odd entries that seemed related to dcom not working:
</p>
        <font size="1">
          <p>
The server {73E709EA-5D93-4B2E-BBB0-99B7938DA9E4} did not register with DCOM within
the required timeout.
</p>
          <font size="1">
            <p>
The NetBackup SAN Client Fibre Transport Service service failed to start due to the
following error: 
</p>
            <p>
The service did not respond to the start or control request in a timely fashion. 
</p>
            <font size="1">
              <p>
Timeout (30000 milliseconds) waiting for the NetBackup SAN Client Fibre Transport
Service service to connect.
</p>
              <font size="1">
                <p>
BMSS failed to bind to a network interface card (NIC) because none was specified in
the registry. Check the registry to make sure the network bind policy is correct.
</p>
              </font>
            </font>
          </font>
        </font>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=982fb42e-f0c9-4c05-9b02-0a554d5324a4" />
      </body>
      <title>DCOM Error 7404</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,982fb42e-f0c9-4c05-9b02-0a554d5324a4.aspx</guid>
      <link>http://www.lifeasbob.com/2009/01/19/DCOMError7404.aspx</link>
      <pubDate>Mon, 19 Jan 2009 14:50:57 GMT</pubDate>
      <description>&lt;p&gt;
The server could not load DCOM. [SQLSTATE 42000] (Error 7404).&amp;nbsp; The step failed.&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
Began receiving this error from failed sql server jobs on a sql server 2000 box and
a windows 2000 box, after a reboot.
&lt;/p&gt;
&lt;p&gt;
We didn't spend too much time researching the issue, as we were still in a maintenance
window, so we performed another reboot and things worked fine.
&lt;/p&gt;
&lt;p&gt;
I've seen many dcom errors over the years, but not this particular one from SQL Server,
most likely com+ or ms dtc sub-systems (services) did not start or failed to start
on the reboot.&amp;nbsp; There were no system or event log entries that were immediately
helpful, though there were other odd entries that seemed related to dcom not working:
&lt;/p&gt;
&lt;font size=1&gt; 
&lt;p&gt;
The server {73E709EA-5D93-4B2E-BBB0-99B7938DA9E4} did not register with DCOM within
the required timeout.
&lt;/p&gt;
&lt;font size=1&gt; 
&lt;p&gt;
The NetBackup SAN Client Fibre Transport Service service failed to start due to the
following error: 
&lt;/p&gt;
&lt;p&gt;
The service did not respond to the start or control request in a timely fashion. 
&lt;/p&gt;
&lt;font size=1&gt; 
&lt;p&gt;
Timeout (30000 milliseconds) waiting for the NetBackup SAN Client Fibre Transport
Service service to connect.
&lt;/p&gt;
&lt;font size=1&gt; 
&lt;p&gt;
BMSS failed to bind to a network interface card (NIC) because none was specified in
the registry. Check the registry to make sure the network bind policy is correct.
&lt;/p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=982fb42e-f0c9-4c05-9b02-0a554d5324a4" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,982fb42e-f0c9-4c05-9b02-0a554d5324a4.aspx</comments>
      <category>General Technology</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=f1d437b1-8dc0-422b-9b72-8ad3660c5888</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,f1d437b1-8dc0-422b-9b72-8ad3660c5888.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,f1d437b1-8dc0-422b-9b72-8ad3660c5888.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f1d437b1-8dc0-422b-9b72-8ad3660c5888</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Altering a table column from varchar to datetime is pretty straight-forward in the
SQL Server Management Studio (SSMS), until you look at the tsql generated.  For
many operations SSMS will generate a tsql script that will:
</p>
        <ul>
          <li>
create a temporary table 
</li>
          <li>
drop all the foreign keys 
</li>
          <li>
copy the data to the temporary table 
</li>
          <li>
create the new table with the correct data type 
</li>
          <li>
copy the data to the new table 
</li>
          <li>
drop the temporary table 
</li>
          <li>
add the foreign keys back</li>
        </ul>
        <p>
That is a lot of operations and on a really large table of millions of rows may take
a very long time to complete.
</p>
        <p>
SQLCricket comments that it is possible to change the options in SSMS to warn on table
operations, i think this is only in sql 2K8.
</p>
        <p>
SQLPuma comments that it is possible to change a varchar() to a datetime via tsql
with an alter table alter column command.
</p>
        <p>
In this particular case we were modifying a varchar(10) to a datetime.  All the
data was in a valid format.  The easiest method is to alter the column,
another method to complete this is to:
</p>
        <ul>
          <li>
rename the existing column (tmp_varchar etc) 
</li>
          <li>
add a new column with the correct name 
</li>
          <li>
update the new column (in batches if necessary) 
</li>
          <li>
drop the original column (now with a tmp_name)</li>
        </ul>
        <p>
This is very quick, much safer operation and is much "nicer" to the database log file. 
Example of tsql is below:
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CREATE</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">TABLE</span> dbo.testing
(test_id <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">bigint</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">NOT</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">NULL</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">IDENTITY</span> (1,
1) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">primary</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">key</span>,
some_dt <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">varchar</span>(10)
) GO <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> testing
(some_dt) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'2009-01-01'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> testing
(some_dt) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'2009-01-02'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> testing
(some_dt) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'2009-01-03'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> testing
(some_dt) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'2009-01-04'</span>)
go <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">EXECUTE</span> sp_rename <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'dbo.testing.some_dt'</span>,
    <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'Tmp_some_dt'</span>, <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'COLUMN'</span> GO <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Alter</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Table</span> testing <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Add</span> some_dt <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DateTime</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Default</span>(<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'1900-01-01'</span>) <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">NOT</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">NULL</span> GO <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Update</span> testing
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span> some_dt
= <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Convert</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DateTime</span>,Tmp_some_dt)
GO <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Alter</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Table</span> testing
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DROP</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Column</span> Tmp_some_dt
GO <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">select</span> * <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">from</span> testing
go <span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--drop
table testing</span></span>
        </pre>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=f1d437b1-8dc0-422b-9b72-8ad3660c5888" />
      </body>
      <title>Alter varchar to datetime</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,f1d437b1-8dc0-422b-9b72-8ad3660c5888.aspx</guid>
      <link>http://www.lifeasbob.com/2009/01/14/AlterVarcharToDatetime.aspx</link>
      <pubDate>Wed, 14 Jan 2009 15:13:13 GMT</pubDate>
      <description>&lt;p&gt;
Altering a table column from varchar to datetime is pretty straight-forward in the
SQL Server Management Studio (SSMS), until you look at the tsql generated.&amp;nbsp; For
many operations SSMS will generate a tsql script that will:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
create a temporary table 
&lt;li&gt;
drop all the foreign keys 
&lt;li&gt;
copy the data to the temporary table 
&lt;li&gt;
create the new table with the correct data type 
&lt;li&gt;
copy the data to the new table 
&lt;li&gt;
drop the temporary table 
&lt;li&gt;
add the foreign keys back&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
That is a lot of operations and on a really large table of millions of rows may take
a very long time to complete.
&lt;/p&gt;
&lt;p&gt;
SQLCricket comments that it is possible to change the options in SSMS to warn on table
operations, i think this is only in sql 2K8.
&lt;/p&gt;
&lt;p&gt;
SQLPuma comments that it is possible to change a varchar() to a datetime via tsql
with an alter table alter column command.
&lt;/p&gt;
&lt;p&gt;
In this particular case we were modifying a varchar(10) to a datetime.&amp;nbsp; All the
data was in a valid format.&amp;nbsp;&amp;nbsp;The easiest method is to alter the column,
another&amp;nbsp;method to complete this is to:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
rename the existing column (tmp_varchar etc) 
&lt;li&gt;
add a new column with the correct name 
&lt;li&gt;
update the new column (in batches if necessary) 
&lt;li&gt;
drop the original column (now with a tmp_name)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
This is very quick, much safer operation and is much "nicer" to the database log file.&amp;nbsp;
Example of tsql is below:
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CREATE&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;TABLE&lt;/span&gt; dbo.testing
(test_id &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;bigint&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;NOT&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;NULL&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;IDENTITY&lt;/span&gt; (1,
1) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;primary&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;key&lt;/span&gt;,
some_dt &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;varchar&lt;/span&gt;(10)
) GO &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; testing
(some_dt) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'2009-01-01'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; testing
(some_dt) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'2009-01-02'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; testing
(some_dt) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'2009-01-03'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; testing
(some_dt) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'2009-01-04'&lt;/span&gt;)
go &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;EXECUTE&lt;/span&gt; sp_rename &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'dbo.testing.some_dt'&lt;/span&gt;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'Tmp_some_dt'&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'COLUMN'&lt;/span&gt; GO &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Alter&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Table&lt;/span&gt; testing &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Add&lt;/span&gt; some_dt &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DateTime&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Default&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'1900-01-01'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;NOT&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;NULL&lt;/span&gt; GO &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Update&lt;/span&gt; testing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Set&lt;/span&gt; some_dt
= &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Convert&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DateTime&lt;/span&gt;,Tmp_some_dt)
GO &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Alter&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Table&lt;/span&gt; testing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DROP&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Column&lt;/span&gt; Tmp_some_dt
GO &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;select&lt;/span&gt; * &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;from&lt;/span&gt; testing
go &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--drop
table testing&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=f1d437b1-8dc0-422b-9b72-8ad3660c5888" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,f1d437b1-8dc0-422b-9b72-8ad3660c5888.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / SSMS</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=d5cec18d-1c8a-4d84-b3f3-f3d1e87de413</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,d5cec18d-1c8a-4d84-b3f3-f3d1e87de413.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,d5cec18d-1c8a-4d84-b3f3-f3d1e87de413.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d5cec18d-1c8a-4d84-b3f3-f3d1e87de413</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I twisted my head around a select statement that wasn't returning what I wanted. 
Eventually I focused in on the column list, that had column names with spaces, so
it required using brackets [].  These brackets when mixed in the column list
can lead to tsql parsing that is not expected.  In this case I mixed some columns
with brackets and some without, ultimately leaving a comma off.
</p>
        <p>
You'd expect the tsql to not compile, but it does and runs with no errors.  Once
tsql encounters a column list with brackets, it parses based off the brackets and
commas ignoring the additional field i wanted to include in the select list..
</p>
        <p>
grrrr...
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <hr />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">create</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">table</span> #testTable
    (tableid <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">identity</span>(1,1) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">primary</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">key</span>,
        [login name] <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">varchar</span>(20),
        [is_password_validation] <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span>,
        [is_password_expiration] <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span>,
        [login type] <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">varchar</span>(20)) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> #testTable
([login name],[is_password_validation],     [is_password_expiration],[login
type] ) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'User
1'</span>,0,0,<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'AD'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> #testTable
([login name],[is_password_validation],     [is_password_expiration],[login
type] ) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'User
2'</span>,0,0,<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'AD'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> #testTable
([login name],[is_password_validation],     [is_password_expiration],[login
type] ) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'User
3'</span>,0,0,<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'AD'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> #testTable
([login name],[is_password_validation],     [is_password_expiration],[login
type] ) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'User
4'</span>,1,1,<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'SQL'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> #testTable
([login name],[is_password_validation],     [is_password_expiration],[login
type] ) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'User
5'</span>,0,1,<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'SQL'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">select</span> * <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">from</span> #testTable <span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
good</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">select</span> [login
name],     is_password_validation <span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
NOTICE THE MISSING COMMA</span>     [login type]     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">From</span> #testTable</span>
        </pre>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=d5cec18d-1c8a-4d84-b3f3-f3d1e87de413" />
      </body>
      <title>Mixing brackets with column list</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,d5cec18d-1c8a-4d84-b3f3-f3d1e87de413.aspx</guid>
      <link>http://www.lifeasbob.com/2009/01/06/MixingBracketsWithColumnList.aspx</link>
      <pubDate>Tue, 06 Jan 2009 21:33:54 GMT</pubDate>
      <description>&lt;p&gt;
I twisted my head around a select statement that wasn't returning what I wanted.&amp;nbsp;
Eventually I focused in on the column list, that had column names with spaces, so
it required using brackets [].&amp;nbsp; These brackets when mixed in the column list
can lead to tsql parsing that is not expected.&amp;nbsp; In this case I mixed some columns
with brackets and some without, ultimately leaving a comma off.
&lt;/p&gt;
&lt;p&gt;
You'd expect the tsql to not compile, but it does and runs with no errors.&amp;nbsp; Once
tsql encounters a column list with brackets, it parses based off the brackets and
commas ignoring the additional field i wanted to include in the select list..
&lt;/p&gt;
&lt;p&gt;
grrrr...
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;
&lt;hr&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;create&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;table&lt;/span&gt; #testTable
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(tableid &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;int&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;identity&lt;/span&gt;(1,1) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;primary&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;key&lt;/span&gt;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[login name] &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;varchar&lt;/span&gt;(20),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[is_password_validation] &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;int&lt;/span&gt;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[is_password_expiration] &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;int&lt;/span&gt;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[login type] &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;varchar&lt;/span&gt;(20)) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; #testTable
([login name],[is_password_validation], &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[is_password_expiration],[login
type] ) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'User
1'&lt;/span&gt;,0,0,&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'AD'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; #testTable
([login name],[is_password_validation], &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[is_password_expiration],[login
type] ) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'User
2'&lt;/span&gt;,0,0,&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'AD'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; #testTable
([login name],[is_password_validation], &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[is_password_expiration],[login
type] ) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'User
3'&lt;/span&gt;,0,0,&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'AD'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; #testTable
([login name],[is_password_validation], &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[is_password_expiration],[login
type] ) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'User
4'&lt;/span&gt;,1,1,&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'SQL'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; #testTable
([login name],[is_password_validation], &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[is_password_expiration],[login
type] ) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'User
5'&lt;/span&gt;,0,1,&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'SQL'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;select&lt;/span&gt; * &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;from&lt;/span&gt; #testTable &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
good&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;select&lt;/span&gt; [login
name], &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;is_password_validation &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
NOTICE THE MISSING COMMA&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[login type] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;From&lt;/span&gt; #testTable&lt;/span&gt;&lt;/pre&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=d5cec18d-1c8a-4d84-b3f3-f3d1e87de413" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,d5cec18d-1c8a-4d84-b3f3-f3d1e87de413.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=dedc2c5a-bea1-43a2-b65e-52f7f53206ac</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,dedc2c5a-bea1-43a2-b65e-52f7f53206ac.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,dedc2c5a-bea1-43a2-b65e-52f7f53206ac.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=dedc2c5a-bea1-43a2-b65e-52f7f53206ac</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <hr />
        </p>
        <p>
UPDATE - 01/29/2009 - I just received a solution to this issue, that does not require
a temp table, which was my wimpy solution, thanks to Shawn who left this great solution
in the comments:
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Select</span> * <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">From</span> #checkDates <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">where</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">convert</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">datetime</span>,<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">case</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">isdate</span>(rptDate) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">when</span> 1 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">then</span> rptDate <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">else</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">end</span>) <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Between</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/27/2009'</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">and</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/28/2009'</span></span>
        </pre>
        <p>
          <hr />
        </p>
        <p>
The isdate() function does not work properly (or at least as I expect it would) when
it is used inside a derived table or a Common Table Expression.  This is really
frustruating as it changes the way I think of derived tables and CTE's.  I always
assumed that the inner query or CTE was resolved first, but if you follow the TSQL
below, you can see that is not the case.
</p>
        <p>
This may affect other functions, isnumeric() or even custom functions, so test them
carefully.
</p>
        <p>
I was working on a report issue that was generating an invalid derived date from a
varchar, 02/29/2009.  Very simple to filter out, but due to the way the where
clause is resolved / short circuited in tsql, it was going to be necessary to use
a derived table or a CTE, but neither would work.  I ended up resorting to using
an additional temporary table (wimpy, wimpy), I don't like this solution and would
like to find one that does not require the temporary table.
</p>
        <p>
Here is the problem: 
<hr /></p>
        <p>
        </p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">create</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">table</span> #checkDates
    (chkDtId <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">identity</span>(1,1) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">primary</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">key</span>,
        rptDate <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">varchar</span>(10)) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> #checkDates
(rptDate) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/26/2009'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> #checkDates
(rptDate) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/27/2009'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> #checkDates
(rptDate) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/28/2009'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Insert</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> #checkDates
(rptDate) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">values</span> (<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/29/2009'</span>) <span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
This fails below with invalid date</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Select</span> *
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">From</span> #checkDates
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">where</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">convert</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">datetime</span>,rptDate) <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Between</span>         <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/27/2009'</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">and</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/28/2009'</span><span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
put the isdate function as part of where clause</span><span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
select statement still fails</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Select</span> *
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">From</span> #checkDates
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">where</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">isdate</span>(rptDate)
= 1 <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">and</span>         <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">convert</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">datetime</span>,rptDate) <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Between</span>         <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/27/2009'</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">and</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/28/2009'</span><span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
switch to a derived table, the thought being to</span><span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
remove the invalid dates from the inner select </span><span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
somehow in my mind i think the inner query should be resolved first,</span><span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
but this is not the case !</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Select</span> * <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">from</span>     ( <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Select</span> *
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">From</span> #checkDates
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">where</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">isdate</span>(rptDate)
= 1 ) x     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">where</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">convert</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">datetime</span>,rptDate) <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Between</span>         <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/27/2009'</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">and</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/28/2009'</span><span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
wimpy solution is to select the "good" records into </span><span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
a temp table and then perform the next select, yuck</span><span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
BUT IT WORKS</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Select</span> * <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">into</span> #InterimResults
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">From</span> #checkDates
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">where</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">isdate</span>(rptDate)
= 1 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Select</span> * <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">from</span> #InterimResults
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">where</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">convert</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">datetime</span>,rptDate) <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Between</span>         <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/27/2009'</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">and</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/28/2009'</span><span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--</span><span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--
CTE SOLUTION, DOES NOT WORK EITHER </span><span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">--</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WITH</span> goodDate_CTE <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> (
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Select</span> *
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">From</span> #checkDates
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">where</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">isdate</span>(rptDate)
= 1 ) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span> * <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> goodDate_CTE <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">where</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">convert</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">datetime</span>,rptDate) <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Between</span>         <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/27/2009'</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">and</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'02/28/2009'</span></span>
        </pre>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=dedc2c5a-bea1-43a2-b65e-52f7f53206ac" />
      </body>
      <title>isdate(), derived tables and CTE</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,dedc2c5a-bea1-43a2-b65e-52f7f53206ac.aspx</guid>
      <link>http://www.lifeasbob.com/2009/01/06/isdateDerivedTablesAndCTE.aspx</link>
      <pubDate>Tue, 06 Jan 2009 21:24:16 GMT</pubDate>
      <description>&lt;p&gt;
&lt;hr&gt;
&lt;/p&gt;
&lt;p&gt;
UPDATE - 01/29/2009 - I just received a solution to this issue, that does not require
a temp table, which was my wimpy solution, thanks to Shawn who left this great solution
in the comments:
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Select&lt;/span&gt; * &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;From&lt;/span&gt; #checkDates &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;where&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;convert&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;datetime&lt;/span&gt;,&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;case&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;isdate&lt;/span&gt;(rptDate) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;when&lt;/span&gt; 1 &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;then&lt;/span&gt; rptDate &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;else&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;null&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;end&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Between&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/27/2009'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;and&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/28/2009'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;hr&gt;
&lt;/p&gt;
&lt;p&gt;
The isdate() function does not work properly (or at least as I expect it would) when
it is used inside a derived table or a Common Table Expression.&amp;nbsp; This is really
frustruating as it changes the way I think of derived tables and CTE's.&amp;nbsp; I always
assumed that the inner query or CTE was resolved first, but if you follow the TSQL
below, you can see that is not the case.
&lt;/p&gt;
&lt;p&gt;
This may affect other functions, isnumeric() or even custom functions, so test them
carefully.
&lt;/p&gt;
&lt;p&gt;
I was working on a report issue that was generating an invalid derived date from a
varchar, 02/29/2009.&amp;nbsp; Very simple to filter out, but due to the way the where
clause is resolved / short circuited in tsql, it was going to be necessary to use
a derived table or a CTE, but neither would work.&amp;nbsp; I ended up resorting to using
an additional temporary table (wimpy, wimpy), I don't like this solution and would
like to find one that does not require the temporary table.
&lt;/p&gt;
&lt;p&gt;
Here is the problem: 
&lt;hr&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;create&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;table&lt;/span&gt; #checkDates
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(chkDtId &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;int&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;identity&lt;/span&gt;(1,1) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;primary&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;key&lt;/span&gt;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rptDate &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;varchar&lt;/span&gt;(10)) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; #checkDates
(rptDate) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/26/2009'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; #checkDates
(rptDate) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/27/2009'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; #checkDates
(rptDate) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/28/2009'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Insert&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; #checkDates
(rptDate) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;values&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/29/2009'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
This fails below with invalid date&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Select&lt;/span&gt; *
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;From&lt;/span&gt; #checkDates
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;where&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;convert&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;datetime&lt;/span&gt;,rptDate) &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Between&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/27/2009'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;and&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/28/2009'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
put the isdate function as part of where clause&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
select statement still fails&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Select&lt;/span&gt; *
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;From&lt;/span&gt; #checkDates
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;where&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;isdate&lt;/span&gt;(rptDate)
= 1 &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;and&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;convert&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;datetime&lt;/span&gt;,rptDate) &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Between&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/27/2009'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;and&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/28/2009'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
switch to a derived table, the thought being to&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
remove the invalid dates from the inner select &lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
somehow in my mind i think the inner query should be resolved first,&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
but this is not the case !&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Select&lt;/span&gt; * &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;from&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;( &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Select&lt;/span&gt; *
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;From&lt;/span&gt; #checkDates
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;where&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;isdate&lt;/span&gt;(rptDate)
= 1 ) x &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;where&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;convert&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;datetime&lt;/span&gt;,rptDate) &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Between&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/27/2009'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;and&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/28/2009'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
wimpy solution is to select the "good" records into &lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
a temp table and then perform the next select, yuck&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
BUT IT WORKS&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Select&lt;/span&gt; * &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;into&lt;/span&gt; #InterimResults
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;From&lt;/span&gt; #checkDates
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;where&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;isdate&lt;/span&gt;(rptDate)
= 1 &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Select&lt;/span&gt; * &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;from&lt;/span&gt; #InterimResults
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;where&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;convert&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;datetime&lt;/span&gt;,rptDate) &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Between&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/27/2009'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;and&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/28/2009'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--
CTE SOLUTION, DOES NOT WORK EITHER &lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: teal; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;--&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WITH&lt;/span&gt; goodDate_CTE &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; (
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Select&lt;/span&gt; *
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;From&lt;/span&gt; #checkDates
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;where&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;isdate&lt;/span&gt;(rptDate)
= 1 ) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; * &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; goodDate_CTE &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;where&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;convert&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;datetime&lt;/span&gt;,rptDate) &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Between&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/27/2009'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;and&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'02/28/2009'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=dedc2c5a-bea1-43a2-b65e-52f7f53206ac" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,dedc2c5a-bea1-43a2-b65e-52f7f53206ac.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=b90e2105-0f61-4980-85e5-f9a1130d0927</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,b90e2105-0f61-4980-85e5-f9a1130d0927.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,b90e2105-0f61-4980-85e5-f9a1130d0927.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b90e2105-0f61-4980-85e5-f9a1130d0927</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently ran into an issue with a linked server between sql server and an as400, using
the iSeries access driver via ODBC.  
</p>
        <p>
The linked server was not returning all the rows and it was not throwing any errors
either.
</p>
        <p>
          <hr />
        </p>
        <p>
        </p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/as400_countwrong.jpg" border="0" />
          <hr />
        </p>
        <p>
        </p>
        <p>
There is an advanced settings option on the iSeries as400 setup that needs to be "unchecked",
by default the option is checked and can lead to missing records.
</p>
        <p>
          <hr />
        </p>
        <p>
        </p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/as400_odbc1.jpg" border="0" />
          <hr />
        </p>
        <p>
        </p>
        <p>
Once it is unchecked, the query returns the correct counts or rows.
</p>
        <p>
          <hr />
        </p>
        <p>
        </p>
        <img src="http://www.lifeasbob.com/content/binary/as400_countgood.jpg" border="0" />
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b90e2105-0f61-4980-85e5-f9a1130d0927" />
      </body>
      <title>AS400 Linked Server not returning all rows</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,b90e2105-0f61-4980-85e5-f9a1130d0927.aspx</guid>
      <link>http://www.lifeasbob.com/2009/01/06/AS400LinkedServerNotReturningAllRows.aspx</link>
      <pubDate>Tue, 06 Jan 2009 16:00:00 GMT</pubDate>
      <description>&lt;p&gt;
Recently ran into an issue with a linked server between sql server and an as400, using
the iSeries access driver via ODBC.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
The linked server was not returning all the rows and it was not throwing any errors
either.
&lt;/p&gt;
&lt;p&gt;
&lt;hr&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/as400_countwrong.jpg" border=0&gt; 
&lt;hr&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
There is an advanced settings option on the iSeries as400 setup that needs to be "unchecked",
by default the option is checked and can lead to missing records.
&lt;/p&gt;
&lt;p&gt;
&lt;hr&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/as400_odbc1.jpg" border=0&gt; 
&lt;hr&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Once it is unchecked, the query returns the correct counts or rows.
&lt;/p&gt;
&lt;p&gt;
&lt;hr&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/as400_countgood.jpg" border=0&gt;&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b90e2105-0f61-4980-85e5-f9a1130d0927" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,b90e2105-0f61-4980-85e5-f9a1130d0927.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / Linked Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=9e6ca2e9-154f-4c76-af34-9bfc4d82b2fd</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,9e6ca2e9-154f-4c76-af34-9bfc4d82b2fd.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,9e6ca2e9-154f-4c76-af34-9bfc4d82b2fd.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=9e6ca2e9-154f-4c76-af34-9bfc4d82b2fd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is a custom report developed to list user permissions.
</p>
        <p>
Often DBA's need a consolidated list of permissions for a user, this custom report
does this.  Developed by Tom Reeves.
</p>
        <font size="2">
          <p>
Here's a report you can use to see permissions for a given user or role in <b>SQL2005. 
</b></p>
          <p>
Save the attached file to the following location. This is where custom reports have
to reside for them to work. Where you see "{user}" should be changed to whatever your
username is.
</p>
          <p>
C:\Documents and Settings\{user}\My Documents\SQL Server Management Studio\Custom
Reports 
</p>
          <p>
          </p>
        </font>
        <a href="http://www.lifeasbob.com/content/binary/User_Permissions.txt">User_Permissions.txt
- Right click and save with a RDL Extension. (37.25 KB)</a>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/permissions.JPG" border="0" />
        </p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=9e6ca2e9-154f-4c76-af34-9bfc4d82b2fd" />
      </body>
      <title>Report of User Permissions</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,9e6ca2e9-154f-4c76-af34-9bfc4d82b2fd.aspx</guid>
      <link>http://www.lifeasbob.com/2008/12/31/ReportOfUserPermissions.aspx</link>
      <pubDate>Wed, 31 Dec 2008 19:27:21 GMT</pubDate>
      <description>&lt;p&gt;
This is a custom report developed to list user permissions.
&lt;/p&gt;
&lt;p&gt;
Often DBA's need a consolidated list of permissions for a user, this custom report
does this.&amp;nbsp; Developed by Tom Reeves.
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
Here's a report you can use to see permissions for a given user or role in &lt;b&gt;SQL2005. 
&lt;/p&gt;
&gt; 
&lt;p&gt;
Save the attached file to the following location. This is where custom reports have
to reside for them to work. Where you see "{user}" should be changed to whatever your
username is.
&lt;/p&gt;
&lt;p&gt;
C:\Documents and Settings\{user}\My Documents\SQL Server Management Studio\Custom
Reports 
&lt;/p&gt;
&lt;p&gt;
&lt;/font&gt;&lt;a href="http://www.lifeasbob.com/content/binary/User_Permissions.txt"&gt;User_Permissions.txt
- Right click and save with a RDL Extension. (37.25 KB)&lt;/a&gt;&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/permissions.JPG" border=0&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=9e6ca2e9-154f-4c76-af34-9bfc4d82b2fd" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,9e6ca2e9-154f-4c76-af34-9bfc4d82b2fd.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=4f9c56f9-ce84-4c46-92e7-74d7eaabc795</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,4f9c56f9-ce84-4c46-92e7-74d7eaabc795.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,4f9c56f9-ce84-4c46-92e7-74d7eaabc795.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=4f9c56f9-ce84-4c46-92e7-74d7eaabc795</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <font size="2">
          <p>
Moving the log files in reporting services is an often overlooked step, until after
10-14 months when suddenly your 8gb c drive is full !
</p>
          <p>
Add the following line of code to the listed config files.
</p>
          <p>
Code:
</p>
          <p>
&lt;add name="Directory" value="E:\Reporting Services Dump Files\" /&gt;
</p>
          <p>
Files:
</p>
          <p>
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportServer\bin\ReportingServicesService.exe.config
</p>
          <p>
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportServer\web.config
</p>
          <p>
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportManager\web.config
</p>
          <p>
Thanks to Tom Reeves for solving this problem.
</p>
        </font>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=4f9c56f9-ce84-4c46-92e7-74d7eaabc795" />
      </body>
      <title>Move the Reporting Services Log files and Dump Files</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,4f9c56f9-ce84-4c46-92e7-74d7eaabc795.aspx</guid>
      <link>http://www.lifeasbob.com/2008/12/31/MoveTheReportingServicesLogFilesAndDumpFiles.aspx</link>
      <pubDate>Wed, 31 Dec 2008 18:38:59 GMT</pubDate>
      <description>&lt;font size=2&gt; 
&lt;p&gt;
Moving the log files in reporting services is an often overlooked step, until after
10-14 months when suddenly your 8gb c drive is full !
&lt;/p&gt;
&lt;p&gt;
Add the following line of code to the listed config files.
&lt;/p&gt;
&lt;p&gt;
Code:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;add name="Directory" value="E:\Reporting Services Dump Files\" /&amp;gt;
&lt;/p&gt;
&lt;p&gt;
Files:
&lt;/p&gt;
&lt;p&gt;
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportServer\bin\ReportingServicesService.exe.config
&lt;/p&gt;
&lt;p&gt;
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportServer\web.config
&lt;/p&gt;
&lt;p&gt;
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportManager\web.config
&lt;/p&gt;
&lt;p&gt;
Thanks to Tom Reeves for solving this problem.
&lt;/p&gt;
&lt;/font&gt;&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=4f9c56f9-ce84-4c46-92e7-74d7eaabc795" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,4f9c56f9-ce84-4c46-92e7-74d7eaabc795.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=ed5616f0-6c4b-48c0-a503-33897db4d24c</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,ed5616f0-6c4b-48c0-a503-33897db4d24c.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,ed5616f0-6c4b-48c0-a503-33897db4d24c.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ed5616f0-6c4b-48c0-a503-33897db4d24c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just a quick placeholder on the progress of SQL Server 2005 service pack 3.
</p>
        <p>
This update is important, if nothing else to ensure your on the latest patch which
addresses some security vulnerabilities.
</p>
        <p>
There is also a cumulative update for service pack 3, generally I don't go down the
cumulative update path unless i've been advise by Microsoft (ie, it addresses a problem
being experienced) or the SQL Community in general highly recommends a specific CU.
</p>
        <p>
I always start with patching my local developer edition, x86 Instance.
</p>
        <p>
Slowly working through a few boxes, so far we've patched the following with no issues:
</p>
        <ul>
          <li>
64 Bit named instances running under Polyserve 3.6.1 - both dev, qa and production,
no issues, Enterprise Edition. 
</li>
          <li>
64 Bit named instance stand-alone server, Enterprise Edition. 
</li>
          <li>
64 Bit named instance stand-alone server, Standard Edition. 
</li>
          <li>
64 Bit Clustered SQL Server, Active / Active Configuration, no issues, did require
reboot of both nodes and fail over, Enterprise Edition. 
</li>
          <li>
32 Bit SSIS stand alone installations (no dbms) no issues. 
</li>
          <li>
32 Bit Reporting Services Web Farm, authentication issues afterwards.</li>
        </ul>
        <p>
I had an issue with the Reporting Services Web Farm, which uses SQL Authentication
for connectivity, caused the login to be disabled.  I had quite a difficult time
getting it re-enabled and changing the password, but no errors in applying the service
pack.
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=ed5616f0-6c4b-48c0-a503-33897db4d24c" />
      </body>
      <title>SQL Server 2005 SP3 </title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,ed5616f0-6c4b-48c0-a503-33897db4d24c.aspx</guid>
      <link>http://www.lifeasbob.com/2008/12/31/SQLServer2005SP3.aspx</link>
      <pubDate>Wed, 31 Dec 2008 17:07:16 GMT</pubDate>
      <description>&lt;p&gt;
Just a quick placeholder on the progress of SQL Server 2005 service pack 3.
&lt;/p&gt;
&lt;p&gt;
This update is important, if nothing else to ensure your on the latest patch which
addresses some security vulnerabilities.
&lt;/p&gt;
&lt;p&gt;
There is also a cumulative update for service pack 3, generally I don't go down the
cumulative update path unless i've been advise by Microsoft (ie, it addresses a problem
being experienced) or the SQL Community in general highly recommends a specific CU.
&lt;/p&gt;
&lt;p&gt;
I always start with patching my local developer edition, x86 Instance.
&lt;/p&gt;
&lt;p&gt;
Slowly working through a few boxes, so far we've patched the following with no issues:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
64 Bit named instances running under Polyserve 3.6.1 - both dev, qa and production,
no issues, Enterprise Edition. 
&lt;li&gt;
64 Bit named instance stand-alone server, Enterprise Edition. 
&lt;li&gt;
64 Bit named instance stand-alone server, Standard Edition. 
&lt;li&gt;
64 Bit Clustered SQL Server, Active / Active Configuration, no issues, did require
reboot of both nodes and fail over, Enterprise Edition. 
&lt;li&gt;
32 Bit SSIS stand alone installations (no dbms) no issues. 
&lt;li&gt;
32 Bit Reporting Services Web Farm, authentication issues afterwards.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I had an issue with the Reporting Services Web Farm, which uses SQL Authentication
for connectivity, caused the login to be disabled.&amp;nbsp; I had quite a difficult time
getting it re-enabled and changing the password, but no errors in applying the service
pack.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=ed5616f0-6c4b-48c0-a503-33897db4d24c" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,ed5616f0-6c4b-48c0-a503-33897db4d24c.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=850afd60-6f2a-4b77-a29a-0dcd8b671049</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,850afd60-6f2a-4b77-a29a-0dcd8b671049.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,850afd60-6f2a-4b77-a29a-0dcd8b671049.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=850afd60-6f2a-4b77-a29a-0dcd8b671049</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've got a development box, old dev box, windows 2000, sql 2000, that runs a restore
script daily.   This Restore script is a vbs file, it restores a file ftp'd
from the production box.  It has run for many years with no issues, now every
3-4 days it hangs and runs forever.  So far the only solution has been to reboot
the box.
</p>
        <p>
I've dug around a bit and found many instances (10, 15, sometimes 20+) of dw20.exe
running in the process / task list.
</p>
        <p>
This is listed as the windows error reporting tool.  Not sure what is erroring
or being reported on, but since this server is shared with devlopers who have local
admin access to the server, i'd bet someone did something that than began causing
this error...either configuration changes or installed some software, difficult to
determine. 
</p>
        <p>
So far I've only found a two easy solutions, put the box on a daily reboot, or disable
the windows error reporting tool.
</p>
        <p>
I'm going to try and disable the tool and see what happens:
</p>
        <p>
          <a href="http://support.microsoft.com/kb/841477">http://support.microsoft.com/kb/841477</a> 
</p>
        <p>
          <strong>Important</strong> This section, method, or task contains steps that tell
you how to modify the registry. However, serious problems might occur if you modify
the registry incorrectly. Therefore, make sure that you follow these steps carefully.
For added protection, back up the registry before you modify it. Then, you can restore
the registry if a problem occurs. For more information about how to back up and restore
the registry, click the following article number to view the article in the Microsoft
Knowledge Base: 
</p>
        <p>
To disable the Application Error Reporting tool, add a DWReportee value of 1 to following
registry keys: 
</p>
        <div class="indent">HKEY_CURRENT_USER\Software\Policies\Microsoft\PCHealth\ErrorReporting\DW<br />
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\PCHealth\ErrorReporting\DW 
<br />
HKEY_CURRENT_USER\Software\Microsoft\PCHealth\ErrorReporting\DW<br />
HKEY_LOCAL_MACHINE\Software\Microsoft\PCHealth\ErrorReporting\DW
</div>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=850afd60-6f2a-4b77-a29a-0dcd8b671049" />
      </body>
      <title>dw20.exe</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,850afd60-6f2a-4b77-a29a-0dcd8b671049.aspx</guid>
      <link>http://www.lifeasbob.com/2008/12/15/dw20exe.aspx</link>
      <pubDate>Mon, 15 Dec 2008 17:07:50 GMT</pubDate>
      <description>&lt;p&gt;
I've got a development box, old dev box, windows 2000, sql 2000, that runs a restore
script daily.&amp;nbsp;&amp;nbsp; This Restore script is a vbs file, it restores a file ftp'd
from the production box.&amp;nbsp; It has run for many years with no issues, now every
3-4 days it hangs and runs forever.&amp;nbsp; So far the only solution has been to reboot
the box.
&lt;/p&gt;
&lt;p&gt;
I've dug around a bit and found many instances (10, 15, sometimes 20+) of dw20.exe
running in the process / task list.
&lt;/p&gt;
&lt;p&gt;
This is listed as the windows error reporting tool.&amp;nbsp; Not sure what is erroring
or being reported on, but since this server is shared with devlopers who have local
admin access to the server, i'd bet someone did something that than began causing
this error...either configuration changes or installed some software, difficult to
determine. 
&lt;/p&gt;
&lt;p&gt;
So far I've only found a two easy solutions, put the box on a daily reboot, or disable
the windows error reporting tool.
&lt;/p&gt;
&lt;p&gt;
I'm going to try and disable the tool and see what happens:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://support.microsoft.com/kb/841477"&gt;http://support.microsoft.com/kb/841477&lt;/a&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Important&lt;/strong&gt; This section, method, or task contains steps that tell
you how to modify the registry. However, serious problems might occur if you modify
the registry incorrectly. Therefore, make sure that you follow these steps carefully.
For added protection, back up the registry before you modify it. Then, you can restore
the registry if a problem occurs. For more information about how to back up and restore
the registry, click the following article number to view the article in the Microsoft
Knowledge Base: 
&lt;/p&gt;
&lt;p&gt;
To disable the Application Error Reporting tool, add a DWReportee value of 1 to following
registry keys: 
&lt;/p&gt;
&lt;div class=indent&gt;HKEY_CURRENT_USER\Software\Policies\Microsoft\PCHealth\ErrorReporting\DW&lt;br&gt;
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\PCHealth\ErrorReporting\DW 
&lt;br&gt;
HKEY_CURRENT_USER\Software\Microsoft\PCHealth\ErrorReporting\DW&lt;br&gt;
HKEY_LOCAL_MACHINE\Software\Microsoft\PCHealth\ErrorReporting\DW
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=850afd60-6f2a-4b77-a29a-0dcd8b671049" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,850afd60-6f2a-4b77-a29a-0dcd8b671049.aspx</comments>
      <category>General Technology</category>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=59a5f79c-b971-4d7b-8c68-a7eccc3bb99c</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,59a5f79c-b971-4d7b-8c68-a7eccc3bb99c.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,59a5f79c-b971-4d7b-8c68-a7eccc3bb99c.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=59a5f79c-b971-4d7b-8c68-a7eccc3bb99c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've always wanted the ability to see the modified date (alter procedured) of a stored
procedure.
</p>
        <p>
Recently "SQL Cricket" - Rick Mcintosh, showed me a Dynamic Management View (DMV)
that shows you the modified date of a stored procedure.  In SQL Server 2008 you
can add a column in object explorer to see this (date modified), though in sql server
2005 you can not add columns in object explorer, but the DMV works in sql 2k5. 
Too bad it doesn't work for all other objects, like tables.
</p>
        <p>
So get your SQL2K8 Management studio up and running, it provides more information,
even for sql server 2005.
</p>
        <p>
DMV is below.  Thanks to "SQL Cricket".
</p>
        <font color="#0000ff" size="2">
          <p>
SELECT
</p>
        </font>
        <font color="#000000" size="2"> name</font>
        <font color="#808080" size="2">,</font>
        <font color="#000000" size="2"> create_date</font>
        <font color="#808080" size="2">,</font>
        <font size="2">
          <font color="#000000"> modify_date</font>
          <p>
          </p>
        </font>
        <font color="#0000ff" size="2">FROM</font>
        <font size="2">
        </font>
        <font color="#008000" size="2">sys</font>
        <font color="#808080" size="2">.</font>
        <font color="#008000" size="2">objects
</font>
        <font size="2">
          <p>
          </p>
        </font>
        <font color="#0000ff" size="2">WHERE</font>
        <font size="2">
        </font>
        <font color="#0000ff" size="2">type</font>
        <font size="2">
        </font>
        <font color="#808080" size="2">=</font>
        <font size="2">
        </font>
        <font color="#ff0000" size="2">'P'</font>
        <font size="2">
        </font>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=59a5f79c-b971-4d7b-8c68-a7eccc3bb99c" />
      </body>
      <title>Modified date of stored procedures</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,59a5f79c-b971-4d7b-8c68-a7eccc3bb99c.aspx</guid>
      <link>http://www.lifeasbob.com/2008/12/12/ModifiedDateOfStoredProcedures.aspx</link>
      <pubDate>Fri, 12 Dec 2008 18:34:38 GMT</pubDate>
      <description>&lt;p&gt;
I've always wanted the ability to see the modified date (alter procedured) of a stored
procedure.
&lt;/p&gt;
&lt;p&gt;
Recently "SQL Cricket" - Rick Mcintosh, showed me a Dynamic Management View (DMV)
that shows you the modified date of a stored procedure.&amp;nbsp; In SQL Server 2008 you
can add a column in object explorer to see this (date modified), though in sql server
2005 you can not add columns in object explorer, but the DMV works in sql 2k5.&amp;nbsp;
Too bad it doesn't work for all other objects, like tables.
&lt;/p&gt;
&lt;p&gt;
So get your SQL2K8 Management studio up and running, it provides more information,
even for sql server 2005.
&lt;/p&gt;
&lt;p&gt;
DMV is below.&amp;nbsp; Thanks to "SQL Cricket".
&lt;/p&gt;
&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;
SELECT
&lt;/font&gt;&lt;font color=#000000 size=2&gt; name&lt;/font&gt;&lt;font color=#808080 size=2&gt;,&lt;/font&gt;&lt;font color=#000000 size=2&gt; create_date&lt;/font&gt;&lt;font color=#808080 size=2&gt;,&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt; modify_date&lt;/font&gt;&gt;
&lt;p&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;FROM&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#008000 size=2&gt;sys&lt;/font&gt;&lt;font color=#808080 size=2&gt;.&lt;/font&gt;&lt;font color=#008000 size=2&gt;objects&gt;
&lt;/font&gt;&lt;font size=2&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;WHERE&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;type&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#808080 size=2&gt;=&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;'P'&lt;/font&gt;&lt;font size=2&gt; &gt;
&lt;/font&gt;&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=59a5f79c-b971-4d7b-8c68-a7eccc3bb99c" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,59a5f79c-b971-4d7b-8c68-a7eccc3bb99c.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=fbe87327-49d2-480c-a5d7-e007bb0dbe2a</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,fbe87327-49d2-480c-a5d7-e007bb0dbe2a.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,fbe87327-49d2-480c-a5d7-e007bb0dbe2a.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=fbe87327-49d2-480c-a5d7-e007bb0dbe2a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
An election has come and gone.
</p>
        <p>
SQL PASS is completed.
</p>
        <p>
SQL Server 2008 is out.
</p>
        <p>
It's time to prepare for the "State of SQL Server".  This was an idea of mine,
to create a report and corresponding presentation to Senior leaders of my company
on the "State of SQL Server", analogous to the Presidents State of the Union Address.  
</p>
        <p>
It won't be in-depth as the Presidents address, but my job isn't either !
</p>
        <p>
The goal of the report is to inform the Senior leaders of where the company is with
SQL Server and where we are going with SQL Server, bringing together the knowledge
from PASS and our unique knowledge of working with SQL Server at our company. 
It also provides an opportunity to talk about where Microsoft is going with SQL Server
and how our strategies are aligning or differing from that.
</p>
        <p>
As DBA's we have the choice, we can present this information, or you can wait for
the Microsoft Technincal Account manager (TAM) or sales representative to talk about. 
I prefer to have these conversations with the Senior leaders before Microsoft does.
</p>
        <p>
I can not share the report as it is proprietary.
</p>
        <p>
An outline might be:
</p>
        <p>
I.  SQL Server today
</p>
        <p>
   A.  Provide an Overview of the environment
</p>
        <p>
   B.  Used for What 
</p>
        <p>
II.  SQL Server 6-12 months
</p>
        <p>
III.  SQL Server - The business intelligence platform
</p>
        <p>
IV.  Other DBMS's
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=fbe87327-49d2-480c-a5d7-e007bb0dbe2a" />
      </body>
      <title>State of SQL Server</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,fbe87327-49d2-480c-a5d7-e007bb0dbe2a.aspx</guid>
      <link>http://www.lifeasbob.com/2008/12/07/StateOfSQLServer.aspx</link>
      <pubDate>Sun, 07 Dec 2008 22:14:08 GMT</pubDate>
      <description>&lt;p&gt;
An election has come and gone.
&lt;/p&gt;
&lt;p&gt;
SQL PASS is completed.
&lt;/p&gt;
&lt;p&gt;
SQL Server 2008 is out.
&lt;/p&gt;
&lt;p&gt;
It's time to prepare for the "State of SQL Server".&amp;nbsp; This was an idea of mine,
to create a report and corresponding presentation to Senior leaders of my company
on the "State of SQL Server", analogous to the Presidents State of the Union Address.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
It won't be in-depth as the Presidents address, but my job isn't either !
&lt;/p&gt;
&lt;p&gt;
The goal of the report is to inform the Senior leaders of where the company is&amp;nbsp;with
SQL Server and where we are going with SQL Server, bringing together the knowledge
from PASS and our unique knowledge of working with SQL Server at our company.&amp;nbsp;
It also provides an opportunity to talk about where Microsoft is going with SQL Server
and how our strategies are aligning or differing from that.
&lt;/p&gt;
&lt;p&gt;
As DBA's we have the choice, we can present this information, or you can wait for
the Microsoft Technincal Account manager (TAM) or sales representative to talk about.&amp;nbsp;
I prefer to have these conversations with the Senior leaders before Microsoft does.
&lt;/p&gt;
&lt;p&gt;
I can not share the report as it is proprietary.
&lt;/p&gt;
&lt;p&gt;
An outline might be:
&lt;/p&gt;
&lt;p&gt;
I.&amp;nbsp; SQL Server today
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;A.&amp;nbsp; Provide an Overview of the environment
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;B.&amp;nbsp; Used for What 
&lt;/p&gt;
&lt;p&gt;
II.&amp;nbsp; SQL Server 6-12 months
&lt;/p&gt;
&lt;p&gt;
III.&amp;nbsp; SQL Server - The business intelligence platform
&lt;/p&gt;
&lt;p&gt;
IV.&amp;nbsp; Other DBMS's
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=fbe87327-49d2-480c-a5d7-e007bb0dbe2a" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,fbe87327-49d2-480c-a5d7-e007bb0dbe2a.aspx</comments>
      <category>SQL Server</category>
    </item>
  </channel>
</rss>