<?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>Adam Salvo (z) - Technology|Sql</title>
    <link>http://blog.salvoz.com/</link>
    <description>newtelligence powered</description>
    <language>en-us</language>
    <copyright>Adam Salvo</copyright>
    <lastBuildDate>Sat, 28 Nov 2009 23:19:40 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>adam@salvoz.com</managingEditor>
    <webMaster>adam@salvoz.com</webMaster>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=44fe6fd9-7fe2-42ad-9af1-b7932193e4a0</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,44fe6fd9-7fe2-42ad-9af1-b7932193e4a0.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,44fe6fd9-7fe2-42ad-9af1-b7932193e4a0.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=44fe6fd9-7fe2-42ad-9af1-b7932193e4a0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>This post is part of my PDC09 Conference Notes series. These are my raw notes
taken while watching the various session videos from PDC09. Refer to my <a href="http://blog.salvoz.com/2009/11/25/PDC2009Notes.aspx">original
post</a> for some conventions I tried to use.</em>
        </p>
        <p>
This presentation was part 2 of 2 on SQL Server StreamInsight, and was intended as
an advanced look at StreamInsight. If I get around to watching part 1, I will update
this post.
</p>
        <blockquote>
          <p>
“Microsoft SQL Server StreamInsight is a powerful platform for developing and deploying
complex event processing (CEP) applications. Its high-throughput stream processing
architecture and familiar .NET-based development platform enable developers to quickly
implement robust and highly efficient event processing applications.
</p>
          <p>
Typical event stream sources include data from manufacturing applications, financial
trading applications, Web analytics or operational analytics. StreamInsight enables
you to develop CEP applications that derive immediate business value from this raw
data by lowering the cost to extract, analyze, and correlate the data and by allowing
you to monitor, manage, and mine the data for conditions, opportunities, and defects
in close to real time.” –<a href="http://technet.microsoft.com/en-us/sqlserver/ee476990.aspx">Microsoft
TechNet</a></p>
        </blockquote>
        <p>
StreamInsight was designed to handle input sources that operate in the milisecond
range, instead of the second, minute and hour+ range. One of the demo’s shown, demonstrated
capturing and processing 60 events per second. StreamInsight will be licensed and
released with SQL Server. 
</p>
        <p>
  
</p>
        <p>
There was mention of Windows CE and other platform support when they were talking
about how the Stream OS provides hardware abstraction for StreamInsight. It seems
kind of weird that they didn’t start with Windows CE as the most obvious use (to me)
is automation. However, some of the examples shown where at the enterprise server
level, which matches up with the definition I pulled from TechNet. 
</p>
        <p>
  
</p>
        <p>
StreamInsight makes use of Native memory to avoid garbage collection, and I would
assume there are other native code optimizations used for performance reasons. It
looks like they are trying to bridge the gap between native code performance and the
ease of .net development to support Complex event processing. 
</p>
        <p>
  
</p>
        <p>
The following challenges facing complex event processing scenarios necessitated a
platform: 
</p>
        <ul>
          <li>
Pattern Detection 
</li>
          <li>
Correlate Data 
</li>
          <li>
Aggregate 
</li>
          <li>
Hardware Abstraction</li>
        </ul>
        <p>
          <strong>Adapters</strong>
        </p>
        <ul>
          <li>
“Get” the data into the application 
</li>
          <li>
Built using the adapter framework 
</li>
          <li>
Default adapters wrap the framework in an Observable Patter and expose IEnumerble
collections 
</li>
          <li>
Adapters can be Push or Pull 
</li>
          <li>
Adapters can be In-Order or Out-Of Order 
</li>
          <li>
Work with Native Memory</li>
        </ul>
        <p>
          <strong>Query Expressions</strong>
        </p>
        <ul>
          <li>
Allows for data manipulation 
</li>
          <li>
Projection 
</li>
          <li>
Filtering 
</li>
          <li>
Correlation (joins) 
</li>
          <li>
Aggregate over Windows of time (Temporal semantics) 
<ul><li>
Time windows can be overlapping or non-overlapping</li></ul></li>
          <li>
Grouping and Aggregation 
</li>
          <li>
Implemented using Linq. Everything except the time aggregation is implemented using
out of the box Linq. Linq extensions were created for the time aggregation.</li>
        </ul>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=44fe6fd9-7fe2-42ad-9af1-b7932193e4a0" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>PDC09 – SVR08: Advanced Microsoft SQL Server 2008 R2 StreamInsight</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,44fe6fd9-7fe2-42ad-9af1-b7932193e4a0.aspx</guid>
      <link>http://blog.salvoz.com/2009/11/28/PDC09SVR08AdvancedMicrosoftSQLServer2008R2StreamInsight.aspx</link>
      <pubDate>Sat, 28 Nov 2009 23:19:40 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;This post is part of my PDC09 Conference Notes series. These are my raw notes
taken while watching the various session videos from PDC09. Refer to my &lt;a href="http://blog.salvoz.com/2009/11/25/PDC2009Notes.aspx"&gt;original
post&lt;/a&gt; for some conventions I tried to use.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
This presentation was part 2 of 2 on SQL Server StreamInsight, and was intended as
an advanced look at StreamInsight. If I get around to watching part 1, I will update
this post.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
“Microsoft SQL Server StreamInsight is a powerful platform for developing and deploying
complex event processing (CEP) applications. Its high-throughput stream processing
architecture and familiar .NET-based development platform enable developers to quickly
implement robust and highly efficient event processing applications.
&lt;/p&gt;
&lt;p&gt;
Typical event stream sources include data from manufacturing applications, financial
trading applications, Web analytics or operational analytics. StreamInsight enables
you to develop CEP applications that derive immediate business value from this raw
data by lowering the cost to extract, analyze, and correlate the data and by allowing
you to monitor, manage, and mine the data for conditions, opportunities, and defects
in close to real time.” –&lt;a href="http://technet.microsoft.com/en-us/sqlserver/ee476990.aspx"&gt;Microsoft
TechNet&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
StreamInsight was designed to handle input sources that operate in the milisecond
range, instead of the second, minute and hour+ range. One of the demo’s shown, demonstrated
capturing and processing 60 events per second. StreamInsight will be licensed and
released with SQL Server. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
There was mention of Windows CE and other platform support when they were talking
about how the Stream OS provides hardware abstraction for StreamInsight. It seems
kind of weird that they didn’t start with Windows CE as the most obvious use (to me)
is automation. However, some of the examples shown where at the enterprise server
level, which matches up with the definition I pulled from TechNet. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
StreamInsight makes use of Native memory to avoid garbage collection, and I would
assume there are other native code optimizations used for performance reasons. It
looks like they are trying to bridge the gap between native code performance and the
ease of .net development to support Complex event processing. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
The following challenges facing complex event processing scenarios necessitated a
platform: 
&lt;ul&gt;
&lt;li&gt;
Pattern Detection 
&lt;li&gt;
Correlate Data 
&lt;li&gt;
Aggregate 
&lt;li&gt;
Hardware Abstraction&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Adapters&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
“Get” the data into the application 
&lt;li&gt;
Built using the adapter framework 
&lt;li&gt;
Default adapters wrap the framework in an Observable Patter and expose IEnumerble
collections 
&lt;li&gt;
Adapters can be Push or Pull 
&lt;li&gt;
Adapters can be In-Order or Out-Of Order 
&lt;li&gt;
Work with Native Memory&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Query Expressions&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Allows for data manipulation 
&lt;li&gt;
Projection 
&lt;li&gt;
Filtering 
&lt;li&gt;
Correlation (joins) 
&lt;li&gt;
Aggregate over Windows of time (Temporal semantics) 
&lt;ul&gt;
&lt;li&gt;
Time windows can be overlapping or non-overlapping&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Grouping and Aggregation 
&lt;li&gt;
Implemented using Linq. Everything except the time aggregation is implemented using
out of the box Linq. Linq extensions were created for the time aggregation.&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=44fe6fd9-7fe2-42ad-9af1-b7932193e4a0" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,44fe6fd9-7fe2-42ad-9af1-b7932193e4a0.aspx</comments>
      <category>Technology/Conference Notes</category>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=1a882d9c-0365-429a-a896-635d4e3b65d0</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,1a882d9c-0365-429a-a896-635d4e3b65d0.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,1a882d9c-0365-429a-a896-635d4e3b65d0.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=1a882d9c-0365-429a-a896-635d4e3b65d0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>This post is part of my PDC09 Conference Notes series. These are my raw notes
taken while watching the various session videos from PDC09. Refer to my <a href="http://blog.salvoz.com/2009/11/25/PDC2009Notes.aspx">original
post</a> for some conventions I tried to use.</em>
        </p>
        <p>
          <strong>FT12 -WCF Data Services: What's new the RESTful data services framework (Pablo
Castro)</strong>
        </p>
        <ul>
          <li>
Name changed from ADO.Net Data Services to WCF Data Services 
</li>
          <li>
REST 
<ul><li>
REST is not a Protocol, standard, or Format 
</li><li>
REST is an architectural style 
<ul><li>
Decoupling 
</li><li>
Scalability 
</li><li>
Layering</li></ul></li></ul><ul><li><em>Interesting way of defining REST. I always thought of it as some type of standard
based on HTTP (verbs).</em></li></ul></li>
        </ul>
        <ul>
          <li>
Resources 
<ul><li>
Represents the state of each of the entities your are modeling 
</li><li>
These resources (state) are the only thing that is viewable from the outside. <u>There
is no behavior.</u></li><li>
Each resource has an address. In this case, it's the URL 
</li><li>
Uniform Interface: Removes ambiguity of calls by constrain a system to a know interface. 
<ul><li>
In REST, you have GET, PUT, DELETE and POST. You do not have ApproveOrder, VerifyCreditCard,
etc. 
</li></ul></li></ul></li>
        </ul>
        <ul>
          <li>
Date Service is not a gateway to the database 
<ul><li>
There is almost always some type of business logic between the service and the data
store 
</li><li><em>I think that this business logic is a subset of what you might find in a Line
of Business app, with additional logic as required in order to properly expose via
a service. </em></li><li>
The business logic could be responsible for security, and performance considerations
(i.e. don't allow something that will do a SELECT * FROM Table, where table has millions
of rows).</li></ul></li>
        </ul>
        <ul>
          <li>
Open Data Protocol (Astoria =&gt; Ado.Net DS =&gt; WCF Data services) 
<ul><li>
RESTful over http 
</li><li>
Poke-able (just open a browser and type a URL and see what comes back) 
</li><li>
HTTP: Transport, interaction model, control information in headers 
</li><li>
AtomPub: Format, introduces things like collections and links. 
</li><li>
Team added extensions to AtomPub as needed 
</li><li>
Introduced a json serialization option, which is useful when consuming from javascript. 
</li></ul></li>
        </ul>
        <ul>
          <li>
URL 
<ul><li>
The URL is independent of the format of the data returned (json, atom, etc). So you
can pass the URL around and it will not impact the format. The format is defined in
the GET request (accept: applicat/json). 
</li><li>
Extra stuff goes in query string (?). Use &amp; to append, just like normal query
string. 
</li><li>
(#): Query by primary key. /Categories(6)/Products would return all products for Category
6 
</li><li>
Filter strings: ?#filter=Color eq 'Red' 
</li><li>
Return first x rows: $top=# 
</li><li>
Sorting: $orderby=ColumnName 
</li><li>
Eger Load: $expand=ChildCollectionName 
</li><li>
Only get certain columns: $select=Column1,Column2</li></ul></li>
        </ul>
        <ul>
          <li>
Where used 
<ul><li>
.Net 
</li><li>
Sharepoint 2010 (install/enable Astoria?, and then you can access all sharepoint data
from /vti_bin/listdata.svc/ListName). There is full business logic running, so it
will check for authentication, update everything as necessary when you update the
actual data. 
</li><li>
Reporting Services 
</li><li>
Azure Table Storage 
</li><li>
Codename "Dallas" 
</li><li>
Microsoft Media Room 
</li><li>
Open Government data initiative 
</li><li>
3rd Parties 
<ul><li>
IBM WebSpehere Extreme Scale 
</li><li>
Db4o 
</li><li>
Telerik Open Access 
</li><li>
LinqPad</li></ul></li></ul></li>
        </ul>
        <ul>
          <li>
VS Support 
<ul><li>
Add Service Reference now supports consuming data from the Open Data Protocol (needs
to expose meta data) 
</li><li>
You'll get a data context type after adding the service reference 
</li><li>
Do something like: MyDataContextType svc = new MyDataContextType(URL), and then you
can drill down into svc to access the various collections of entities that are exposed.
Has support for adding (method), and I'm assuming updating as well. 
</li><li>
Full support for linq. 
</li><li><em>It would be interesting to view the SQL being generated behind the scenes using
Query Analyzer</em></li><li>
You can view the service as a diagram and get a schema diagram. 
</li></ul></li>
        </ul>
        <ul>
          <li>
Excel 2010 with Power Pivot 
<ul><li>
Import a data feed using just the URL from WCF Data Services 
</li><li>
And then you can just work with it in Excel 
</li><li>
Works with the open data access for SharePoint as well. 
</li></ul></li>
        </ul>
        <ul>
          <li>
Latest version of SSRS (must be SQL 2008 R2) 
<ul><li>
Every report has it's data exposed via this open data protocol. 
</li><li>
Browse to the report, the new report viewer has a button that allows you to export
as feed.</li></ul></li>
        </ul>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=1a882d9c-0365-429a-a896-635d4e3b65d0" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>PDC09 – FT12: WCF Data Services</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,1a882d9c-0365-429a-a896-635d4e3b65d0.aspx</guid>
      <link>http://blog.salvoz.com/2009/11/25/PDC09FT12WCFDataServices.aspx</link>
      <pubDate>Wed, 25 Nov 2009 03:03:36 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;This post is part of my PDC09 Conference Notes series. These are my raw notes
taken while watching the various session videos from PDC09. Refer to my &lt;a href="http://blog.salvoz.com/2009/11/25/PDC2009Notes.aspx"&gt;original
post&lt;/a&gt; for some conventions I tried to use.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;FT12 -WCF Data Services: What's new the RESTful data services framework (Pablo
Castro)&lt;/strong&gt; 
&lt;ul&gt;
&lt;li&gt;
Name changed from ADO.Net Data Services to WCF Data Services 
&lt;li&gt;
REST 
&lt;ul&gt;
&lt;li&gt;
REST is not a Protocol, standard, or Format 
&lt;li&gt;
REST is an architectural style 
&lt;ul&gt;
&lt;li&gt;
Decoupling 
&lt;li&gt;
Scalability 
&lt;li&gt;
Layering&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Interesting way of defining REST. I always thought of it as some type of standard
based on HTTP (verbs).&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Resources 
&lt;ul&gt;
&lt;li&gt;
Represents the state of each of the entities your are modeling 
&lt;li&gt;
These resources (state) are the only thing that is viewable from the outside. &lt;u&gt;There
is no behavior.&lt;/u&gt; 
&lt;li&gt;
Each resource has an address. In this case, it's the URL 
&lt;li&gt;
Uniform Interface: Removes ambiguity of calls by constrain a system to a know interface. 
&lt;ul&gt;
&lt;li&gt;
In REST, you have GET, PUT, DELETE and POST. You do not have ApproveOrder, VerifyCreditCard,
etc. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Date Service is not a gateway to the database 
&lt;ul&gt;
&lt;li&gt;
There is almost always some type of business logic between the service and the data
store 
&lt;li&gt;
&lt;em&gt;I think that this business logic is a subset of what you might find in a Line
of Business app, with additional logic as required in order to properly expose via
a service. &lt;/em&gt; 
&lt;li&gt;
The business logic could be responsible for security, and performance considerations
(i.e. don't allow something that will do a SELECT * FROM Table, where table has millions
of rows).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Open Data Protocol (Astoria =&amp;gt; Ado.Net DS =&amp;gt; WCF Data services) 
&lt;ul&gt;
&lt;li&gt;
RESTful over http 
&lt;li&gt;
Poke-able (just open a browser and type a URL and see what comes back) 
&lt;li&gt;
HTTP: Transport, interaction model, control information in headers 
&lt;li&gt;
AtomPub: Format, introduces things like collections and links. 
&lt;li&gt;
Team added extensions to AtomPub as needed 
&lt;li&gt;
Introduced a json serialization option, which is useful when consuming from javascript. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
URL 
&lt;ul&gt;
&lt;li&gt;
The URL is independent of the format of the data returned (json, atom, etc). So you
can pass the URL around and it will not impact the format. The format is defined in
the GET request (accept: applicat/json). 
&lt;li&gt;
Extra stuff goes in query string (?). Use &amp;amp; to append, just like normal query
string. 
&lt;li&gt;
(#): Query by primary key. /Categories(6)/Products would return all products for Category
6 
&lt;li&gt;
Filter strings: ?#filter=Color eq 'Red' 
&lt;li&gt;
Return first x rows: $top=# 
&lt;li&gt;
Sorting: $orderby=ColumnName 
&lt;li&gt;
Eger Load: $expand=ChildCollectionName 
&lt;li&gt;
Only get certain columns: $select=Column1,Column2&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Where used 
&lt;ul&gt;
&lt;li&gt;
.Net 
&lt;li&gt;
Sharepoint 2010 (install/enable Astoria?, and then you can access all sharepoint data
from /vti_bin/listdata.svc/ListName). There is full business logic running, so it
will check for authentication, update everything as necessary when you update the
actual data. 
&lt;li&gt;
Reporting Services 
&lt;li&gt;
Azure Table Storage 
&lt;li&gt;
Codename "Dallas" 
&lt;li&gt;
Microsoft Media Room 
&lt;li&gt;
Open Government data initiative 
&lt;li&gt;
3rd Parties 
&lt;ul&gt;
&lt;li&gt;
IBM WebSpehere Extreme Scale 
&lt;li&gt;
Db4o 
&lt;li&gt;
Telerik Open Access 
&lt;li&gt;
LinqPad&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
VS Support 
&lt;ul&gt;
&lt;li&gt;
Add Service Reference now supports consuming data from the Open Data Protocol (needs
to expose meta data) 
&lt;li&gt;
You'll get a data context type after adding the service reference 
&lt;li&gt;
Do something like: MyDataContextType svc = new MyDataContextType(URL), and then you
can drill down into svc to access the various collections of entities that are exposed.
Has support for adding (method), and I'm assuming updating as well. 
&lt;li&gt;
Full support for linq. 
&lt;li&gt;
&lt;em&gt;It would be interesting to view the SQL being generated behind the scenes using
Query Analyzer&lt;/em&gt; 
&lt;li&gt;
You can view the service as a diagram and get a schema diagram. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Excel 2010 with Power Pivot 
&lt;ul&gt;
&lt;li&gt;
Import a data feed using just the URL from WCF Data Services 
&lt;li&gt;
And then you can just work with it in Excel 
&lt;li&gt;
Works with the open data access for SharePoint as well. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Latest version of SSRS (must be SQL 2008 R2) 
&lt;ul&gt;
&lt;li&gt;
Every report has it's data exposed via this open data protocol. 
&lt;li&gt;
Browse to the report, the new report viewer has a button that allows you to export
as feed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=1a882d9c-0365-429a-a896-635d4e3b65d0" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,1a882d9c-0365-429a-a896-635d4e3b65d0.aspx</comments>
      <category>Technology/Conference Notes</category>
      <category>Technology/Data Access</category>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=a5bde206-da23-485b-bb65-9cd9abbd0ef2</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,a5bde206-da23-485b-bb65-9cd9abbd0ef2.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,a5bde206-da23-485b-bb65-9cd9abbd0ef2.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a5bde206-da23-485b-bb65-9cd9abbd0ef2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Almost a year ago I found a script for a stored procedure that allowed you to compare
two tables in SQL. Today I’ve been working on some data verification, and made really
good use out of this script. I couldn’t find it on my blog, so I don’t think I’ve
posted this before. Unfortunately, I did not save the original author of the script
or where I got it from.
</p>
        <p>
One thing that I wish it could do was work on Table variables, but beggars can’t be
choosers. Instead, I just create #TempTables and pass them into the stored procedure,
and it works just fine. This lets you define either one or both of the tables you
need to operate on, and write complex queries to populate the temp tables. 
</p>
        <p>
ALTER PROCEDURE [dbo].[tsi_sp_util_CompareTables](@table1 varchar(100), 
</p>
        <p>
@table2 Varchar(100), @T1ColumnList varchar(max), 
</p>
        <p>
@T2ColumnList varchar(max) = '') 
</p>
        <p>
  
</p>
        <p>
AS 
</p>
        <p>
  
</p>
        <p>
-- Table1, Table2 are the tables or views to compare.<br />
-- T1ColumnList is the list of columns to compare, from table1.<br />
-- Just list them comma-separated, like in a GROUP BY clause.<br />
-- If T2ColumnList is not specified, it is assumed to be the same<br />
-- as T1ColumnList.  Otherwise, list the columns of Table2 in<br />
-- the same order as the columns in table1 that you wish to compare.<br />
--<br />
-- The result is all rows from either table that do NOT match<br />
-- the other table in all columns specified, along with which table that<br />
-- row is from. 
</p>
        <p>
  
</p>
        <p>
declare @SQL varchar(8000); 
</p>
        <p>
IF @t2ColumnList = '' SET @T2ColumnList = @T1ColumnList 
</p>
        <p>
set @SQL = 'SELECT ''' + @table1 + ''' AS TableName, ' + @t1ColumnList + 
</p>
        <p>
' FROM ' + @Table1 + ' UNION ALL SELECT ''' + @table2 + ''' As TableName, ' + 
</p>
        <p>
@t2ColumnList + ' FROM ' + @Table2 
</p>
        <p>
set @SQL = 'SELECT Max(TableName) as TableName, ' + @t1ColumnList + 
</p>
        <p>
' FROM (' + @SQL + ') A GROUP BY ' + @t1ColumnList + 
</p>
        <p>
' HAVING COUNT(*) = 1' 
</p>
        <p>
 
</p>
        <p>
exec ( @SQL)
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=a5bde206-da23-485b-bb65-9cd9abbd0ef2" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Comparing Two Tables in SQL</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,a5bde206-da23-485b-bb65-9cd9abbd0ef2.aspx</guid>
      <link>http://blog.salvoz.com/2009/08/01/ComparingTwoTablesInSQL.aspx</link>
      <pubDate>Sat, 01 Aug 2009 00:06:49 GMT</pubDate>
      <description>&lt;p&gt;
Almost a year ago I found a script for a stored procedure that allowed you to compare
two tables in SQL. Today I’ve been working on some data verification, and made really
good use out of this script. I couldn’t find it on my blog, so I don’t think I’ve
posted this before. Unfortunately, I did not save the original author of the script
or where I got it from.
&lt;/p&gt;
&lt;p&gt;
One thing that I wish it could do was work on Table variables, but beggars can’t be
choosers. Instead, I just create #TempTables and pass them into the stored procedure,
and it works just fine. This lets you define either one or both of the tables you
need to operate on, and write complex queries to populate the temp tables. 
&lt;/p&gt;
&lt;p&gt;
ALTER PROCEDURE [dbo].[tsi_sp_util_CompareTables](@table1 varchar(100), 
&lt;p&gt;
@table2 Varchar(100), @T1ColumnList varchar(max), 
&lt;p&gt;
@T2ColumnList varchar(max) = '') 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
AS 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
-- Table1, Table2 are the tables or views to compare.&lt;br&gt;
-- T1ColumnList is the list of columns to compare, from table1.&lt;br&gt;
-- Just list them comma-separated, like in a GROUP BY clause.&lt;br&gt;
-- If T2ColumnList is not specified, it is assumed to be the same&lt;br&gt;
-- as T1ColumnList.&amp;nbsp; Otherwise, list the columns of Table2 in&lt;br&gt;
-- the same order as the columns in table1 that you wish to compare.&lt;br&gt;
--&lt;br&gt;
-- The result is all rows from either table that do NOT match&lt;br&gt;
-- the other table in all columns specified, along with which table that&lt;br&gt;
-- row is from. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
declare @SQL varchar(8000); 
&lt;p&gt;
IF @t2ColumnList = '' SET @T2ColumnList = @T1ColumnList 
&lt;p&gt;
set @SQL = 'SELECT ''' + @table1 + ''' AS TableName, ' + @t1ColumnList + 
&lt;p&gt;
' FROM ' + @Table1 + ' UNION ALL SELECT ''' + @table2 + ''' As TableName, ' + 
&lt;p&gt;
@t2ColumnList + ' FROM ' + @Table2 
&lt;p&gt;
set @SQL = 'SELECT Max(TableName) as TableName, ' + @t1ColumnList + 
&lt;p&gt;
' FROM (' + @SQL + ') A GROUP BY ' + @t1ColumnList + 
&lt;p&gt;
' HAVING COUNT(*) = 1' 
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
exec ( @SQL)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=a5bde206-da23-485b-bb65-9cd9abbd0ef2" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,a5bde206-da23-485b-bb65-9cd9abbd0ef2.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=61b527dc-9b5c-4813-a735-89eda7dfc031</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,61b527dc-9b5c-4813-a735-89eda7dfc031.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,61b527dc-9b5c-4813-a735-89eda7dfc031.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=61b527dc-9b5c-4813-a735-89eda7dfc031</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’m using LinqToSql as a quick way to access my database for some brownfield testing.
I needed to execute a stored procedure that returned a result set, but after adding
it to the LinqToSql design surface, I noticed that the return value was set to none,
and I was unable to change it. 
</p>
        <p>
This stored procedure had two exec statements, and a Set Transaction Isolation level
statement as well.  After commenting these out and re-adding the stored procedure
to the design surface, I was still faced with a return value of none. I ended up deleting
the stored procedure, rebuilding, and then re-adding. This finally resulted in a auto
generated return value. I then uncommented the lines I had previously commented out. 
</p>
        <p>
While researching this, I found some other people with a similar problem, and rebuilding
helped a few people, but not all, so your mileage may vary. 
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=61b527dc-9b5c-4813-a735-89eda7dfc031" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>No Return Value specified in LinqToSql after adding Stored Procedure</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,61b527dc-9b5c-4813-a735-89eda7dfc031.aspx</guid>
      <link>http://blog.salvoz.com/2009/04/13/NoReturnValueSpecifiedInLinqToSqlAfterAddingStoredProcedure.aspx</link>
      <pubDate>Mon, 13 Apr 2009 21:15:42 GMT</pubDate>
      <description>&lt;p&gt;
I’m using LinqToSql as a quick way to access my database for some brownfield testing.
I needed to execute a stored procedure that returned a result set, but after adding
it to the LinqToSql design surface, I noticed that the return value was set to none,
and I was unable to change it. 
&lt;/p&gt;
&lt;p&gt;
This stored procedure had two exec statements, and a Set Transaction Isolation level
statement as well.&amp;nbsp; After commenting these out and re-adding the stored procedure
to the design surface, I was still faced with a return value of none. I ended up deleting
the stored procedure, rebuilding, and then re-adding. This finally resulted in a auto
generated return value. I then uncommented the lines I had previously commented out. 
&lt;/p&gt;
&lt;p&gt;
While researching this, I found some other people with a similar problem, and rebuilding
helped a few people, but not all, so your mileage may vary. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=61b527dc-9b5c-4813-a735-89eda7dfc031" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,61b527dc-9b5c-4813-a735-89eda7dfc031.aspx</comments>
      <category>Technology/Programming</category>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=017f2ced-7b70-42eb-8cd9-bc7d7e5840fe</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,017f2ced-7b70-42eb-8cd9-bc7d7e5840fe.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,017f2ced-7b70-42eb-8cd9-bc7d7e5840fe.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=017f2ced-7b70-42eb-8cd9-bc7d7e5840fe</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Earlier this week, I had a request to write a query, which required comparing one
row to the row that followed. While I had something like this before using sub queries
with MIN/MAX, I just didn’t have the time to hack thru it. Today, I got an e-mail
from SQL Server Central (.com) from their mailing list, and one of the featured articles
was “<a href="http://www.sqlservercentral.com/articles/T-SQL/62159/" target="_blank">Linking
to the previous row</a>”. This sounded like what I needed for my query, so I decided
to check it out. 
</p>
        <p>
The opening of the article describes my situation exactly, and by using the method
described, I was able to write my query in a couple of minutes using CTE’s and the
Rownumber function. I highly recommend the article.
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=017f2ced-7b70-42eb-8cd9-bc7d7e5840fe" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Linking to the Previous Row in SQL 2005/2008</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,017f2ced-7b70-42eb-8cd9-bc7d7e5840fe.aspx</guid>
      <link>http://blog.salvoz.com/2009/01/23/LinkingToThePreviousRowInSQL20052008.aspx</link>
      <pubDate>Fri, 23 Jan 2009 22:33:59 GMT</pubDate>
      <description>&lt;p&gt;
Earlier this week, I had a request to write a query, which required comparing one
row to the row that followed. While I had something like this before using sub queries
with MIN/MAX, I just didn’t have the time to hack thru it. Today, I got an e-mail
from SQL Server Central (.com) from their mailing list, and one of the featured articles
was “&lt;a href="http://www.sqlservercentral.com/articles/T-SQL/62159/" target="_blank"&gt;Linking
to the previous row&lt;/a&gt;”. This sounded like what I needed for my query, so I decided
to check it out. 
&lt;/p&gt;
&lt;p&gt;
The opening of the article describes my situation exactly, and by using the method
described, I was able to write my query in a couple of minutes using CTE’s and the
Rownumber function. I highly recommend the article.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=017f2ced-7b70-42eb-8cd9-bc7d7e5840fe" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,017f2ced-7b70-42eb-8cd9-bc7d7e5840fe.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=ef57ab8a-0012-4717-b648-1d5ac8338904</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,ef57ab8a-0012-4717-b648-1d5ac8338904.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,ef57ab8a-0012-4717-b648-1d5ac8338904.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ef57ab8a-0012-4717-b648-1d5ac8338904</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today, Jeff Atwood posted about a <a href="http://www.codinghorror.com/blog/archives/001166.html">deadlock</a> issue
he was having. He had a couple of ideas as to how to solve his issue, including the
nolock statement. What I found most interesting were the comments that followed. Here
is a summary:
</p>
        <ul>
          <li>
SQL Server sucks 
</li>
          <li>
NoLock is ok 
</li>
          <li>
NoLock is a hack 
</li>
          <li>
I can’t believe you don’t/didn’t know how to fix a dead lock</li>
        </ul>
        <p>
I can’t believe how critical people were of Jeff. I guess I was a little surprised
that the author of the great Coding Horror didn’t know the answer to something, but
that’s no reason to be critical of the guy. 
</p>
        <p>
A couple of the more decent links included:
</p>
        <ul>
          <li>
            <a title="http://weblogs.sqlteam.com/mladenp/archive/2008/07/18/Immediate-deadlock-notifications-without-changing-existing-code.aspx" href="http://weblogs.sqlteam.com/mladenp/archive/2008/07/18/Immediate-deadlock-notifications-without-changing-existing-code.aspx">http://weblogs.sqlteam.com/mladenp/archive/2008/07/18/Immediate-deadlock-notifications-without-changing-existing-code.aspx</a>
          </li>
          <li>
            <a title="http://developmenttips.blogspot.com/2008/08/cure-for-deadlocked-learning-to-use.html" href="http://developmenttips.blogspot.com/2008/08/cure-for-deadlocked-learning-to-use.html">http://developmenttips.blogspot.com/2008/08/cure-for-deadlocked-learning-to-use.html</a>
          </li>
        </ul>
        <p>
We have a couple of deadlock issues in our current database that I’d like to sit down
and fix, so these might come in handy. 
</p>
        <p>
Update: Someone who knows allot more about SQL posted a <a href="http://www.samsaffron.com/archive/2008/08/27/Deadlocked+">blog
entry</a> in response to Jeff’s original post. The author believes that using nolock
is never a good idea and goes on to give some advice on how to start solving deadlock
issues.
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=ef57ab8a-0012-4717-b648-1d5ac8338904" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>SQL Deadlocks</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,ef57ab8a-0012-4717-b648-1d5ac8338904.aspx</guid>
      <link>http://blog.salvoz.com/2008/08/26/SQLDeadlocks.aspx</link>
      <pubDate>Tue, 26 Aug 2008 03:08:25 GMT</pubDate>
      <description>&lt;p&gt;
Today, Jeff Atwood posted about a &lt;a href="http://www.codinghorror.com/blog/archives/001166.html"&gt;deadlock&lt;/a&gt; issue
he was having. He had a couple of ideas as to how to solve his issue, including the
nolock statement. What I found most interesting were the comments that followed. Here
is a summary:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
SQL Server sucks 
&lt;li&gt;
NoLock is ok 
&lt;li&gt;
NoLock is a hack 
&lt;li&gt;
I can’t believe you don’t/didn’t know how to fix a dead lock&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I can’t believe how critical people were of Jeff. I guess I was a little surprised
that the author of the great Coding Horror didn’t know the answer to something, but
that’s no reason to be critical of the guy. 
&lt;/p&gt;
&lt;p&gt;
A couple of the more decent links included:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a title="http://weblogs.sqlteam.com/mladenp/archive/2008/07/18/Immediate-deadlock-notifications-without-changing-existing-code.aspx" href="http://weblogs.sqlteam.com/mladenp/archive/2008/07/18/Immediate-deadlock-notifications-without-changing-existing-code.aspx"&gt;http://weblogs.sqlteam.com/mladenp/archive/2008/07/18/Immediate-deadlock-notifications-without-changing-existing-code.aspx&lt;/a&gt; 
&lt;li&gt;
&lt;a title="http://developmenttips.blogspot.com/2008/08/cure-for-deadlocked-learning-to-use.html" href="http://developmenttips.blogspot.com/2008/08/cure-for-deadlocked-learning-to-use.html"&gt;http://developmenttips.blogspot.com/2008/08/cure-for-deadlocked-learning-to-use.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
We have a couple of deadlock issues in our current database that I’d like to sit down
and fix, so these might come in handy. 
&lt;/p&gt;
&lt;p&gt;
Update: Someone who knows allot more about SQL posted a &lt;a href="http://www.samsaffron.com/archive/2008/08/27/Deadlocked+"&gt;blog
entry&lt;/a&gt; in response to Jeff’s original post. The author believes that using nolock
is never a good idea and goes on to give some advice on how to start solving deadlock
issues.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=ef57ab8a-0012-4717-b648-1d5ac8338904" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,ef57ab8a-0012-4717-b648-1d5ac8338904.aspx</comments>
      <category>Technology/Review For Future Projects</category>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=89e7ce6c-e260-417b-8c7f-1406725b6702</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,89e7ce6c-e260-417b-8c7f-1406725b6702.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,89e7ce6c-e260-417b-8c7f-1406725b6702.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=89e7ce6c-e260-417b-8c7f-1406725b6702</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
With the release of all Visual Studio 2008, TFS 2008, and SQL 2008, I set about upgrading
I set about upgrading my main development laptop. Currently I have VS 2008, Team Explorer
2008 and SQL 2005 client tools installed. I opted to download the full installer for
the SP1 updates as opposed to the bootstrapper options.
</p>
        <ul>
          <li>
            <a title=".NET Framework 3.5 Service Pack 1 (Full Package)" href="http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe">.NET
Framework 3.5 Service Pack 1 (Full Package)</a>
          </li>
          <li>
            <a href="http://www.microsoft.com/downloads/details.aspx?familyid=27673C47-B3B5-4C67-BD99-84E525B5CE61&amp;displaylang=en">Visual
Studio 2008 SP1 (Full Package ISO)</a> - <a href="http://support.microsoft.com/kb/945140">Change
List</a>  
</li>
          <li>
            <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9e40a5b6-da41-43a2-a06d-3cee196bfe3d&amp;DisplayLang=en">TFS
2008 SP1 (Full Installer)</a>
          </li>
        </ul>
        <p>
I knew I needed to install VS 2008 SP1 prior to TFS 2008 SP1, but for some reason
decided to go with the SQL upgrade first. As I mentioned before, I currently only
have the client tools installed, as I like to keep my SQL servers on virtualized development
servers. 
</p>
        <p>
The SQL 2008 installer starts off by checking for .Net 3.5 SP1, and if it does not
exist, it will install it on your machine, along with a hotfix for windows installer.
After this is complete, you are required to reboot your machine. I opted for the upgrade
option, hoping that everything just works. I’m not sure if you can do a side by side
install with SQL 2005 client tools and 2008. 
</p>
        <p>
After selecting my options, an upgrade check is preformed, and it failed because I
have not installed VS 2008 SP1 yet. OK, I wanted to install that anyway, so I canceled
out and launched the VS 2008 SP1 installer. As with most service packs for Visual
Studio it takes awhile to apply, but my experience was more positive then the service
packs for VS 2005. No reboot was required, so I moved onto the TFS 2008 SP1 install.
</p>
        <p>
So I must have mis-understood or did not read something with the TFS 2008 SP1 installer.
It looks like it’s for the server components only, and VS 2008 SP1 handles upgrades
to Team Explorer as well. This <a href="http://www.woodwardweb.com/tfs/000444.html">blog
post</a> makes reference to this, and even says that if you are installing Team Explorer
on your TFS server, to install VS 2008 SP1. Looking at Help/About Microsoft Visual
Studio, I see the version number for VS 2008 is now 9.0.30729.1 SP, and looking at
the details for Team Explorer shows the same version number.
</p>
        <p>
Jumping back to the SQL 2008 installer, I proceeding with my update. However it wasn’t
really an update as much as it was a side by side install. Remember, I was just doing
the client tools, had I had the database components installed, I assume that those
would have been upgraded. I have a couple of SQL 2005 instances I can try an upgrade
on to see what happens. The install went very smoothly and there were no issues.
</p>
        <p>
First impressions of the new SQL Management studio are extremely positive. I saw the
intelli-sense demo at the launch event, but can’t really test it as I already have
SQL Prompt installed. My job as a Pseudo-DBA just got easier.Here are some new features
I found. 
</p>
        <ul>
          <li>
When running queries, you can view the results in traditional grid view, but also
as text (with options to choose your column delimiters), or export to a text (.rpt)
file. 
</li>
          <li>
The new activity monitor actually provides useful information (well alot more information
then the old one ever did). It reminds me of the task manager in Windows Server 2008.
The new activity monitor does not work with SQL 2000, but I will be eliminating all
SQL 2000 boxes by the end of September. As 4 line graphs across the top you get %
Processor time, Waiting Tasks, Database I/O and Batch Requests/Sec. On the bottom
you get 4 collapsible lists: Processes, Resource Waits, Data File I/O and Recent Expensive
Queries. 
</li>
          <li>
The database publishing wizard from Visual Studio is now included. Actually there
are a lot more options to control how your scripts are generated. 
</li>
          <li>
There are some very nice default reports built in now as well. The reports were an
add-on for SQL 2005, but they are now included (and you can of course write your own).
Stuff like Disk Usage, Index Usage, etc. I hope I can find a way to schedule these
to be emailed. 
</li>
          <li>
New option to generate Create and Drop Script (along with the original separate options
of generate create and generate drop). There is also an option to generate as SQL
Agent job.</li>
        </ul>
        <p>
Finally I went ahead and upgraded our TFS server to SP1. First thing I did was install
this month’s Windows Updates, as I was going to have to reboot anyway. Next up was
Visual Studio 2008 SP1, as I have VS and Team Explorer installed. Unfortunately I
was out of room on my system drive so I had to take the extra step of expanding my
virtual hard disk first. 
</p>
        <p>
I rebooted the server, and then proceeded to install TFS 2008 SP1. It looked like
everything was going good, but it failed at some point. Turns out the SQL server did
not survive the reboot, VS 2008 SP1, or the system drive expansion. Somehow my mssqlsystemresource.ldf
file got messed up at some point. The event log error stated “One or more files do
not match the primary file of the database.”. I got better information out of the
SQL error log which pointed me right to the System Resource ldf. I copied the ldf
file from another SQL 2005 server and was back in business. The TFS update proceeded
without incident after that. In case you are wondering, you can determine your TFS
version by looking at the version of Microsoft.TeamFoundation.Server.dll in %Program
Files%\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\Services\bin.
For SP1, the version number matches that which is displayed in Visual Studio 2008,
or 9.0.30729.1.
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=89e7ce6c-e260-417b-8c7f-1406725b6702" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Installing Visual Studio 2008 SP1, TFS 2008 SP1 and SQL 2008 RTM</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,89e7ce6c-e260-417b-8c7f-1406725b6702.aspx</guid>
      <link>http://blog.salvoz.com/2008/08/17/InstallingVisualStudio2008SP1TFS2008SP1AndSQL2008RTM.aspx</link>
      <pubDate>Sun, 17 Aug 2008 00:00:32 GMT</pubDate>
      <description>&lt;p&gt;
With the release of all Visual Studio 2008, TFS 2008, and SQL 2008, I set about upgrading
I set about upgrading my main development laptop. Currently I have VS 2008, Team Explorer
2008 and SQL 2005 client tools installed. I opted to download the full installer for
the SP1 updates as opposed to the bootstrapper options.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a title=".NET Framework 3.5 Service Pack 1 (Full Package)" href="http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe"&gt;.NET
Framework 3.5 Service Pack 1 (Full Package)&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=27673C47-B3B5-4C67-BD99-84E525B5CE61&amp;amp;displaylang=en"&gt;Visual
Studio 2008 SP1 (Full Package ISO)&lt;/a&gt; - &lt;a href="http://support.microsoft.com/kb/945140"&gt;Change
List&lt;/a&gt;&amp;nbsp; 
&lt;li&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9e40a5b6-da41-43a2-a06d-3cee196bfe3d&amp;amp;DisplayLang=en"&gt;TFS
2008 SP1 (Full Installer)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I knew I needed to install VS 2008 SP1 prior to TFS 2008 SP1, but for some reason
decided to go with the SQL upgrade first. As I mentioned before, I currently only
have the client tools installed, as I like to keep my SQL servers on virtualized development
servers. 
&lt;/p&gt;
&lt;p&gt;
The SQL 2008 installer starts off by checking for .Net 3.5 SP1, and if it does not
exist, it will install it on your machine, along with a hotfix for windows installer.
After this is complete, you are required to reboot your machine. I opted for the upgrade
option, hoping that everything just works. I’m not sure if you can do a side by side
install with SQL 2005 client tools and 2008. 
&lt;/p&gt;
&lt;p&gt;
After selecting my options, an upgrade check is preformed, and it failed because I
have not installed VS 2008 SP1 yet. OK, I wanted to install that anyway, so I canceled
out and launched the VS 2008 SP1 installer. As with most service packs for Visual
Studio it takes awhile to apply, but my experience was more positive then the service
packs for VS 2005. No reboot was required, so I moved onto the TFS 2008 SP1 install.
&lt;/p&gt;
&lt;p&gt;
So I must have mis-understood or did not read something with the TFS 2008 SP1 installer.
It looks like it’s for the server components only, and VS 2008 SP1 handles upgrades
to Team Explorer as well. This &lt;a href="http://www.woodwardweb.com/tfs/000444.html"&gt;blog
post&lt;/a&gt; makes reference to this, and even says that if you are installing Team Explorer
on your TFS server, to install VS 2008 SP1. Looking at Help/About Microsoft Visual
Studio, I see the version number for VS 2008 is now 9.0.30729.1 SP, and looking at
the details for Team Explorer shows the same version number.
&lt;/p&gt;
&lt;p&gt;
Jumping back to the SQL 2008 installer, I proceeding with my update. However it wasn’t
really an update as much as it was a side by side install. Remember, I was just doing
the client tools, had I had the database components installed, I assume that those
would have been upgraded. I have a couple of SQL 2005 instances I can try an upgrade
on to see what happens. The install went very smoothly and there were no issues.
&lt;/p&gt;
&lt;p&gt;
First impressions of the new SQL Management studio are extremely positive. I saw the
intelli-sense demo at the launch event, but can’t really test it as I already have
SQL Prompt installed. My job as a Pseudo-DBA just got easier.Here are some new features
I found. 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
When running queries, you can view the results in traditional grid view, but also
as text (with options to choose your column delimiters), or export to a text (.rpt)
file. 
&lt;li&gt;
The new activity monitor actually provides useful information (well alot more information
then the old one ever did). It reminds me of the task manager in Windows Server 2008.
The new activity monitor does not work with SQL 2000, but I will be eliminating all
SQL 2000 boxes by the end of September. As 4 line graphs across the top you get %
Processor time, Waiting Tasks, Database I/O and Batch Requests/Sec. On the bottom
you get 4 collapsible lists: Processes, Resource Waits, Data File I/O and Recent Expensive
Queries. 
&lt;li&gt;
The database publishing wizard from Visual Studio is now included. Actually there
are a lot more options to control how your scripts are generated. 
&lt;li&gt;
There are some very nice default reports built in now as well. The reports were an
add-on for SQL 2005, but they are now included (and you can of course write your own).
Stuff like Disk Usage, Index Usage, etc. I hope I can find a way to schedule these
to be emailed. 
&lt;li&gt;
New option to generate Create and Drop Script (along with the original separate options
of generate create and generate drop). There is also an option to generate as SQL
Agent job.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Finally I went ahead and upgraded our TFS server to SP1. First thing I did was install
this month’s Windows Updates, as I was going to have to reboot anyway. Next up was
Visual Studio 2008 SP1, as I have VS and Team Explorer installed. Unfortunately I
was out of room on my system drive so I had to take the extra step of expanding my
virtual hard disk first. 
&lt;/p&gt;
&lt;p&gt;
I rebooted the server, and then proceeded to install TFS 2008 SP1. It looked like
everything was going good, but it failed at some point. Turns out the SQL server did
not survive the reboot, VS 2008 SP1, or the system drive expansion. Somehow my mssqlsystemresource.ldf
file got messed up at some point. The event log error stated “One or more files do
not match the primary file of the database.”. I got better information out of the
SQL error log which pointed me right to the System Resource ldf. I copied the ldf
file from another SQL 2005 server and was back in business. The TFS update proceeded
without incident after that. In case you are wondering, you can determine your TFS
version by looking at the version of Microsoft.TeamFoundation.Server.dll in %Program
Files%\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\Services\bin.
For SP1, the version number matches that which is displayed in Visual Studio 2008,
or 9.0.30729.1.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=89e7ce6c-e260-417b-8c7f-1406725b6702" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,89e7ce6c-e260-417b-8c7f-1406725b6702.aspx</comments>
      <category>Technology</category>
      <category>Technology/Programming</category>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=0c1d5588-94f0-45e1-82e0-af6e1ae8dc93</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,0c1d5588-94f0-45e1-82e0-af6e1ae8dc93.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,0c1d5588-94f0-45e1-82e0-af6e1ae8dc93.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=0c1d5588-94f0-45e1-82e0-af6e1ae8dc93</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I spent the last day and a half trying to figure out why a query using FOR XML AUTO
was returning the wrong result set. Some background is in order. I’m migrating a database
from SQL 2000 to SQL 2005, as well as running the same database created from scripts
on SQL 2005 but in a different environment. Both databases contain the exact same
SQL in the stored procedure that was the source of the problem, but they were returning
different result sets. I even restored the database that worked to the server that
had the non-working database and saw that the database created from scripts was still
working as expected.
</p>
        <p>
I figured there was a database level setting causing the issue, so I opened up the
database properties for both databases and compared them side by side, except I missed
the 3 drop down boxes at the top, specifically the compatibility mode. I finally decided
to run the <a href="http://msdn.microsoft.com/en-us/library/ms144256.aspx">SQL 2005
Update Advisor</a>, which comes on the install media, or available online as a <a href="http://go.microsoft.com/fwlink/?LinkId=45788">download</a>.
After about 10 minutes of checking my database (it was across a remote connection),
it found the exact problem I was having, and the fix was to get rid of my derived
tables, or set the comparability mode to 90. 
</p>
        <p>
From the Upgrade Advisor help, here is an example of my original problem.
</p>
        <p>
Consider the following table:
</p>
        <pre class="csharpcode">
          <span class="kwrd">CREATE</span>
          <span class="kwrd">TABLE</span> Test(id <span class="kwrd">int</span>);
INSERT <span class="kwrd">INTO</span> Test <span class="kwrd">VALUES</span>(1); INSERT <span class="kwrd">INTO</span> Test <span class="kwrd">VALUES</span>(2);</pre>
        <pre class="csharpcode">Now run this query, which produces different results under different compatibility levels.</pre>
        <pre class="csharpcode">
          <span class="kwrd">SELECT</span> * <span class="kwrd">FROM</span> (<span class="kwrd">SELECT</span> a.id <span class="kwrd">AS</span> a,
b.id <span class="kwrd">AS</span> b <span class="kwrd">FROM</span> Test a <span class="kwrd">JOIN</span> Test
b <span class="kwrd">ON</span> a.id=b.id) <span class="kwrd">AS</span> DerivedTest <span class="kwrd">FOR</span> XML
AUTO; </pre>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <p>
 
</p>
        <p>
Under Compatibility Level 80 you get:
</p>
        <blockquote>
          <pre>&lt;a a="1"&gt;&lt;b b="1"/&gt;&lt;/a&gt;&lt;a a="2"&gt;&lt;b b="2"/&gt;&lt;/a&gt;</pre>
        </blockquote>
        <p>
Under Compatibility Level 90 you get:
</p>
        <blockquote>
          <pre>&lt;DerivedTest a="1" b="1"/&gt;&lt;DerivedTest a="2" b="2"/&gt;</pre>
        </blockquote>
        <p>
The XML under Level 90 is what I was looking for. Remmeber, under SQL 2000, the same
query worked fine, it was only under SQL 2005 with Level 80 that I started having
problems.
</p>
        <p>
Of course after switching to level 90 I found another bug, and wouldn’t you know it,
the compatibility wizard told me about this one as well, I just felt like ignoring
it at first. This time it was a problem with a table prefix in an order by clause.
Funny thing is, the table prefix didn’t even exist in the stored procedure, but under
SQL 2000 it worked fine. Turns out someone else had already fixed the issue in the
SQL 2005 version.
</p>
        <p>
While looking for the stored procedure in error (since at first I ignored the warning
in the upgrade advisor which even told me what stored procedure), I found a quick
way to search stored procedures and functions in SQL 2005.
</p>
        <pre class="csharpcode">
          <span class="kwrd">SELECT</span> ROUTINE_NAME, ROUTINE_DEFINITION <span class="kwrd">FROM</span> INFORMATION_SCHEMA.ROUTINES <span class="kwrd">WHERE</span> ROUTINE_DEFINITION <span class="kwrd">LIKE</span><span class="str">'%SearchString%'</span></pre>
        <p>
          <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        </p>
        <p>
Lesson of the day, try using and paying attention to the tools that Microsoft gives
you.
</p>
        <p>
          <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        </p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=0c1d5588-94f0-45e1-82e0-af6e1ae8dc93" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Sql 2000 to Sql 2005 upgrade FOR XML problem</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,0c1d5588-94f0-45e1-82e0-af6e1ae8dc93.aspx</guid>
      <link>http://blog.salvoz.com/2008/08/09/Sql2000ToSql2005UpgradeFORXMLProblem.aspx</link>
      <pubDate>Sat, 09 Aug 2008 21:13:25 GMT</pubDate>
      <description>&lt;p&gt;
I spent the last day and a half trying to figure out why a query using FOR XML AUTO
was returning the wrong result set. Some background is in order. I’m migrating a database
from SQL 2000 to SQL 2005, as well as running the same database created from scripts
on SQL 2005 but in a different environment. Both databases contain the exact same
SQL in the stored procedure that was the source of the problem, but they were returning
different result sets. I even restored the database that worked to the server that
had the non-working database and saw that the database created from scripts was still
working as expected.
&lt;/p&gt;
&lt;p&gt;
I figured there was a database level setting causing the issue, so I opened up the
database properties for both databases and compared them side by side, except I missed
the 3 drop down boxes at the top, specifically the compatibility mode. I finally decided
to run the &lt;a href="http://msdn.microsoft.com/en-us/library/ms144256.aspx"&gt;SQL 2005
Update Advisor&lt;/a&gt;, which comes on the install media, or available online as a &lt;a href="http://go.microsoft.com/fwlink/?LinkId=45788"&gt;download&lt;/a&gt;.
After about 10 minutes of checking my database (it was across a remote connection),
it found the exact problem I was having, and the fix was to get rid of my derived
tables, or set the comparability mode to 90. 
&lt;/p&gt;
&lt;p&gt;
From the Upgrade Advisor help, here is an example of my original problem.
&lt;/p&gt;
&lt;p&gt;
Consider the following table:
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;CREATE&lt;/span&gt; &lt;span class="kwrd"&gt;TABLE&lt;/span&gt; Test(id &lt;span class="kwrd"&gt;int&lt;/span&gt;);
INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; Test &lt;span class="kwrd"&gt;VALUES&lt;/span&gt;(1); INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; Test &lt;span class="kwrd"&gt;VALUES&lt;/span&gt;(2);&lt;/pre&gt;&lt;pre class="csharpcode"&gt;Now run this query, which produces different results under different compatibility levels.&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;FROM&lt;/span&gt; (&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; a.id &lt;span class="kwrd"&gt;AS&lt;/span&gt; a,
b.id &lt;span class="kwrd"&gt;AS&lt;/span&gt; b &lt;span class="kwrd"&gt;FROM&lt;/span&gt; Test a &lt;span class="kwrd"&gt;JOIN&lt;/span&gt; Test
b &lt;span class="kwrd"&gt;ON&lt;/span&gt; a.id=b.id) &lt;span class="kwrd"&gt;AS&lt;/span&gt; DerivedTest &lt;span class="kwrd"&gt;FOR&lt;/span&gt; XML
AUTO; &lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Under Compatibility Level 80 you get:
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;&amp;lt;a a="1"&amp;gt;&amp;lt;b b="1"/&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;a a="2"&amp;gt;&amp;lt;b b="2"/&amp;gt;&amp;lt;/a&amp;gt;&lt;/pre&gt;&lt;/blockquote&gt; 
&lt;p&gt;
Under Compatibility Level 90 you get:
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;&amp;lt;DerivedTest a="1" b="1"/&amp;gt;&amp;lt;DerivedTest a="2" b="2"/&amp;gt;&lt;/pre&gt;&lt;/blockquote&gt; 
&lt;p&gt;
The XML under Level 90 is what I was looking for. Remmeber, under SQL 2000, the same
query worked fine, it was only under SQL 2005 with Level 80 that I started having
problems.
&lt;/p&gt;
&lt;p&gt;
Of course after switching to level 90 I found another bug, and wouldn’t you know it,
the compatibility wizard told me about this one as well, I just felt like ignoring
it at first. This time it was a problem with a table prefix in an order by clause.
Funny thing is, the table prefix didn’t even exist in the stored procedure, but under
SQL 2000 it worked fine. Turns out someone else had already fixed the issue in the
SQL 2005 version.
&lt;/p&gt;
&lt;p&gt;
While looking for the stored procedure in error (since at first I ignored the warning
in the upgrade advisor which even told me what stored procedure), I found a quick
way to search stored procedures and functions in SQL 2005.
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; ROUTINE_NAME, ROUTINE_DEFINITION &lt;span class="kwrd"&gt;FROM&lt;/span&gt; INFORMATION_SCHEMA.ROUTINES &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; ROUTINE_DEFINITION &lt;span class="kwrd"&gt;LIKE&lt;/span&gt; &lt;span class="str"&gt;'%SearchString%'&lt;/span&gt; &lt;/pre&gt;
&lt;p&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/p&gt;
&lt;p&gt;
Lesson of the day, try using and paying attention to the tools that Microsoft gives
you.
&lt;/p&gt;
&lt;p&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=0c1d5588-94f0-45e1-82e0-af6e1ae8dc93" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,0c1d5588-94f0-45e1-82e0-af6e1ae8dc93.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=3fbb1539-d3b2-4f3f-9935-694738a72f60</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,3fbb1539-d3b2-4f3f-9935-694738a72f60.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,3fbb1539-d3b2-4f3f-9935-694738a72f60.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=3fbb1539-d3b2-4f3f-9935-694738a72f60</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Late last year I posted briefly on the <a href="http://blog.salvoz.com/2007/12/27/SqlPublishingWizard.aspx">SQL
Publishing Wizard</a>. I haven’t had a need for this since I reformatted and installed
Server 2008 64 bit as my main workstation at work, and wouldn’t you know it, it’s
not there now.
</p>
        <p>
As usual I headed off to Google and found some posts that pointed to this install
path, C:\Program Files\Microsoft SQL Server\90\Tools\Publishing\1.2. Seeing as I am
running a 64 bit Windows OS, my path is actually C:\Program Files (x86)\Microsoft
SQL Server\90\Tools\Publishing\1.2. Now you could just run SqlPubWiz.exe, or run the
VSInt.reg file to add the context menu option in Visual Studio 2008.
</p>
        <p>
Not so fast, the registry file doesn’t seem to work as is on a 74 bit OS due to the
new subkey, Wow6432Node. I modified VSInet.reg to include the keys the Wow6432node,
and in the end got my Publish to Provider context menu option back.
</p>
        <blockquote>
          <p>
Windows Registry Editor Version 5.00 
</p>
          <p>
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VWDExpress\9.0\Menus]<br />
"{40d75537-ce10-4311-a7b0-6b164d80405d}"=",1000,1"<br />
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Menus]<br />
"{40d75537-ce10-4311-a7b0-6b164d80405d}"=",1000,1" 
</p>
          <p>
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VWDExpress\9.0\Menus]<br />
"{40d75537-ce10-4311-a7b0-6b164d80405d}"=",1000,1"<br />
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\Menus]<br />
"{40d75537-ce10-4311-a7b0-6b164d80405d}"=",1000,1"
</p>
        </blockquote>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <pre class="c#" name="code"> </pre>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=3fbb1539-d3b2-4f3f-9935-694738a72f60" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Installing SQL Publishing Wizard for Visual Studio 2008 on a 64bit OS</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,3fbb1539-d3b2-4f3f-9935-694738a72f60.aspx</guid>
      <link>http://blog.salvoz.com/2008/07/29/InstallingSQLPublishingWizardForVisualStudio2008OnA64bitOS.aspx</link>
      <pubDate>Tue, 29 Jul 2008 16:10:48 GMT</pubDate>
      <description>&lt;p&gt;
Late last year I posted briefly on the &lt;a href="http://blog.salvoz.com/2007/12/27/SqlPublishingWizard.aspx"&gt;SQL
Publishing Wizard&lt;/a&gt;. I haven’t had a need for this since I reformatted and installed
Server 2008 64 bit as my main workstation at work, and wouldn’t you know it, it’s
not there now.
&lt;/p&gt;
&lt;p&gt;
As usual I headed off to Google and found some posts that pointed to this install
path, C:\Program Files\Microsoft SQL Server\90\Tools\Publishing\1.2. Seeing as I am
running a 64 bit Windows OS, my path is actually C:\Program Files (x86)\Microsoft
SQL Server\90\Tools\Publishing\1.2. Now you could just run SqlPubWiz.exe, or run the
VSInt.reg file to add the context menu option in Visual Studio 2008.
&lt;/p&gt;
&lt;p&gt;
Not so fast, the registry file doesn’t seem to work as is on a 74 bit OS due to the
new subkey, Wow6432Node. I modified VSInet.reg to include the keys the Wow6432node,
and in the end got my Publish to Provider context menu option back.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Windows Registry Editor Version 5.00 
&lt;p&gt;
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VWDExpress\9.0\Menus]&lt;br&gt;
"{40d75537-ce10-4311-a7b0-6b164d80405d}"=",1000,1"&lt;br&gt;
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Menus]&lt;br&gt;
"{40d75537-ce10-4311-a7b0-6b164d80405d}"=",1000,1" 
&lt;p&gt;
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VWDExpress\9.0\Menus]&lt;br&gt;
"{40d75537-ce10-4311-a7b0-6b164d80405d}"=",1000,1"&lt;br&gt;
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\Menus]&lt;br&gt;
"{40d75537-ce10-4311-a7b0-6b164d80405d}"=",1000,1"
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;pre class="c#" name="code"&gt;&amp;nbsp;&lt;/pre&gt;&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=3fbb1539-d3b2-4f3f-9935-694738a72f60" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,3fbb1539-d3b2-4f3f-9935-694738a72f60.aspx</comments>
      <category>Technology/Sql</category>
      <category>Technology/Tools</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=abf6adcf-b02b-46e1-9d18-8df7af4a0f15</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,abf6adcf-b02b-46e1-9d18-8df7af4a0f15.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,abf6adcf-b02b-46e1-9d18-8df7af4a0f15.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=abf6adcf-b02b-46e1-9d18-8df7af4a0f15</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just found a blog post by the <a href="http://blogs.msdn.com/sqlcat/default.aspx">Microsoft
SQL Server Development Customer Advisory Team</a>  entitled <a href="http://http://blogs.msdn.com/sqlcat/archive/2006/02/13/531339.aspx">How
can SQL Server 2005 help me evaluate and manage indexes?</a>. This post goes over
5 ways to analyze your index usage in SQL 2005. There looks to be some good technical
information on this blog, worthy of any DBA in training.
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=abf6adcf-b02b-46e1-9d18-8df7af4a0f15" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Indexes in SQL 2005</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,abf6adcf-b02b-46e1-9d18-8df7af4a0f15.aspx</guid>
      <link>http://blog.salvoz.com/2008/07/19/IndexesInSQL2005.aspx</link>
      <pubDate>Sat, 19 Jul 2008 23:48:03 GMT</pubDate>
      <description>&lt;p&gt;
Just found a blog post by the &lt;a href="http://blogs.msdn.com/sqlcat/default.aspx"&gt;Microsoft
SQL Server Development Customer Advisory Team&lt;/a&gt;&amp;nbsp; entitled &lt;a href="http://http://blogs.msdn.com/sqlcat/archive/2006/02/13/531339.aspx"&gt;How
can SQL Server 2005 help me evaluate and manage indexes?&lt;/a&gt;. This post goes over
5 ways to analyze your index usage in SQL 2005. There looks to be some good technical
information on this blog, worthy of any DBA in training.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=abf6adcf-b02b-46e1-9d18-8df7af4a0f15" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,abf6adcf-b02b-46e1-9d18-8df7af4a0f15.aspx</comments>
      <category>Technology/Review For Future Projects</category>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=a9a5db12-62a0-4fe4-aa83-43ddc3169cee</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,a9a5db12-62a0-4fe4-aa83-43ddc3169cee.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,a9a5db12-62a0-4fe4-aa83-43ddc3169cee.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a9a5db12-62a0-4fe4-aa83-43ddc3169cee</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I wanted to try out SQL 2008 for the upcoming Madison DotNet Code Fest. I had downloaded
the February CTP last week, and started out with that. I actually got everything installed
and went out to find the <a href="http://www.codeplex.com/MSFTDBProdSamples">sample
databases</a> on <a href="http://www.codeplex.com/">CodePlex</a>, and discovered that
RC0 had been released this week. Oh well, just revert the virtual machine to it’s
pre sql state and start over with RC0. 
</p>
        <p>
          <strong>Pre-Installation</strong>
        </p>
        <blockquote>
          <p>
            <strong>Pre Requisites</strong>
          </p>
          <p>
The following pre requisites were installed without issue as part of the setup process.
All pre requisites were included with the ISO.
</p>
          <ul>
            <li>
.Net Framework 3.5 
</li>
            <li>
.Net Framework 3.5 SP1 Beta 1 
</li>
            <li>
Hot fix for Windows Server 2003 (KB942288-v2) 
</li>
            <li>
Reboot 
</li>
            <li>
            </li>
          </ul>
          <p>
My base Windows 2003 VM has only an 8 GB system drive, so I install everything to
a second virtual hard drive which usually has a drive letter of E, as it does in this
case. So all of my install paths are to E:\, but the folder structure remains the
same.
</p>
          <p>
            <strong>SQL Server Installation Center</strong>
          </p>
          <p>
The SQL server setup has been completely revamped from SQL 2005, and there are some
noticeable additions from the February CTP as well (the most prominent is the addition
of a GUI option to use an existing configuration file). 
</p>
          <p>
Planning: Requirements, documentation, system configuration check, upgrade advisor
</p>
          <p>
Installation: New stand alone, new fail-over cluster, add node to cluster, upgrade
from SQL 2000 or 2005, search for production updates
</p>
          <p>
Maintenance: Edition Upgrade (like changing from developer to Enterprise), repair,
or remove from cluster
</p>
          <p>
Tools: System configuration checker, installed SQL server features discovery report,
upgrade integration services packages
</p>
          <p>
Resources: Documentation, community, CodePlex samples
</p>
          <p>
Advanced: Install based on configuration file, Advanced cluster prep and completion
</p>
          <p>
Options: Platform (x86, x64, ia64)
</p>
        </blockquote>
        <p>
          <strong>Installing</strong>
        </p>
        <blockquote>
          <p>
I went ahead with and chose the stand alone installation. Five items were checked
before I was allowed to proceed: Minimum OS version, setup administrator, restart
computer, WMI service, validation for SQL server registry keys. All items passed and
I proceeded to the product key. 
</p>
          <p>
The installation media seems to have all of the files for evaluation, express and
express with advanced services. I didn’t have a product key, so I just went with the
evaluation version, which should give me 180 days to evaluate. After selecting the
edition, I had to accept the EULA and then have some setup support files installed. 
</p>
          <p>
Another system check was run, and everything passed except I received a warning notification
because I had enabled the windows firewall. A message indicated I should check out
a page at Microsoft, but the page had no mention of firewall configuration. Clicking
next, I was brought to the Feature Selection page, and the main portion of SQL 2008
setup.
</p>
        </blockquote>
        <blockquote>
          <p>
            <strong>Feature Selection </strong>
          </p>
          <p>
These are the options I chose, and is not an all inclusive list.
</p>
          <ul>
            <li>
Instance Features 
<ul><li>
Database Engine 
</li><li>
Reporting Services (I’m interested to see how the non-IIS reporting services works)</li></ul></li>
            <li>
Shared Features 
</li>
            <ul>
              <li>
Business Intelligence Development Studio (to create some sample reports) 
</li>
              <li>
Client Tools Connectivity 
</li>
              <li>
Integration Services (Was required in Sql 2005 for maintenance plans) 
</li>
              <li>
Client Tools Backwards Compatibility 
</li>
              <li>
SQL Server Books Online 
</li>
              <li>
Management Tools – Basic (Management Studio, SQLCMD, and SQL Power Shell provider) 
</li>
              <li>
Management Tools – Complete (Support for Reporting Services, Analysis Services, and
Integration Services, SQL Profiler and DB Tuning Advisor) 
</li>
              <li>
Microsoft Sync Framework (interested to see how this works with mobile devices) 
</li>
            </ul>
          </ul>
          <p>
            <strong>Instance Configuration</strong> 
</p>
          <ul>
            <li>
Default instance 
</li>
            <li>
Instance ID: Default of MSSQLSERVER, however you can change this, and it automatically
updates the install paths 
</li>
            <li>
Instance root directory: E:\Program Files\Microsoft SQL Server\ 
</li>
            <li>
Computed SQL Server Directory: E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER 
</li>
            <li>
Computer Reporting Services Directory: E:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER</li>
          </ul>
        </blockquote>
        <blockquote>
          <p>
I do like how you can change the instance id for the default instance, as well as
choosing a named instance (which you’ve always been able to do). 
</p>
        </blockquote>
        <blockquote>
          <p>
            <strong>Disk Space Requirements</strong>
          </p>
          <p>
After selection your options and installation drives, you are presented with a screen
that shows drive space requirements. Unfortunately, even with changing all install
options to E, half of the required disk space is still targeting my C drive. 
</p>
          <ul>
            <li>
C:\windows: 1188 MB Required</li>
            <li>
Shared Features (E): 724 MB Required</li>
            <li>
Instance Directory: 267 MB Required</li>
          </ul>
          <p>
            <strong>Server Configuration</strong>
          </p>
          <p>
Here you configure the user accounts for each service. Sql Server Browser defaults
to Local Service. Sine I am not running in a domain, nor do I need access to any domain
resources, I created a local user account and used that for the Sql Server Agent,
Database Engine, Reporting Services, and Integration Services service. 
</p>
          <p>
You can also change the collation, but I left it as the default: SQL_Latin1_General_CP1_CI_AS
</p>
          <p>
            <strong>Database Engine</strong>
          </p>
          <p>
Account Provisioning: Windows Authentication or Mixed mode. I went with integrated,
and added two users to the server admin role.
</p>
          <p>
Data Directories:  Here you can choose the root data directory, as well as where
user data files, log files, and the system databases are installed to, wow, that is
a nice change. I’m using the default of E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Data,
but in our production systems, this would defiantly change. Being able to specify
this stuff at install time is awesome, and I can defiantly see the need for some install
scripts. 
</p>
          <p>
Filestream: Here you can enable FILEStream for T-SQL access. I have no idea what this
means, so I will leave it off for now. You have to specify a windows share name when
you enable to, so I am curious to find out more. You can also allow remote clients
to have access (via the share?). 
</p>
          <p>
            <strong>Reporting Services</strong>
          </p>
          <p>
You have three options, Native mode with default configuration, SharePoint with default
configuration, and install but do not configure. I’m going with the native with default
configuration in the essence of time. 
</p>
          <p>
            <strong>Installation Progress</strong>
          </p>
          <p>
Prior to starting the install, a final system check is performed, and all checks passed.
Before clicking install, you are presented a summary of what will be installed, as
well as given the path to the .ini file that contains the configuration. I have included
my path below, but it will very from install to install as the path includes a date
stamp: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20080618_142128\ConfigurationFile.ini
</p>
          <p>
          </p>
          <p>
          </p>
          <p>
          </p>
          <p>
          </p>
          <p>
          </p>
          <p>
          </p>
          <p>
          </p>
          <p>
          </p>
          <p>
The installation process took longer then I remember to install the February CTP,
but other then that, the install wen smoothly and no errors were encountered. 
</p>
        </blockquote>
        <p>
        </p>
        <blockquote>
          <p>
            <strong>Post Install</strong>
          </p>
        </blockquote>
        <blockquote>
          <p>
I went into the SQL server Configuration manager, and under Sql Server network Configuration,
I enabled TCP access so I could remotely connect to the SQL server. I also opened
up port 1433 to my local subnet in the Windows Firewall. 
</p>
        </blockquote>
        <p>
        </p>
        <p>
          <strong>First Thoughts</strong>
        </p>
        <blockquote>
          <p>
I tried connecting with SQL Management Studio 2005 to my new SQL 2008 instance, and
it failed, so that is a little disappointing, but not unexpected. Same goes for Visual
Studio 2008 pre-SP1 (since SP1 is still beta I have not installed it on my main machine),
but SP1 beta 1 fixes this issue.
</p>
          <p>
Management studio looks pretty much the same, just that there are new options in the
navigation tree such as auditing and resource governor. I was able to connect to a
SQL 2000 database without issue. I noticed a new publish to web service option when
right clicking on a database, but I’m not sure if this is part of SQL or the Sync
Framework. 
</p>
          <p>
The report manager site came up ok, but the reports site threw a permissions error
indicating my service account did not have the proper permissions.
</p>
        </blockquote>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=a9a5db12-62a0-4fe4-aa83-43ddc3169cee" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Sql 2008 RC0 Install</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,a9a5db12-62a0-4fe4-aa83-43ddc3169cee.aspx</guid>
      <link>http://blog.salvoz.com/2008/06/18/Sql2008RC0Install.aspx</link>
      <pubDate>Wed, 18 Jun 2008 21:03:12 GMT</pubDate>
      <description>&lt;p&gt;
I wanted to try out SQL 2008 for the upcoming Madison DotNet Code Fest. I had downloaded
the February CTP last week, and started out with that. I actually got everything installed
and went out to find the &lt;a href="http://www.codeplex.com/MSFTDBProdSamples"&gt;sample
databases&lt;/a&gt; on &lt;a href="http://www.codeplex.com/"&gt;CodePlex&lt;/a&gt;, and discovered that
RC0 had been released this week. Oh well, just revert the virtual machine to it’s
pre sql state and start over with RC0. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Pre-Installation&lt;/strong&gt;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Pre Requisites&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The following pre requisites were installed without issue as part of the setup process.
All pre requisites were included with the ISO.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
.Net Framework 3.5 
&lt;li&gt;
.Net Framework 3.5 SP1 Beta 1 
&lt;li&gt;
Hot fix for Windows Server 2003 (KB942288-v2) 
&lt;li&gt;
Reboot 
&lt;li&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
My base Windows 2003 VM has only an 8 GB system drive, so I install everything to
a second virtual hard drive which usually has a drive letter of E, as it does in this
case. So all of my install paths are to E:\, but the folder structure remains the
same.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;SQL Server Installation Center&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The SQL server setup has been completely revamped from SQL 2005, and there are some
noticeable additions from the February CTP as well (the most prominent is the addition
of a GUI option to use an existing configuration file). 
&lt;/p&gt;
&lt;p&gt;
Planning: Requirements, documentation, system configuration check, upgrade advisor
&lt;/p&gt;
&lt;p&gt;
Installation: New stand alone, new fail-over cluster, add node to cluster, upgrade
from SQL 2000 or 2005, search for production updates
&lt;/p&gt;
&lt;p&gt;
Maintenance: Edition Upgrade (like changing from developer to Enterprise), repair,
or remove from cluster
&lt;/p&gt;
&lt;p&gt;
Tools: System configuration checker, installed SQL server features discovery report,
upgrade integration services packages
&lt;/p&gt;
&lt;p&gt;
Resources: Documentation, community, CodePlex samples
&lt;/p&gt;
&lt;p&gt;
Advanced: Install based on configuration file, Advanced cluster prep and completion
&lt;/p&gt;
&lt;p&gt;
Options: Platform (x86, x64, ia64)
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Installing&lt;/strong&gt;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
I went ahead with and chose the stand alone installation. Five items were checked
before I was allowed to proceed: Minimum OS version, setup administrator, restart
computer, WMI service, validation for SQL server registry keys. All items passed and
I proceeded to the product key. 
&lt;/p&gt;
&lt;p&gt;
The installation media seems to have all of the files for evaluation, express and
express with advanced services. I didn’t have a product key, so I just went with the
evaluation version, which should give me 180 days to evaluate. After selecting the
edition, I had to accept the EULA and then have some setup support files installed. 
&lt;/p&gt;
&lt;p&gt;
Another system check was run, and everything passed except I received a warning notification
because I had enabled the windows firewall. A message indicated I should check out
a page at Microsoft, but the page had no mention of firewall configuration. Clicking
next, I was brought to the Feature Selection page, and the main portion of SQL 2008
setup.
&lt;/p&gt;
&lt;/blockquote&gt; &lt;blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Feature Selection &lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
These are the options I chose, and is not an all inclusive list.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Instance Features 
&lt;ul&gt;
&lt;li&gt;
Database Engine 
&lt;li&gt;
Reporting Services (I’m interested to see how the non-IIS reporting services works)&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Shared Features 
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
Business Intelligence Development Studio (to create some sample reports) 
&lt;li&gt;
Client Tools Connectivity 
&lt;li&gt;
Integration Services (Was required in Sql 2005 for maintenance plans) 
&lt;li&gt;
Client Tools Backwards Compatibility 
&lt;li&gt;
SQL Server Books Online 
&lt;li&gt;
Management Tools – Basic (Management Studio, SQLCMD, and SQL Power Shell provider) 
&lt;li&gt;
Management Tools – Complete (Support for Reporting Services, Analysis Services, and
Integration Services, SQL Profiler and DB Tuning Advisor) 
&lt;li&gt;
Microsoft Sync Framework (interested to see how this works with mobile devices) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Instance Configuration&lt;/strong&gt;&amp;nbsp;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Default instance 
&lt;li&gt;
Instance ID: Default of MSSQLSERVER, however you can change this, and it automatically
updates the install paths 
&lt;li&gt;
Instance root directory: E:\Program Files\Microsoft SQL Server\ 
&lt;li&gt;
Computed SQL Server Directory: E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER 
&lt;li&gt;
Computer Reporting Services Directory: E:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt; &lt;blockquote&gt; 
&lt;p&gt;
I do like how you can change the instance id for the default instance, as well as
choosing a named instance (which you’ve always been able to do). 
&lt;/p&gt;
&lt;/blockquote&gt; &lt;blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Disk Space Requirements&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
After selection your options and installation drives, you are presented with a screen
that shows drive space requirements. Unfortunately, even with changing all install
options to E, half of the required disk space is still targeting my C drive. 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
C:\windows: 1188 MB Required&lt;/li&gt;
&lt;li&gt;
Shared Features (E): 724 MB Required&lt;/li&gt;
&lt;li&gt;
Instance Directory: 267 MB Required&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Server Configuration&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Here you configure the user accounts for each service. Sql Server Browser defaults
to Local Service. Sine I am not running in a domain, nor do I need access to any domain
resources, I created a local user account and used that for the Sql Server Agent,
Database Engine, Reporting Services, and Integration Services service. 
&lt;/p&gt;
&lt;p&gt;
You can also change the collation, but I left it as the default: SQL_Latin1_General_CP1_CI_AS
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Database Engine&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Account Provisioning: Windows Authentication or Mixed mode. I went with integrated,
and added two users to the server admin role.
&lt;/p&gt;
&lt;p&gt;
Data Directories:&amp;nbsp; Here you can choose the root data directory, as well as where
user data files, log files, and the system databases are installed to, wow, that is
a nice change. I’m using the default of E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Data,
but in our production systems, this would defiantly change. Being able to specify
this stuff at install time is awesome, and I can defiantly see the need for some install
scripts. 
&lt;/p&gt;
&lt;p&gt;
Filestream: Here you can enable FILEStream for T-SQL access. I have no idea what this
means, so I will leave it off for now. You have to specify a windows share name when
you enable to, so I am curious to find out more. You can also allow remote clients
to have access (via the share?). 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Reporting Services&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
You have three options, Native mode with default configuration, SharePoint with default
configuration, and install but do not configure. I’m going with the native with default
configuration in the essence of time. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Installation Progress&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Prior to starting the install, a final system check is performed, and all checks passed.
Before clicking install, you are presented a summary of what will be installed, as
well as given the path to the .ini file that contains the configuration. I have included
my path below, but it will very from install to install as the path includes a date
stamp: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20080618_142128\ConfigurationFile.ini
&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
The installation process took longer then I remember to install the February CTP,
but other then that, the install wen smoothly and no errors were encountered. 
&lt;/p&gt;
&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Post Install&lt;/strong&gt;
&lt;/p&gt;
&lt;/blockquote&gt; &lt;blockquote&gt; 
&lt;p&gt;
I went into the SQL server Configuration manager, and under Sql Server network Configuration,
I enabled TCP access so I could remotely connect to the SQL server. I also opened
up port 1433 to my local subnet in the Windows Firewall. 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;First Thoughts&lt;/strong&gt;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
I tried connecting with SQL Management Studio 2005 to my new SQL 2008 instance, and
it failed, so that is a little disappointing, but not unexpected. Same goes for Visual
Studio 2008 pre-SP1 (since SP1 is still beta I have not installed it on my main machine),
but SP1 beta 1 fixes this issue.
&lt;/p&gt;
&lt;p&gt;
Management studio looks pretty much the same, just that there are new options in the
navigation tree such as auditing and resource governor. I was able to connect to a
SQL 2000 database without issue. I noticed a new publish to web service option when
right clicking on a database, but I’m not sure if this is part of SQL or the Sync
Framework. 
&lt;/p&gt;
&lt;p&gt;
The report manager site came up ok, but the reports site threw a permissions error
indicating my service account did not have the proper permissions.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=a9a5db12-62a0-4fe4-aa83-43ddc3169cee" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,a9a5db12-62a0-4fe4-aa83-43ddc3169cee.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=757c486e-bd34-43e1-8c0a-54c881e2a5c4</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,757c486e-bd34-43e1-8c0a-54c881e2a5c4.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,757c486e-bd34-43e1-8c0a-54c881e2a5c4.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=757c486e-bd34-43e1-8c0a-54c881e2a5c4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Continuing from my problems with installing reporting services, I now turn to configuring
reporting services running on Server 2008. I have a total of four front end web servers,
two for staging and two for production. Each pair points to the staging and production
databases respectively. I was following this Microsoft document on <a href="http://support.microsoft.com/kb/938245">how
to install and configure for server 2008</a>, but still ran into some errors. Both
errors where displayed in IE when trying to browse to <a href="http://localhost/reports">http://localhost/reports</a> (the
report manager site).
</p>
        <p>
          <strong>Error #1</strong>: rsReportServerNotActivated
</p>
        <blockquote>
          <p>
This turned out to be an error with the encryption keys. I searched for documentation
on setting up a web farm, and from what I found, there really was no mention on syncing
the encryption keys, but ultimately that's what I ended up doing to get both front
end web servers to show as initialized. 
</p>
          <p>
Starting with my staging servers, I looked in the ReportServer.Keys table, and saw
that I had two entries, one for each web server. However, run of them was missing
data in the SymmetricKey column. I exported the key using the Reporting Services Configuration
tool from one server, and imported that key (again using the Configuration tool). 
This fixed the error on my staging server, but led be to Error #2 (see below). 
</p>
          <p>
On my production servers, I had web100 showing as activated, but web101 showing as
not activated (nor would it activate). There was a row in the keys table for web100
and web101, but I couldn't export the key from web100 like I could in staging. Attempting
to export the key from web101 gave me an error saying it couldn't export the key,
which made sense since it didn't have one. I tried using TSQL to copy the contents
of the row for web100 in the Keys table to web101, but while it executed, it didn't
fix the problem. I was a little frustrated at this point and just deleted all three
rows from the keys table.
</p>
          <p>
Wait a minute, where did the 3rd row come from? Back in the configuration tool, neither
server was shown as activated, in fact, neither server was shown at all! Turns out
that 3rd row has some dummy data in it that must be used somewhere. In case anyone
did what I did, you can just add the row back in. All columns are null except InstallationID
= 00000000-0000-0000-0000-000000000000, and Client = -1.
</p>
          <p>
I went back to the configuration tool on web101 and under encryption keys, I hit delete.
Looking back in the Keys table I saw I had a row for web101 again, and I was able
to export this key. I promptly imported this key in on web100 and both servers activated. 
</p>
          <p>
After a quick reboot to verify that everything worked still, I was able to move onto
the staging servers and Error #2. Yes, I did backup both encryption keys to a safe
location for DR purposes. 
</p>
        </blockquote>
        <p>
          <strong>Error #2</strong>: The report server is not responding. Verify that the report
server is running and can be accessed from this computer. 
</p>
        <blockquote>
          <p>
I was getting Error #2 on web200 (figure out our naming convention yet?). This server
was also showing an error in the event log: Report Manager cannot create the trace
log %Program Files%\Microsoft SQL Server\MSSQL.1\Reporting Services\LogFiles\ReportServerWebApp__06_06_2008_14_40_25.log.
This indicates a problem with permissions somewhere I'm guessing. 
</p>
          <p>
For all of my web servers, I've created a new SqlRsAppPool set to classic mode, which
runs as a domain account. This domain account is specified in the configuration tool
as the account to use when connecting to the ReportServer database as well. The web
service setting in the configuration tool is configured to use the Local Service account.
Had I not had 3 other servers running correctly, I would have tried setting the web
service to the domain account as well. 
</p>
          <p>
Reporting Services uses to local groups named SQLServer2005ReportingServicesWebServiceUser$MachineName$Instance
and SQLServer2005ReportServerUser$MachineName$Instance, and I compared those groups
between my two staging servers, and the users were the same (WebServiceUser had my
domain account and ReportServerUser had Local Service). I next comapred the permissions
on the folders in %Program Files%\Microsoft SQL Server\MSSQL.1\Reporting Services
between both machines, and they were the same.
</p>
          <p>
I decided to reboot the problem server while I went and downloaded the latest version
of <a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx">Process
Monitor</a>, which happens to be at v1.33. I wish I could say I found some whacky
permission that didn't get set by the configuration tool, but, rebooting the server
seems to have fixed the problem. I know I restarted the Reporting Services window
service, but I don't think I tried restarting IIS and the app pool. Oh well, I'm sure
my download of Process Monitor will not be in vain. 
</p>
        </blockquote>
        <p>
          <strong>Other Notes</strong>
        </p>
        <p>
Overall the <a href="http://support.microsoft.com/kb/938245">how to install and configure
for server 2008</a> guide was pretty good. The registry keys that say that you should
have don't seem to be all that important, as I was missing some of them on my working
servers from the get go. I did follow the steps to enable my account to login to the
report manager without using the Run As Administrator command. 
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=757c486e-bd34-43e1-8c0a-54c881e2a5c4" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Reporting Services on Server 2008</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,757c486e-bd34-43e1-8c0a-54c881e2a5c4.aspx</guid>
      <link>http://blog.salvoz.com/2008/06/06/ReportingServicesOnServer2008.aspx</link>
      <pubDate>Fri, 06 Jun 2008 20:40:25 GMT</pubDate>
      <description>&lt;p&gt;
Continuing from my problems with installing reporting services, I now turn to configuring
reporting services running on Server 2008. I have a total of four front end web servers,
two for staging and two for production. Each pair points to the staging and production
databases respectively. I was following this Microsoft document on &lt;a href="http://support.microsoft.com/kb/938245"&gt;how
to install and configure for server 2008&lt;/a&gt;, but still ran into some errors. Both
errors where displayed in IE when trying to browse to &lt;a href="http://localhost/reports"&gt;http://localhost/reports&lt;/a&gt; (the
report manager site).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Error #1&lt;/strong&gt;: rsReportServerNotActivated
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
This turned out to be an error with the encryption keys. I searched for documentation
on setting up a web farm, and from what I found, there really was no mention on syncing
the encryption keys, but ultimately that's what I ended up doing to get both front
end web servers to show as initialized. 
&lt;/p&gt;
&lt;p&gt;
Starting with my staging servers, I looked in the ReportServer.Keys table, and saw
that I had two entries, one for each web server. However, run of them was missing
data in the SymmetricKey column. I exported the key using the Reporting Services Configuration
tool from one server, and imported that key (again using the Configuration tool).&amp;nbsp;
This fixed the error on my staging server, but led be to Error #2 (see below). 
&lt;/p&gt;
&lt;p&gt;
On my production servers, I had web100 showing as activated, but web101 showing as
not activated (nor would it activate). There was a row in the keys table for web100
and web101, but I couldn't export the key from web100 like I could in staging. Attempting
to export the key from web101 gave me an error saying it couldn't export the key,
which made sense since it didn't have one. I tried using TSQL to copy the contents
of the row for web100 in the Keys table to web101, but while it executed, it didn't
fix the problem. I was a little frustrated at this point and just deleted all three
rows from the keys table.
&lt;/p&gt;
&lt;p&gt;
Wait a minute, where did the 3rd row come from? Back in the configuration tool, neither
server was shown as activated, in fact, neither server was shown at all! Turns out
that 3rd row has some dummy data in it that must be used somewhere. In case anyone
did what I did, you can just add the row back in. All columns are null except InstallationID
= 00000000-0000-0000-0000-000000000000, and Client = -1.
&lt;/p&gt;
&lt;p&gt;
I went back to the configuration tool on web101 and under encryption keys, I hit delete.
Looking back in the Keys table I saw I had a row for web101 again, and I was able
to export this key. I promptly imported this key in on web100 and both servers activated. 
&lt;/p&gt;
&lt;p&gt;
After a quick reboot to verify that everything worked still, I was able to move onto
the staging servers and Error #2. Yes, I did backup both encryption keys to a safe
location for DR purposes. 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Error #2&lt;/strong&gt;: The report server is not responding. Verify that the report
server is running and can be accessed from this computer. 
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
I was getting Error #2 on web200 (figure out our naming convention yet?). This server
was also showing an error in the event log: Report Manager cannot create the trace
log %Program Files%\Microsoft SQL Server\MSSQL.1\Reporting Services\LogFiles\ReportServerWebApp__06_06_2008_14_40_25.log.
This indicates a problem with permissions somewhere I'm guessing. 
&lt;/p&gt;
&lt;p&gt;
For all of my web servers, I've created a new SqlRsAppPool set to classic mode, which
runs as a domain account. This domain account is specified in the configuration tool
as the account to use when connecting to the ReportServer database as well. The web
service setting in the configuration tool is configured to use the Local Service account.
Had I not had 3 other servers running correctly, I would have tried setting the web
service to the domain account as well. 
&lt;/p&gt;
&lt;p&gt;
Reporting Services uses to local groups named SQLServer2005ReportingServicesWebServiceUser$MachineName$Instance
and SQLServer2005ReportServerUser$MachineName$Instance, and I compared those groups
between my two staging servers, and the users were the same (WebServiceUser had my
domain account and ReportServerUser had Local Service). I next comapred the permissions
on the folders in %Program Files%\Microsoft SQL Server\MSSQL.1\Reporting Services
between both machines, and they were the same.
&lt;/p&gt;
&lt;p&gt;
I decided to reboot the problem server while I went and downloaded the latest version
of &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx"&gt;Process
Monitor&lt;/a&gt;, which happens to be at v1.33. I wish I could say I found some whacky
permission that didn't get set by the configuration tool, but, rebooting the server
seems to have fixed the problem. I know I restarted the Reporting Services window
service, but I don't think I tried restarting IIS and the app pool. Oh well, I'm sure
my download of Process Monitor will not be in vain. 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Other Notes&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Overall the &lt;a href="http://support.microsoft.com/kb/938245"&gt;how to install and configure
for server 2008&lt;/a&gt; guide was pretty good. The registry keys that say that you should
have don't seem to be all that important, as I was missing some of them on my working
servers from the get go. I did follow the steps to enable my account to login to the
report manager without using the Run As Administrator command. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=757c486e-bd34-43e1-8c0a-54c881e2a5c4" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,757c486e-bd34-43e1-8c0a-54c881e2a5c4.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=9ee0a848-0cc3-43e6-bae7-10cf228250ff</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,9ee0a848-0cc3-43e6-bae7-10cf228250ff.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,9ee0a848-0cc3-43e6-bae7-10cf228250ff.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=9ee0a848-0cc3-43e6-bae7-10cf228250ff</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Even though I have no intention of directly exposing reporting services to the Internet,
I still felt that it made the most sense to install the web front end components for
SQL RS on our web servers located in our presentation DMZ. However, this proved to
be somewhat of a challenge. 
</p>
        <p>
Apparently, there is a check in the setup file that limits your installation options
on Server 2008 web edition to the client tools only. It took awhile of searching on
Google, but I finally <a href="http://www.jsportals.com/Home/tabid/36/EntryID/3/Default.aspx">found</a> my
first lead, and am embarrassed because I didn't think of it myself. All of the various
SQL components have their own MSI installers on the install media, located in either
Tools or Servers. For reporting services, you need to run the SqlRun_RS.msi located
in Servers\Setup.
</p>
        <p>
I was still running into a problem however, soon after the MSI was launched I was
getting a cryptic error message, followed by a second error message stating I didn't
have access to a directory. Even though I had launched windows explorer as an administrator,
I still couldn't get it to run. I decided to turn off UAC, reboot and try again. This
time, the install was successful. I followed up the Sql RS install by installing SQL
SP2, and then turned UAC back on.
</p>
        <p>
Microsoft has a good document on how to configure SQL RS on Windows Server 2008, <a href="http://support.microsoft.com/kb/938245">http://support.microsoft.com/kb/938245</a>,
which is what I used for the rest of the install. The document does state that under
More Information that  you can install SQL RS "On any edition of Windows Server
2008".
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=9ee0a848-0cc3-43e6-bae7-10cf228250ff" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Installing SQL 2005 Reporting Services on Windows Server 2008 Web Edition</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,9ee0a848-0cc3-43e6-bae7-10cf228250ff.aspx</guid>
      <link>http://blog.salvoz.com/2008/06/05/InstallingSQL2005ReportingServicesOnWindowsServer2008WebEdition.aspx</link>
      <pubDate>Thu, 05 Jun 2008 15:14:00 GMT</pubDate>
      <description>&lt;p&gt;
Even though I have no intention of directly exposing reporting services to the Internet,
I still felt that it made the most sense to install the web front end components for
SQL RS on our web servers located in our presentation DMZ. However, this proved to
be somewhat of a challenge. 
&lt;/p&gt;
&lt;p&gt;
Apparently, there is a check in the setup file that limits your installation options
on Server 2008 web edition to the client tools only. It took awhile of searching on
Google, but I finally &lt;a href="http://www.jsportals.com/Home/tabid/36/EntryID/3/Default.aspx"&gt;found&lt;/a&gt; my
first lead, and am embarrassed because I didn't think of it myself. All of the various
SQL components have their own MSI installers on the install media, located in either
Tools or Servers. For reporting services, you need to run the SqlRun_RS.msi located
in Servers\Setup.
&lt;/p&gt;
&lt;p&gt;
I was still running into a problem however, soon after the MSI was launched I was
getting a cryptic error message, followed by a second error message stating I didn't
have access to a directory. Even though I had launched windows explorer as an administrator,
I still couldn't get it to run. I decided to turn off UAC, reboot and try again. This
time, the install was successful. I followed up the Sql RS install by installing SQL
SP2, and then turned UAC back on.
&lt;/p&gt;
&lt;p&gt;
Microsoft has a good document on how to configure SQL RS on Windows Server 2008, &lt;a href="http://support.microsoft.com/kb/938245"&gt;http://support.microsoft.com/kb/938245&lt;/a&gt;,
which is what I used for the rest of the install. The document does state that under
More Information that&amp;nbsp; you can install SQL RS "On any edition of Windows Server
2008".
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=9ee0a848-0cc3-43e6-bae7-10cf228250ff" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,9ee0a848-0cc3-43e6-bae7-10cf228250ff.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=dea71049-c69f-4b92-9404-5928ec954a35</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,dea71049-c69f-4b92-9404-5928ec954a35.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,dea71049-c69f-4b92-9404-5928ec954a35.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=dea71049-c69f-4b92-9404-5928ec954a35</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Don't ask....
</p>
        <ul>
          <li>
Shutdown your SQL Server service, from the services MMC</li>
          <li>
Stop all services and applications from connecting to your SQL server. If they are
connecting via the network, you could use the windows firewall to restrict access.
The reason for this, is once you are in single user mode, another application may
connect and consume the one connection.</li>
          <li>
Open a command prompt window and navigate to the location of SqlServr, which should
be %Program Files%\Microsoft SQL Server\MSSQL.1\MSSQL\Binn. 
</li>
          <li>
Type sqlservr -m to start SQL server in single user mode</li>
          <li>
Open Sql Server Management Studio (SSMS) and connect to your SQL server</li>
          <li>
Fix your security</li>
          <li>
Go back to the command prompt window and press ctrl+c, and then Y to stop SQL server</li>
          <li>
Restart SQL server, and any dependent services (like SQL agent) in the services MMC.</li>
        </ul>
        <p>
If you have UAC enabled (Vista or Win2k8) you have to run the command prompt, and
SSMS as an administrator.
</p>
        <p>
 
</p>
        <p>
Question...does it really matter if you deny local computer and domain administrators
access to the SQL server, if any local administrator can restart SQL server in single
user mode? The reason I ask, is there are a lot of "Best Practices" that say you should
deny access to normal computer administrators. I've even heard that in some industries
and sectors such as legal, healthcare, etc, you have to restrict who has access to
the data. Maybe it's just a you need to make a good effort. 
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=dea71049-c69f-4b92-9404-5928ec954a35" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>How to recover your sql server if you can't login</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,dea71049-c69f-4b92-9404-5928ec954a35.aspx</guid>
      <link>http://blog.salvoz.com/2008/05/30/HowToRecoverYourSqlServerIfYouCantLogin.aspx</link>
      <pubDate>Fri, 30 May 2008 23:04:44 GMT</pubDate>
      <description>&lt;p&gt;
Don't ask....
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Shutdown your SQL Server service, from the services MMC&lt;/li&gt;
&lt;li&gt;
Stop all services and applications from connecting to your SQL server. If they are
connecting via the network, you could use the windows firewall to restrict access.
The reason for this, is once you are in single user mode, another application may
connect and consume the one connection.&lt;/li&gt;
&lt;li&gt;
Open a command prompt window and navigate to the location of SqlServr, which should
be %Program Files%\Microsoft SQL Server\MSSQL.1\MSSQL\Binn. 
&lt;/li&gt;
&lt;li&gt;
Type sqlservr -m to start SQL server in single user mode&lt;/li&gt;
&lt;li&gt;
Open Sql Server Management Studio (SSMS) and connect to your SQL server&lt;/li&gt;
&lt;li&gt;
Fix your security&lt;/li&gt;
&lt;li&gt;
Go back to the command prompt window and press ctrl+c, and then Y to stop SQL server&lt;/li&gt;
&lt;li&gt;
Restart SQL server, and any dependent services (like SQL agent) in the services MMC.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
If you have UAC enabled (Vista or Win2k8) you have to run the command prompt, and
SSMS as an administrator.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Question...does it really matter if you deny local computer and domain administrators
access to the SQL server, if any local administrator can restart SQL server in single
user mode? The reason I ask, is there are a lot of "Best Practices" that say you should
deny access to normal computer administrators. I've even heard that in some industries
and sectors such as legal, healthcare, etc, you have to restrict who has access to
the data. Maybe it's just a you need to make a good effort. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=dea71049-c69f-4b92-9404-5928ec954a35" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,dea71049-c69f-4b92-9404-5928ec954a35.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=7775258d-e23e-45d8-b075-21b2f968076a</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,7775258d-e23e-45d8-b075-21b2f968076a.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,7775258d-e23e-45d8-b075-21b2f968076a.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7775258d-e23e-45d8-b075-21b2f968076a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So I have been continuing on my new assignment of setting up servers for our new infrastructure,
and it's somewhat boring and repetitive after the first one. I was hoping to knock
out the last 3 SQL servers today, but I couldn't get our schedule maintenance plans
to run. I kept getting an error stating that "The owner (Domain\User) of job &lt;Job
Name&gt; does not have server access." Well, I am the owner, and I have SysAdmin permissions,
and I am the one who created the jobs, so what could it be?
</p>
        <p>
Originally I had imported the maintenance plans from a file share that I had exported
the maintenance plans from a non-member server, and then imported those maintenance
plans into two other servers. I tried creating a new job on one of the servers, thinking
that was something wrong with the import process, but nope, I get the same error on
all three servers. Another member server, configured exactly same, just setup the
day before, works fine, with my account as the job owner.
</p>
        <p>
Off to Google I go. I found some references to the error, but allot of them were for
a KB article relating to SQL 2000, and it had a service pack fix. I did find a command
( exec xp_logininfo 'username' ), which is supposed to help you verify if your account
is setup correctly, and apparently mine is not. I get an empty result set on the 3
servers I am having problems with, and one row with the correct information on the
working server. 
</p>
        <p>
I was actually happy to see the empty row set on the three non-working servers, as
now I can search on exec xp_logininfo instead of the error I was getting with the
job, to hopefully find a solution to my problem. Unfortunatly, I didn't get many hits
that applied to my situation. Running the xp_loginfo on both the working and non-working
servers yielded some interesting information. I decided to add a domain group that
my account belonged to, to both a working and non-working server. Re-running the xp_logininfo
showed 1 row on the non-working server, and 2 rows on the working server. The permission
path column on the working server showed null for the first row (which was present
before adding the group), and the 2nd row shows the group I just added (which is the
same as the non-working server after adding the group).
</p>
        <p>
Somehow, the one working server has some extra permission set somewhere. I think this
may be because I might have manually added my domain account on the working server,
but I let a MS tool that auto-runs after SQL SP2 add my account. Sure enough, adding
my domain account manually fixed the original problem, and the results of the xp_logininfo
now match between all servers.
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=7775258d-e23e-45d8-b075-21b2f968076a" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>SQL Server 2005 Jobs not executing</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,7775258d-e23e-45d8-b075-21b2f968076a.aspx</guid>
      <link>http://blog.salvoz.com/2008/05/30/SQLServer2005JobsNotExecuting.aspx</link>
      <pubDate>Fri, 30 May 2008 21:48:50 GMT</pubDate>
      <description>&lt;p&gt;
So I have been continuing on my new assignment of setting up servers for our new infrastructure,
and it's somewhat boring and repetitive after the first one. I was hoping to knock
out the last 3 SQL servers today, but I couldn't get our schedule maintenance plans
to run. I kept getting an error stating that "The owner (Domain\User) of job &amp;lt;Job
Name&amp;gt; does not have server access." Well, I am the owner, and I have SysAdmin permissions,
and I am the one who created the jobs, so what could it be?
&lt;/p&gt;
&lt;p&gt;
Originally I had imported the maintenance plans from a file share that I had exported
the maintenance plans from a non-member server, and then imported those maintenance
plans into two other servers. I tried creating a new job on one of the servers, thinking
that was something wrong with the import process, but nope, I get the same error on
all three servers. Another member server, configured exactly same, just setup the
day before, works fine, with my account as the job owner.
&lt;/p&gt;
&lt;p&gt;
Off to Google I go. I found some references to the error, but allot of them were for
a KB article relating to SQL 2000, and it had a service pack fix. I did find a command
( exec xp_logininfo 'username' ), which is supposed to help you verify if your account
is setup correctly, and apparently mine is not. I get an empty result set on the 3
servers I am having problems with, and one row with the correct information on the
working server. 
&lt;/p&gt;
&lt;p&gt;
I was actually happy to see the empty row set on the three non-working servers, as
now I can search on exec xp_logininfo instead of the error I was getting with the
job, to hopefully find a solution to my problem. Unfortunatly, I didn't get many hits
that applied to my situation. Running the xp_loginfo on both the working and non-working
servers yielded some interesting information. I decided to add a domain group that
my account belonged to, to both a working and non-working server. Re-running the xp_logininfo
showed 1 row on the non-working server, and 2 rows on the working server. The permission
path column on the working server showed null for the first row (which was present
before adding the group), and the 2nd row shows the group I just added (which is the
same as the non-working server after adding the group).
&lt;/p&gt;
&lt;p&gt;
Somehow, the one working server has some extra permission set somewhere. I think this
may be because I might have manually added my domain account on the working server,
but I let a MS tool that auto-runs after SQL SP2 add my account. Sure enough, adding
my domain account manually fixed the original problem, and the results of the xp_logininfo
now match between all servers.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=7775258d-e23e-45d8-b075-21b2f968076a" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,7775258d-e23e-45d8-b075-21b2f968076a.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=7a457d56-d7ee-4a59-8a6f-2ed77b638495</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,7a457d56-d7ee-4a59-8a6f-2ed77b638495.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,7a457d56-d7ee-4a59-8a6f-2ed77b638495.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7a457d56-d7ee-4a59-8a6f-2ed77b638495</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've been working on setting up servers the past week, and will be continuing for
the rest of may. Included in that are BizTalk and SQL servers. Part of our setup procedure
is to document everything so that we have consistency between servers. It's boring
and tedious but necessary. 
</p>
        <p>
While looking up some info on DB Mail in SQL 2005, I came across a good <a href="http://www.brentozar.com/archive/2008/03/sql-server-2005-setup-checklist-part-2-after-the-install/">post</a> by
Brent Ozar on some post install steps.  It covered a few things I hadn't thought
about, but have since added to our build documentation. 
</p>
        <p>
Brent's post also had links to the SQL 2005 Dashboard Performance Reports. One of
the links was to an excellent <a href="http://www.sql-server-performance.com/articles/per/bm_performance_dashboard_2005_p1.aspx">write
up</a> of the installation and use of the reports by <a href="http://www.sql-server-performance.com/authors/bradm.aspx">Brad
McGehee</a>.
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=7a457d56-d7ee-4a59-8a6f-2ed77b638495" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>SQL 2005 post install steps</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,7a457d56-d7ee-4a59-8a6f-2ed77b638495.aspx</guid>
      <link>http://blog.salvoz.com/2008/05/12/SQL2005PostInstallSteps.aspx</link>
      <pubDate>Mon, 12 May 2008 18:18:43 GMT</pubDate>
      <description>&lt;p&gt;
I've been working on setting up servers the past week, and will be continuing for
the rest of may. Included in that are BizTalk and SQL servers. Part of our setup procedure
is to document everything so that we have consistency between servers. It's boring
and tedious but necessary. 
&lt;/p&gt;
&lt;p&gt;
While looking up some info on DB Mail in SQL 2005, I came across a good &lt;a href="http://www.brentozar.com/archive/2008/03/sql-server-2005-setup-checklist-part-2-after-the-install/"&gt;post&lt;/a&gt; by
Brent Ozar on some post install steps.&amp;nbsp; It covered a few things I hadn't thought
about, but have since added to our build documentation. 
&lt;/p&gt;
&lt;p&gt;
Brent's post also had links to the SQL 2005 Dashboard Performance Reports. One of
the links was to an excellent &lt;a href="http://www.sql-server-performance.com/articles/per/bm_performance_dashboard_2005_p1.aspx"&gt;write
up&lt;/a&gt; of the installation and use of the reports by &lt;a href="http://www.sql-server-performance.com/authors/bradm.aspx"&gt;Brad
McGehee&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=7a457d56-d7ee-4a59-8a6f-2ed77b638495" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,7a457d56-d7ee-4a59-8a6f-2ed77b638495.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=ef2978bd-856e-4bab-aecb-031bc721eb5d</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,ef2978bd-856e-4bab-aecb-031bc721eb5d.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,ef2978bd-856e-4bab-aecb-031bc721eb5d.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ef2978bd-856e-4bab-aecb-031bc721eb5d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today I downloaded and installed the Sql Server 2005 Express Advanced edition for
a test project I was working on. I needed to enable remote connections, so I when
to the surface area configuration wizard and enabled remote connections thru tcp,
and I opened port 1433 on the computer's firewall. However, I could not connect.
</p>
        <p>
Running a netstat -an showed nothing listening on port 1433. Doing some searching
I found an outdated post on the sql express blog that helped me fix the problem.
</p>
        <ol>
          <li>
Open Sql Server Configuration Manager</li>
          <li>
Expand Protocols for SQLEXpress under SqlServer 2005 Network Configuration and click
on Tcp/Ip</li>
          <li>
On the IP Addresses tab, scroll to find the IpAny entry.</li>
          <li>
Clear out the field for dynamic ports and put in 1433 for the TCP Port</li>
          <li>
Restart SQL Server.</li>
        </ol>
        <p>
The reason you have to do this, is by default the SqlBrowser service (port 1434) is
not running by default. When clients try to connect, they must know the port to connect
to. The default sql port is 1433, so once we have that setup, even if the SqlBrowser
service is not running, or is blocked by the firewall, we can still connect.
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=ef2978bd-856e-4bab-aecb-031bc721eb5d" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Sql Express 2005 Remote Connections</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,ef2978bd-856e-4bab-aecb-031bc721eb5d.aspx</guid>
      <link>http://blog.salvoz.com/2008/05/01/SqlExpress2005RemoteConnections.aspx</link>
      <pubDate>Thu, 01 May 2008 00:18:45 GMT</pubDate>
      <description>&lt;p&gt;
Today I downloaded and installed the Sql Server 2005 Express Advanced edition for
a test project I was working on. I needed to enable remote connections, so I when
to the surface area configuration wizard and enabled remote connections thru tcp,
and I opened port 1433 on the computer's firewall. However, I could not connect.
&lt;/p&gt;
&lt;p&gt;
Running a netstat -an showed nothing listening on port 1433. Doing some searching
I found an outdated post on the sql express blog that helped me fix the problem.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Open Sql Server Configuration Manager&lt;/li&gt;
&lt;li&gt;
Expand Protocols for SQLEXpress under SqlServer 2005 Network Configuration and click
on Tcp/Ip&lt;/li&gt;
&lt;li&gt;
On the IP Addresses tab, scroll to find the IpAny entry.&lt;/li&gt;
&lt;li&gt;
Clear out the field for dynamic ports and put in 1433 for the TCP Port&lt;/li&gt;
&lt;li&gt;
Restart SQL Server.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
The reason you have to do this, is by default the SqlBrowser service (port 1434) is
not running by default. When clients try to connect, they must know the port to connect
to. The default sql port is 1433, so once we have that setup, even if the SqlBrowser
service is not running, or is blocked by the firewall, we can still connect.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=ef2978bd-856e-4bab-aecb-031bc721eb5d" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,ef2978bd-856e-4bab-aecb-031bc721eb5d.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=ce9dbbd6-c9f1-4516-baed-aef4fe1f3410</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,ce9dbbd6-c9f1-4516-baed-aef4fe1f3410.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,ce9dbbd6-c9f1-4516-baed-aef4fe1f3410.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ce9dbbd6-c9f1-4516-baed-aef4fe1f3410</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I attended the Hero's Happen Here launch event held in Madison, WI yesterday. The
event was held at the Westside Marriott, and featured a morning and afternoon session,
each with multiple tracks. Future planning note, the local McDonald's was not prepared
for the rush between the two sessions ;)
</p>
        <p>
I was registered for the IT Infrastructure track in the morning session (I think),
but it didn't really matter. Once you got in, you could float between tracks, and
I ended up standing on the back wall for a couple of the presentations so I could
move more freely and answer phone calls (my on call week). 
</p>
        <p>
I'll start off with the free stuff I got. 
</p>
        <ul>
          <li>
Microsoft branded lunch cooler - These were given away for the morning session and
actually had food in them! They are really nice lunch coolers, with a main compartment
with a separated top and bottom (bottom is for your ice pack and really cold stuff). 
</li>
          <li>
Visual Studio 2008 T-Shirt - I got this from <a href="http://blogs.msdn.com/angelab/default.aspx">AngelaB</a> because
I made a comment while visiting the booth she was at. I said something to the effect
that I was looking to learn how to leverage the power of Team Foundation Server to
manage the complete application development life cycle. 
</li>
          <li>
Training DVD's - Also from the VSTS booth, I picked up two training dvd's. One on
web deign and development (SilverLight, windows live, etc) and the other one was on
WPF.  
</li>
          <li>
Software Bundle which included VS 2008 standard edition, Windows Server 2008 enterprise
1 year eval, and SQL Server November CTP. Also included was trial editions of Microsoft
Forefront, Microsoft System Center and a Windows Mobile 6 developers resource kit.
Finally I picked up my 4th copy of Vista, this being a 32 bit Ultimate version with
SP1. 
</li>
        </ul>
        <p>
Now onto the actual content. As I mentioned above, I kind of floated between tracks,
so my notes jump around a bit.
</p>
        <p>
          <strong>SQL 2008</strong>
        </p>
        <ul>
          <li>
New built in auditing mechanism</li>
          <ul>
            <li>
No more need to write triggers and manage audit tables</li>
            <li>
Granular auditing 
</li>
            <li>
Write events to various sources including the event log. The event log source was
highlighted because Server 2008 has a new feature where you can gather all event log
data from all of your servers and view</li>
          </ul>
          <li>
Peer to Peer replication</li>
          <ul>
            <li>
New visual representation</li>
            <li>
No longer need to start/stop databases (or servers? I missed the last part of this
comment). 
</li>
          </ul>
          <li>
Compression</li>
          <ul>
            <li>
Two types of compression, backup and data.</li>
            <li>
Backup compression enables faster backup and restore times and smaller backup files.
A 2x to 7x reduction in backup size was reported, but it varies on your actual data.</li>
            <li>
Data compression allows you to compress the data within your databases (including
OLAP) taking up less space on disk, and in memory (allowing you to fit more pages
into RAM), at a slight increase in CPU utilization (presenter said 2-3%). While I
will need to evaluate this in various environments, it seems like a good tradeoff,
as disk IO is usually the biggest bottle neck. 
</li>
            <li>
SQL Server is still in CTP, and the Presenter was unsure which compression options
would be available in which editions of SQL 2008. 
</li>
          </ul>
          <li>
Resource pools and the Resource Governor</li>
          <ul>
            <li>
Assign users (and it sounds like you can assign or configure this at a stored procedure
level as well) to roles and then assign the roles to resource pools. The resource
governor will limit, or assign a certain amount of CPU cycles to each pool.</li>
            <li>
A typical usage of this is making sure your production applications get the CPU they
need, even when someone is running a resource intensive reporting operation. 
</li>
          </ul>
          <li>
New OLAP query optimizer</li>
          <li>
Define policies (presenter compared this to GPO, or rather that's where the idea came
from) which manage your SQL server, and then apply those policies to all SQL servers
in your organization</li>
          <li>
Performance improvements in database mirroring, along with automatic page repair.</li>
          <li>
SQL Management studio now adds intellisense, but it's only for select statements.
Several people complained upon hearing the limitation on select statements, but something
is better then nothing, and you can always go by Sql Prompt from RedGate. 
</li>
        </ul>
        <blockquote>
          <p>
Follow-up questions
</p>
        </blockquote>
        <ul>
          <li>
What is the differences between clustering, mirroring, log shipping and peer to peer
replication?</li>
          <li>
With all this talk about server vitalization, what are best practices for maintaining
high performance in a virtualized environment. 
</li>
        </ul>
        <p>
          <strong>Virtualization</strong>
        </p>
        <ul>
          <li>
Next version of Virtual Machine manager for System Center will be able to control
virtual machines from MS Virtual Server 2005, Hyper-V and VMWare</li>
          <li>
Hyper-V actually virtualizes the host OS. This is what is meant by the whole Parent
partition terminology I guess. The presenter made it a point to show how after he
enabled Hyper-V, he no longer had power management options on his laptop. So what
does a virtualized host really mean? I'm still able to play games (World of Warcraft,
Call of Duty 4) on my Hyper-V enabled Windows Server 2008 workstation, so it's not
the same thing as a virtual machine that's for sure.</li>
          <li>
The import/export feature in the Hyper-V manager is for moving VM's between hosts,
not for importing VMware from Virtual Server 2005. To do an import from Virtual Server,
you just create a new VM in Hyper-V, add the disk file from Virtual Server, and install
new drivers.</li>
          <li>
There is a differencing disk option I overlooked on my install, which allows you to
setup a master disk, allowing you to save on space.</li>
          <li>
You can setup virtual com ports to talk to the host computer, or remote computers
via named pipes. I just setup both com ports on one VM to use the same named pipe,
and was able to send data back and forth using two hyper terminal windows. That will
come in handy for some testing I have to do. Note, this option is not unique to Hyper-V,
but I thought it was worth pointing out.</li>
          <li>
Backups of running VM's are supported (Live Backups)</li>
        </ul>
        <blockquote>
          <p>
Two things I wanted to touch on quick concerning Hyper-V, specifically live backups,
and mounting VHD's in the host (a feature that has been posted on more then one blog). 
</p>
          <p>
To backup a running VM, it takes a little more then just an XCopy. Most people have
stated that you have to backup the entire volume in order to backup a running VM properly.
I found this <a href="http://blogs.technet.com/m2/archive/2008/04/17/invoking-diskshadow-to-back-up-a-virtual-machine-from-a-hyper-v-host.aspx">post</a> that
provides an example of using a script to select the Hyper-V VSS writer and hopefully
not have to back up the entire volume, but I haven't tried this yet. Since none of
my VM's are 24/7 critical, it might be easier to just shut them down once a week and
use the export function.
</p>
          <p>
On the topic of VHD mounting, I found another <a href="http://www.ravichaganti.com/blog/?p=77">post</a> which
provides a script to add context menu support for mounting VHD's on the host machine.
The VHD must be not be in use, otherwise you will get an error. 
</p>
        </blockquote>
        <p>
          <strong>Server 2008 Security</strong>
        </p>
        <ul>
          <li>
Server and Domain isolation using network access protection</li>
          <ul>
            <li>
Create zones, such as unsecured (customer laptop plugged into your corporate lan),
secured (most company desktops and servers), and sensitive (source code servers, production
databases), and policies on which computers can access each zone.</li>
            <li>
DHCP and Certificate based, with DHCP easier to setup, but not as secure as Certificate
based.</li>
            <li>
You can define policies which classify what zone a computer belongs in. For example,
your policy can check for AV, anti-spyware, etc.</li>
          </ul>
          <li>
Rights Management Service, allows you to attach authorization to a document and limit
what you can do with it, such as email it to an external email address or use the
print screen feature. Of course you could still take a picture of your monitor with
an actual camera (as pointed out by the presenter). 
</li>
          <li>
Granular Active Directory Auditing will allow you to edit very specific details such
as when a computer is moved from one OU to another, or a specific field in a users
AD record is changed</li>
        </ul>
        <p>
          <strong>VS 2008</strong>
        </p>
        <blockquote>
          <p>
The CSS support shown in the demo was very nice. The demo had a plain old web page
with some basic formatting, to which the presenter did a drag and drop operation of
some CSS styles he had download from CSS Zen Garden. The page in the designer was
updated automatically and completely transformed the look and feel of the page. 
There is a view which shows what styles are applied to what page elements, and how
styles are inherited. It really seems like VS 2008 makes CSS a whole lot easier to
work with.
</p>
          <p>
There are obviously allot of new features in VS 2008, but I've been using it since
beta 2, so the rest of the stuff presented (mostly linq) was review to me and I didn't
write it down. The presenter's blog is up at BenkoTips.com and is supposed to have
more videos and demos on VS 2008.
</p>
        </blockquote>
        <p>
          <strong>Office Development</strong>
        </p>
        <ul>
          <li>
Outlook web forms allow for you to create an application easily within the confines
of outlook. 
</li>
          <li>
Sharepoint workflows are just WF workflows. New features in VS 2008 allow you to deploy
directly from VS 2008 making this once painful operation much easier. I am not sure
if custom work flows are available in WSS, or just MOSS 
</li>
          <li>
MOSS has a business data catalog feature which allows you to pull together data from
various sources, like ERP, CRM, etc.</li>
        </ul>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=ce9dbbd6-c9f1-4516-baed-aef4fe1f3410" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Hero's Happen Here - Microsoft 2008 Product Launch event in Madison, WI</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,ce9dbbd6-c9f1-4516-baed-aef4fe1f3410.aspx</guid>
      <link>http://blog.salvoz.com/2008/04/18/HerosHappenHereMicrosoft2008ProductLaunchEventInMadisonWI.aspx</link>
      <pubDate>Fri, 18 Apr 2008 22:01:49 GMT</pubDate>
      <description>&lt;p&gt;
I attended the Hero's Happen Here launch event held in Madison, WI yesterday. The
event was held at the Westside Marriott, and featured a morning and afternoon session,
each with multiple tracks. Future planning note, the local McDonald's was not prepared
for the rush between the two sessions ;)
&lt;/p&gt;
&lt;p&gt;
I was registered for the IT Infrastructure track in the morning session (I think),
but it didn't really matter. Once you got in, you could float between tracks, and
I ended up standing on the back wall for a couple of the presentations so I could
move more freely and answer phone calls (my on call week). 
&lt;/p&gt;
&lt;p&gt;
I'll start off with the free stuff I got. 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Microsoft branded lunch cooler - These were given away for the morning session and
actually had food in them! They are really nice lunch coolers, with a main compartment
with a separated top and bottom (bottom is for your ice pack and really cold stuff). 
&lt;/li&gt;
&lt;li&gt;
Visual Studio 2008 T-Shirt - I got this from &lt;a href="http://blogs.msdn.com/angelab/default.aspx"&gt;AngelaB&lt;/a&gt; because
I made a comment while visiting the booth she was at. I said something to the effect
that I was looking to learn how to leverage the power of Team Foundation Server to
manage the complete application development life cycle. 
&lt;/li&gt;
&lt;li&gt;
Training DVD's - Also from the VSTS booth, I picked up two training dvd's. One on
web deign and development (SilverLight, windows live, etc) and the other one was on
WPF.&amp;nbsp; 
&lt;/li&gt;
&lt;li&gt;
Software Bundle which included VS 2008 standard edition, Windows Server 2008 enterprise
1 year eval, and SQL Server November CTP. Also included was trial editions of Microsoft
Forefront, Microsoft System Center and a Windows Mobile 6 developers resource kit.
Finally I picked up my 4th copy of Vista, this being a 32 bit Ultimate version with
SP1. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Now onto the actual content. As I mentioned above, I kind of floated between tracks,
so my notes jump around a bit.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;SQL 2008&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
New built in auditing mechanism&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
No more need to write triggers and manage audit tables&lt;/li&gt;
&lt;li&gt;
Granular auditing 
&lt;/li&gt;
&lt;li&gt;
Write events to various sources including the event log. The event log source was
highlighted because Server 2008 has a new feature where you can gather all event log
data from all of your servers and view&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Peer to Peer replication&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
New visual representation&lt;/li&gt;
&lt;li&gt;
No longer need to start/stop databases (or servers? I missed the last part of this
comment). 
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Compression&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
Two types of compression, backup and data.&lt;/li&gt;
&lt;li&gt;
Backup compression enables faster backup and restore times and smaller backup files.
A 2x to 7x reduction in backup size was reported, but it varies on your actual data.&lt;/li&gt;
&lt;li&gt;
Data compression allows you to compress the data within your databases (including
OLAP) taking up less space on disk, and in memory (allowing you to fit more pages
into RAM), at a slight increase in CPU utilization (presenter said 2-3%). While I
will need to evaluate this in various environments, it seems like a good tradeoff,
as disk IO is usually the biggest bottle neck. 
&lt;/li&gt;
&lt;li&gt;
SQL Server is still in CTP, and the Presenter was unsure which compression options
would be available in which editions of SQL 2008. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Resource pools and the Resource Governor&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
Assign users (and it sounds like you can assign or configure this at a stored procedure
level as well) to roles and then assign the roles to resource pools. The resource
governor will limit, or assign a certain amount of CPU cycles to each pool.&lt;/li&gt;
&lt;li&gt;
A typical usage of this is making sure your production applications get the CPU they
need, even when someone is running a resource intensive reporting operation. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
New OLAP query optimizer&lt;/li&gt;
&lt;li&gt;
Define policies (presenter compared this to GPO, or rather that's where the idea came
from) which manage your SQL server, and then apply those policies to all SQL servers
in your organization&lt;/li&gt;
&lt;li&gt;
Performance improvements in database mirroring, along with automatic page repair.&lt;/li&gt;
&lt;li&gt;
SQL Management studio now adds intellisense, but it's only for select statements.
Several people complained upon hearing the limitation on select statements, but something
is better then nothing, and you can always go by Sql Prompt from RedGate. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Follow-up questions
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;ul&gt;
&lt;li&gt;
What is the differences between clustering, mirroring, log shipping and peer to peer
replication?&lt;/li&gt;
&lt;li&gt;
With all this talk about server vitalization, what are best practices for maintaining
high performance in a virtualized environment. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Virtualization&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Next version of Virtual Machine manager for System Center will be able to control
virtual machines from MS Virtual Server 2005, Hyper-V and VMWare&lt;/li&gt;
&lt;li&gt;
Hyper-V actually virtualizes the host OS. This is what is meant by the whole Parent
partition terminology I guess. The presenter made it a point to show how after he
enabled Hyper-V, he no longer had power management options on his laptop. So what
does a virtualized host really mean? I'm still able to play games (World of Warcraft,
Call of Duty 4) on my Hyper-V enabled Windows Server 2008 workstation, so it's not
the same thing as a virtual machine that's for sure.&lt;/li&gt;
&lt;li&gt;
The import/export feature in the Hyper-V manager is for moving VM's between hosts,
not for importing VMware from Virtual Server 2005. To do an import from Virtual Server,
you just create a new VM in Hyper-V, add the disk file from Virtual Server, and install
new drivers.&lt;/li&gt;
&lt;li&gt;
There is a differencing disk option I overlooked on my install, which allows you to
setup a master disk, allowing you to save on space.&lt;/li&gt;
&lt;li&gt;
You can setup virtual com ports to talk to the host computer, or remote computers
via named pipes. I just setup both com ports on one VM to use the same named pipe,
and was able to send data back and forth using two hyper terminal windows. That will
come in handy for some testing I have to do. Note, this option is not unique to Hyper-V,
but I thought it was worth pointing out.&lt;/li&gt;
&lt;li&gt;
Backups of running VM's are supported (Live Backups)&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Two things I wanted to touch on quick concerning Hyper-V, specifically live backups,
and mounting VHD's in the host (a feature that has been posted on more then one blog). 
&lt;/p&gt;
&lt;p&gt;
To backup a running VM, it takes a little more then just an XCopy. Most people have
stated that you have to backup the entire volume in order to backup a running VM properly.
I found this &lt;a href="http://blogs.technet.com/m2/archive/2008/04/17/invoking-diskshadow-to-back-up-a-virtual-machine-from-a-hyper-v-host.aspx"&gt;post&lt;/a&gt; that
provides an example of using a script to select the Hyper-V VSS writer and hopefully
not have to back up the entire volume, but I haven't tried this yet. Since none of
my VM's are 24/7 critical, it might be easier to just shut them down once a week and
use the export function.
&lt;/p&gt;
&lt;p&gt;
On the topic of VHD mounting, I found another &lt;a href="http://www.ravichaganti.com/blog/?p=77"&gt;post&lt;/a&gt; which
provides a script to add context menu support for mounting VHD's on the host machine.
The VHD must be not be in use, otherwise you will get an error. 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Server 2008 Security&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Server and Domain isolation using network access protection&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
Create zones, such as unsecured (customer laptop plugged into your corporate lan),
secured (most company desktops and servers), and sensitive (source code servers, production
databases), and policies on which computers can access each zone.&lt;/li&gt;
&lt;li&gt;
DHCP and Certificate based, with DHCP easier to setup, but not as secure as Certificate
based.&lt;/li&gt;
&lt;li&gt;
You can define policies which classify what zone a computer belongs in. For example,
your policy can check for AV, anti-spyware, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Rights Management Service, allows you to attach authorization to a document and limit
what you can do with it, such as email it to an external email address or use the
print screen feature. Of course you could still take a picture of your monitor with
an actual camera (as pointed out by the presenter). 
&lt;/li&gt;
&lt;li&gt;
Granular Active Directory Auditing will allow you to edit very specific details such
as when a computer is moved from one OU to another, or a specific field in a users
AD record is changed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;VS 2008&lt;/strong&gt;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
The CSS support shown in the demo was very nice. The demo had a plain old web page
with some basic formatting, to which the presenter did a drag and drop operation of
some CSS styles he had download from CSS Zen Garden. The page in the designer was
updated automatically and completely transformed the look and feel of the page.&amp;nbsp;
There is a view which shows what styles are applied to what page elements, and how
styles are inherited. It really seems like VS 2008 makes CSS a whole lot easier to
work with.
&lt;/p&gt;
&lt;p&gt;
There are obviously allot of new features in VS 2008, but I've been using it since
beta 2, so the rest of the stuff presented (mostly linq) was review to me and I didn't
write it down. The presenter's blog is up at BenkoTips.com and is supposed to have
more videos and demos on VS 2008.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Office Development&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Outlook web forms allow for you to create an application easily within the confines
of outlook. 
&lt;li&gt;
Sharepoint workflows are just WF workflows. New features in VS 2008 allow you to deploy
directly from VS 2008 making this once painful operation much easier. I am not sure
if custom work flows are available in WSS, or just MOSS 
&lt;li&gt;
MOSS has a business data catalog feature which allows you to pull together data from
various sources, like ERP, CRM, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=ce9dbbd6-c9f1-4516-baed-aef4fe1f3410" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,ce9dbbd6-c9f1-4516-baed-aef4fe1f3410.aspx</comments>
      <category>Technology</category>
      <category>Technology/Sql</category>
      <category>Technology/Tools</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=d6e32586-99dd-425f-96d1-98880bc62b12</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,d6e32586-99dd-425f-96d1-98880bc62b12.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,d6e32586-99dd-425f-96d1-98880bc62b12.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d6e32586-99dd-425f-96d1-98880bc62b12</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So if you have been following along, I am currently at the BizTalk RFID Solution Days
Conference and Training. Yesturday I noticed that some of my databases on my training
VM were marked as suspect and the BizTalk services such as SSOP and the actual BizTalk
service would not start. Upon further investigation in the event log, I was getting
alot of errors indicating a corrupt msdb database.
</p>
        <p>
Now the easy way would have been to ask for a new VM hard drive image, but this was
too good of a learning opportunity to pass up. Better to figure out how to fix this
in a low stress environment then on my production environment at 3am.
</p>
        <p>
My first step was to fix the msdb database. I found this <a href="http://blogs.msdn.com/sqlserverstorageengine/archive/2006/06/06/619304.aspx">article</a> on
how to rebuild your msdb database from a script. The script is called instmsdb.sql,
and you can run it if you have or do not have a msdb database defined. In my case
my database was defined so it just rebuilt it.
</p>
        <p>
That fixed all of the corrupt index errors for msdb in the event log and was left
with the SSO service failing to start. Here is another case of where you need to read
more then the first event log message. I thought the issue was with the SSO DB, but
in fact, it was with the BizTalkDb database (being suspect). Once I isolated the actual
problem, I could move on to repairing the database.
</p>
        <p>
I found several posts on different work around's for fixing a suspect database, but
this one, was the <a href="http://www.codeproject.com/KB/reporting-services/SQL_2005_Suspect_Database.aspx">one</a> that
finally worked. In essence, you run the following sql script:
</p>
        <div class="csharpcode">
          <pre class="alt">
            <span class="lnum"> 1: </span>
            <span class="kwrd">EXEC</span> sp_resetstatus <span class="str">'yourDBname'</span>;</pre>
          <pre>
            <span class="lnum"> 2: </span>
            <span class="kwrd">ALTER</span>
            <span class="kwrd">DATABASE</span> yourDBname <span class="kwrd">SET</span> EMERGENCY</pre>
          <pre class="alt">
            <span class="lnum"> 3: </span>
            <span class="kwrd">DBCC</span> checkdb(<span class="str">'yourDBname'</span>)</pre>
          <pre>
            <span class="lnum"> 4: </span>
            <span class="kwrd">ALTER</span>
            <span class="kwrd">DATABASE</span> yourDBname <span class="kwrd">SET</span> SINGLE_USER <span class="kwrd">WITH</span><span class="kwrd">ROLLBACK</span><span class="kwrd">IMMEDIATE</span></pre>
          <pre class="alt">
            <span class="lnum"> 5: </span>
            <span class="kwrd">DBCC</span> CheckDB
(<span class="str">'yourDBname'</span>, REPAIR_ALLOW_DATA_LOSS)</pre>
          <pre>
            <span class="lnum"> 6: </span>
            <span class="kwrd">ALTER</span>
            <span class="kwrd">DATABASE</span> yourDBname <span class="kwrd">SET</span> MULTI_USER</pre>
        </div>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <p>
 
</p>
        <p>
There were some errors displayed when fixing both the BizTalk and BamAlerts database,
but in the end, everything is working now. 
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=d6e32586-99dd-425f-96d1-98880bc62b12" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Repairing Sql Server - msdb index errors and suspect databases</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,d6e32586-99dd-425f-96d1-98880bc62b12.aspx</guid>
      <link>http://blog.salvoz.com/2008/02/21/RepairingSqlServerMsdbIndexErrorsAndSuspectDatabases.aspx</link>
      <pubDate>Thu, 21 Feb 2008 19:46:29 GMT</pubDate>
      <description>&lt;p&gt;
So if you have been following along, I am currently at the BizTalk RFID Solution Days
Conference and Training. Yesturday I noticed that some of my databases on my training
VM were marked as suspect and the BizTalk services such as SSOP and the actual BizTalk
service would not start. Upon further investigation in the event log, I was getting
alot of errors indicating a corrupt msdb database.
&lt;/p&gt;
&lt;p&gt;
Now the easy way would have been to ask for a new VM hard drive image, but this was
too good of a learning opportunity to pass up. Better to figure out how to fix this
in a low stress environment then on my production environment at 3am.
&lt;/p&gt;
&lt;p&gt;
My first step was to fix the msdb database. I found this &lt;a href="http://blogs.msdn.com/sqlserverstorageengine/archive/2006/06/06/619304.aspx"&gt;article&lt;/a&gt; on
how to rebuild your msdb database from a script. The script is called instmsdb.sql,
and you can run it if you have or do not have a msdb database defined. In my case
my database was defined so it just rebuilt it.
&lt;/p&gt;
&lt;p&gt;
That fixed all of the corrupt index errors for msdb in the event log and was left
with the SSO service failing to start. Here is another case of where you need to read
more then the first event log message. I thought the issue was with the SSO DB, but
in fact, it was with the BizTalkDb database (being suspect). Once I isolated the actual
problem, I could move on to repairing the database.
&lt;/p&gt;
&lt;p&gt;
I found several posts on different work around's for fixing a suspect database, but
this one, was the &lt;a href="http://www.codeproject.com/KB/reporting-services/SQL_2005_Suspect_Database.aspx"&gt;one&lt;/a&gt; that
finally worked. In essence, you run the following sql script:
&lt;/p&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt;&lt;span class="kwrd"&gt;EXEC&lt;/span&gt; sp_resetstatus &lt;span class="str"&gt;'yourDBname'&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt;&lt;span class="kwrd"&gt;ALTER&lt;/span&gt; &lt;span class="kwrd"&gt;DATABASE&lt;/span&gt; yourDBname &lt;span class="kwrd"&gt;SET&lt;/span&gt; EMERGENCY&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt;&lt;span class="kwrd"&gt;DBCC&lt;/span&gt; checkdb(&lt;span class="str"&gt;'yourDBname'&lt;/span&gt;)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt;&lt;span class="kwrd"&gt;ALTER&lt;/span&gt; &lt;span class="kwrd"&gt;DATABASE&lt;/span&gt; yourDBname &lt;span class="kwrd"&gt;SET&lt;/span&gt; SINGLE_USER &lt;span class="kwrd"&gt;WITH&lt;/span&gt; &lt;span class="kwrd"&gt;ROLLBACK&lt;/span&gt; &lt;span class="kwrd"&gt;IMMEDIATE&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt;&lt;span class="kwrd"&gt;DBCC&lt;/span&gt; CheckDB
(&lt;span class="str"&gt;'yourDBname'&lt;/span&gt;, REPAIR_ALLOW_DATA_LOSS)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt;&lt;span class="kwrd"&gt;ALTER&lt;/span&gt; &lt;span class="kwrd"&gt;DATABASE&lt;/span&gt; yourDBname &lt;span class="kwrd"&gt;SET&lt;/span&gt; MULTI_USER&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
There were some errors displayed when fixing both the BizTalk and BamAlerts database,
but in the end, everything is working now. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=d6e32586-99dd-425f-96d1-98880bc62b12" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,d6e32586-99dd-425f-96d1-98880bc62b12.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=70a8705f-c751-4fff-b069-98a728ce159e</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,70a8705f-c751-4fff-b069-98a728ce159e.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,70a8705f-c751-4fff-b069-98a728ce159e.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=70a8705f-c751-4fff-b069-98a728ce159e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Jeff Atwood wrote about <a href="http://www.codinghorror.com/blog/archives/001050.html">databases
under version control</a> in a recent blog posting. In it he advocates that you should
put the goal of getting your database into source control above things such as what
tools and processes to us as per the <a href="http://agilemanifesto.org/">Agile Manifesto</a>.
</p>
        <p>
We have met this goal, and our database is under version control, however, I feel
it has become a cumbersome and time consuming process (although my I have a lot shorter
time working with the process then the other developers so maybe I'm missing some
tricks). I have been thinking of ways to improve upon the process.
</p>
        <p>
Also in Jeff's post, are links to a series of 5 posts by K. Scott Allen in which he
explains how he does database version control. Some of his points match up with what
I have been thinking, some don't. That, in and of itself further proves a my idea
that no process is perfect, and what works for someone may not work exactly for you.
</p>
        <p>
K Scott Allen's Posts:
</p>
        <ol>
          <li>
            <a href="http://odetocode.com/Blogs/scott/archive/2008/01/30/11702.aspx">Three rules
for database work</a>
          </li>
          <li>
            <a href="http://odetocode.com/Blogs/scott/archive/2008/01/31/11710.aspx">The Baseline</a>
          </li>
          <li>
            <a href="http://odetocode.com/Blogs/scott/archive/2008/02/02/11721.aspx">Change Scripts</a>
          </li>
          <li>
            <a href="http://odetocode.com/Blogs/scott/archive/2008/02/02/11737.aspx">Views, Stored
Procedures and the Like</a>
          </li>
          <li>
            <a href="http://odetocode.com/Blogs/scott/archive/2008/02/03/11746.aspx">Branching
and Merging</a>
          </li>
        </ol>
        <p>
I recommend that interested parties take the time to read the posts, as what follows
is a brief overview.
</p>
        <ul>
          <li>
3 rules for databases: Never use a shared database for development work, Always have
a single schema source (source control), Always version your database.</li>
          <li>
Create a baseline script. This is a single script for your tables. Your derived objects
(stored procedures, views, etc). 
</li>
          <li>
Change scripts are used to update the baseline, and should include an insert statement
into your custom version table.</li>
          <li>
Derived objects (stored procedures, views), are updated, by making changes to the
individual file corresponding to the objects. These changes are checked into source
control. All derived objects are dropped and recreated from the script files. If you
add a new object, create a new file, if you need to delete an object, delete the file.
Once thing I don't understand, is how are these "versions" related to the schema version?
One of the points made is that you should be able to create a database from any point
in time. This process covers the schema well, but you would have to hunt thru source
control to find the collection of files that relate to that version. Perhaps this
is a necessary trade off.</li>
          <li>
Branching and merging depend on how you branch your application. The example given,
is that when it gets close to a release, functionality is frozen and a branch is made
for the release. Only bug fixes go into the branch and new features for the next version
go into the main trunk. For the database, this means a new baseline script is created
for the new version, which is a point in time snapshot of the database at the time
of the branch. If there are changes in the branch, those changes are duplicated as
a change script in the main trunk. You just have to be careful that the main trunk
script is written in a way that it checks to see if the branch script has been run.
(See the actual post for a better explanation).</li>
        </ul>
        <p>
Finally, I somehow got to this <a href="http://haacked.com/archive/2006/07/05/bulletproofsqlchangescriptsusinginformation_schemaviews.aspx">post</a> by <a href="http://haacked.com/articles/AboutHaacked.aspx">Phil
Haack</a>, in which he describes how using the information_schema views (see his post,
and Books Online for a listing of what you can get from the views) will help future
proof your scripts, because as Phil points out, Microsoft makes no guarantees on the
schemas of the system tables.
</p>
        <p>
As I posted before, I'm now heading up our embedded device project, so I won't be
working on our uber back-end database as much. While we have a need for a database
in the embedded project, I'm strongly considering using <a href="http://www.db4o.com/">DB
for Objects</a> (db4o). While there is a bit of a learning curve, it looks pretty
easy to use. 
</p>
        <p>
My plan is to use db4o to start out and then re-evaluate our database needs at the
end of the project, hopefully saving the time it takes to manage a data access layer,
scripts, etc. This would also make a cost benefit analysis of db4o easier, as I can
simply estimate the time it would take to implement a traditional RDBMS and compare
that to the cost of db4o. 
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=70a8705f-c751-4fff-b069-98a728ce159e" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Database Source Control</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,70a8705f-c751-4fff-b069-98a728ce159e.aspx</guid>
      <link>http://blog.salvoz.com/2008/02/06/DatabaseSourceControl.aspx</link>
      <pubDate>Wed, 06 Feb 2008 04:56:16 GMT</pubDate>
      <description>&lt;p&gt;
Jeff Atwood wrote about &lt;a href="http://www.codinghorror.com/blog/archives/001050.html"&gt;databases
under version control&lt;/a&gt; in a recent blog posting. In it he advocates that you should
put the goal of getting your database into source control above things such as what
tools and processes to us as per the &lt;a href="http://agilemanifesto.org/"&gt;Agile Manifesto&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
We have met this goal, and our database is under version control, however, I feel
it has become a cumbersome and time consuming process (although my I have a lot shorter
time working with the process then the other developers so maybe I'm missing some
tricks). I have been thinking of ways to improve upon the process.
&lt;/p&gt;
&lt;p&gt;
Also in Jeff's post, are links to a series of 5 posts by K. Scott Allen in which he
explains how he does database version control. Some of his points match up with what
I have been thinking, some don't. That, in and of itself further proves a my idea
that no process is perfect, and what works for someone may not work exactly for you.
&lt;/p&gt;
&lt;p&gt;
K Scott Allen's Posts:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;a href="http://odetocode.com/Blogs/scott/archive/2008/01/30/11702.aspx"&gt;Three rules
for database work&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://odetocode.com/Blogs/scott/archive/2008/01/31/11710.aspx"&gt;The Baseline&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://odetocode.com/Blogs/scott/archive/2008/02/02/11721.aspx"&gt;Change Scripts&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://odetocode.com/Blogs/scott/archive/2008/02/02/11737.aspx"&gt;Views, Stored
Procedures and the Like&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://odetocode.com/Blogs/scott/archive/2008/02/03/11746.aspx"&gt;Branching
and Merging&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I recommend that interested parties take the time to read the posts, as what follows
is a brief overview.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
3 rules for databases: Never use a shared database for development work, Always have
a single schema source (source control), Always version your database.&lt;/li&gt;
&lt;li&gt;
Create a baseline script. This is a single script for your tables. Your derived objects
(stored procedures, views, etc). 
&lt;/li&gt;
&lt;li&gt;
Change scripts are used to update the baseline, and should include an insert statement
into your custom version table.&lt;/li&gt;
&lt;li&gt;
Derived objects (stored procedures, views), are updated, by making changes to the
individual file corresponding to the objects. These changes are checked into source
control. All derived objects are dropped and recreated from the script files. If you
add a new object, create a new file, if you need to delete an object, delete the file.
Once thing I don't understand, is how are these "versions" related to the schema version?
One of the points made is that you should be able to create a database from any point
in time. This process covers the schema well, but you would have to hunt thru source
control to find the collection of files that relate to that version. Perhaps this
is a necessary trade off.&lt;/li&gt;
&lt;li&gt;
Branching and merging depend on how you branch your application. The example given,
is that when it gets close to a release, functionality is frozen and a branch is made
for the release. Only bug fixes go into the branch and new features for the next version
go into the main trunk. For the database, this means a new baseline script is created
for the new version, which is a point in time snapshot of the database at the time
of the branch. If there are changes in the branch, those changes are duplicated as
a change script in the main trunk. You just have to be careful that the main trunk
script is written in a way that it checks to see if the branch script has been run.
(See the actual post for a better explanation).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Finally, I somehow got to this &lt;a href="http://haacked.com/archive/2006/07/05/bulletproofsqlchangescriptsusinginformation_schemaviews.aspx"&gt;post&lt;/a&gt; by &lt;a href="http://haacked.com/articles/AboutHaacked.aspx"&gt;Phil
Haack&lt;/a&gt;, in which he describes how using the information_schema views (see his post,
and Books Online for a listing of what you can get from the views) will help future
proof your scripts, because as Phil points out, Microsoft makes no guarantees on the
schemas of the system tables.
&lt;/p&gt;
&lt;p&gt;
As I posted before, I'm now heading up our embedded device project, so I won't be
working on our uber back-end database as much. While we have a need for a database
in the embedded project, I'm strongly considering using &lt;a href="http://www.db4o.com/"&gt;DB
for Objects&lt;/a&gt; (db4o). While there is a bit of a learning curve, it looks pretty
easy to use. 
&lt;/p&gt;
&lt;p&gt;
My plan is to use db4o to start out and then re-evaluate our database needs at the
end of the project, hopefully saving the time it takes to manage a data access layer,
scripts, etc. This would also make a cost benefit analysis of db4o easier, as I can
simply estimate the time it would take to implement a traditional RDBMS and compare
that to the cost of db4o. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=70a8705f-c751-4fff-b069-98a728ce159e" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,70a8705f-c751-4fff-b069-98a728ce159e.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=9aeebee1-df63-4d47-9c27-188a5428f4f8</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,9aeebee1-df63-4d47-9c27-188a5428f4f8.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,9aeebee1-df63-4d47-9c27-188a5428f4f8.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=9aeebee1-df63-4d47-9c27-188a5428f4f8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So I was updating another computer from Visual Studio 2008 Beta 2 to RTM over Christmas
and noticed something during the install process. You know, the install process, where
they show pictures of people I never saw in my computer science classes, interviewed,
or seen at any of development/industry events. Got to love marketing.
</p>
        <p>
Back to what I saw though, the Sql Publishing Wizard. A quick Google search showed
me this was previously an add in which has made it's way into Visual Studio 2008 as
a default component. You can <a href="http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&amp;displaylang=en">download</a> and
read about it on <a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=sqlhost&amp;title=Database%20Publishing%20Wizard">CodePlex</a>.
From the home page on the CodePlex, the Sql Publishing wizard supports two modes of
operation:
</p>
        <ol>
          <li>
It generates a single SQL script file which can be used to recreate a database when
the only connectivity to a server is through a web-based control panel with a script
execution window. 
</li>
          <li>
It connects to a web service provided by your hoster and directly creates objects
on a specified hosted database</li>
        </ol>
        <p>
I tested out the single SQL script mode on our new database, which is <em>quite</em> complex
and has challenged other scripting tools. I am extremely happy to report, that the
single generate script reproduced our database perfectly. What's even better, is that
it is an open source project, so you can make some changes, maybe add some schema
object filters, or separate the objects into separate files. 
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=9aeebee1-df63-4d47-9c27-188a5428f4f8" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Sql Publishing Wizard</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,9aeebee1-df63-4d47-9c27-188a5428f4f8.aspx</guid>
      <link>http://blog.salvoz.com/2007/12/27/SqlPublishingWizard.aspx</link>
      <pubDate>Thu, 27 Dec 2007 04:31:53 GMT</pubDate>
      <description>&lt;p&gt;
So I was updating another computer from Visual Studio 2008 Beta 2 to RTM over Christmas
and noticed something during the install process. You know, the install process, where
they show pictures of people I never saw in my computer science classes, interviewed,
or seen at any of development/industry events. Got to love marketing.
&lt;/p&gt;
&lt;p&gt;
Back to what I saw though, the Sql Publishing Wizard. A quick Google search showed
me this was previously an add in which has made it's way into Visual Studio 2008 as
a default component. You can &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&amp;amp;displaylang=en"&gt;download&lt;/a&gt; and
read about it on &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=sqlhost&amp;amp;title=Database%20Publishing%20Wizard"&gt;CodePlex&lt;/a&gt;.
From the home page on the CodePlex, the Sql Publishing wizard supports two modes of
operation:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
It generates a single SQL script file which can be used to recreate a database when
the only connectivity to a server is through a web-based control panel with a script
execution window. 
&lt;/li&gt;
&lt;li&gt;
It connects to a web service provided by your hoster and directly creates objects
on a specified hosted database&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I tested out the single SQL script mode on our new database, which is &lt;em&gt;quite&lt;/em&gt; complex
and has challenged other scripting tools. I am extremely happy to report, that the
single generate script reproduced our database perfectly. What's even better, is that
it is an open source project, so you can make some changes, maybe add some schema
object filters, or separate the objects into separate files. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=9aeebee1-df63-4d47-9c27-188a5428f4f8" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,9aeebee1-df63-4d47-9c27-188a5428f4f8.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=212cd16e-8800-4033-9b14-c7224226b2f6</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,212cd16e-8800-4033-9b14-c7224226b2f6.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,212cd16e-8800-4033-9b14-c7224226b2f6.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=212cd16e-8800-4033-9b14-c7224226b2f6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I thought I was missing something in SQL Management Studio, as I couldn't believe
the functionality to export or script database diagrams wasn't included. I went off
to Google to search for something, either how to script it myself, or some missing
function. 
</p>
        <p>
First I came across this <a href="http://www.thescripts.com/forum/thread81534.html">post</a>,
but wasn't to inclined to copy/paste the script and clean it up. I later came to find
out it was for SQL 2000, and would not work in 2005 (good, saved some time there).
I continued my search and found an <a href="http://www.codeproject.com/KB/database/ScriptDiagram2005.aspx">article</a> on
Code Project that provided SQL scripts to do exactly what I needed. The scripts are
actually 2005 updates of the 2000 scripts I found on my first search. 
</p>
        <p>
Even if my Google search fails, I need to remember to hit up Code Project, it's a
wealth of information.
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=212cd16e-8800-4033-9b14-c7224226b2f6" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Script Database Diagrams</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,212cd16e-8800-4033-9b14-c7224226b2f6.aspx</guid>
      <link>http://blog.salvoz.com/2007/12/18/ScriptDatabaseDiagrams.aspx</link>
      <pubDate>Tue, 18 Dec 2007 14:52:25 GMT</pubDate>
      <description>&lt;p&gt;
I thought I was missing something in SQL Management Studio, as I couldn't believe
the functionality to export or script database diagrams wasn't included. I went off
to Google to search for something, either how to script it myself, or some missing
function. 
&lt;/p&gt;
&lt;p&gt;
First I came across this &lt;a href="http://www.thescripts.com/forum/thread81534.html"&gt;post&lt;/a&gt;,
but wasn't to inclined to copy/paste the script and clean it up. I later came to find
out it was for SQL 2000, and would not work in 2005 (good, saved some time there).
I continued my search and found an &lt;a href="http://www.codeproject.com/KB/database/ScriptDiagram2005.aspx"&gt;article&lt;/a&gt; on
Code Project that provided SQL scripts to do exactly what I needed. The scripts are
actually 2005 updates of the 2000 scripts I found on my first search. 
&lt;/p&gt;
&lt;p&gt;
Even if my Google search fails, I need to remember to hit up Code Project, it's a
wealth of information.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=212cd16e-8800-4033-9b14-c7224226b2f6" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,212cd16e-8800-4033-9b14-c7224226b2f6.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=26f944cf-a50b-418e-b1ab-407852e6e406</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,26f944cf-a50b-418e-b1ab-407852e6e406.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,26f944cf-a50b-418e-b1ab-407852e6e406.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=26f944cf-a50b-418e-b1ab-407852e6e406</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I must make a confession, I am not a DBA. I think I know quite a bit about SQL, but
when it comes down to it, there is just too much to know without specializing in SQL.
I will probably sound like a SQL rookie with this post, but that's the price
to pay for getting better, acknowledging weaknesses, and working to improve on them. 
</p>
        <p>
A query in one of our batch processes was timing out, and it was up to me to fix it.
You pretty much have two options, the easy way, just increase the timeout, or the
harder, tune the query. I personally feel the second option is more rewarding, but
ended up spending more time on it then I expected, and exposed myself as the DBA imposter
that I am. 
</p>
        <p>
I have tried to reproduce the general form of the query. It basically consists of
several derived tables joined together and returned as an XML document.
</p>
        <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <span style="color: #0000ff">SELECT</span> table1.column1,
table1.column2, table2.column1, table2.column2, table3.column1, table3.column2, table4.column1,
table4.column2 <span style="color: #0000ff">FROM</span> (<span style="color: #0000ff">SELECT</span> sub1.column1 <span style="color: #0000ff">as</span> column1,
sub2.column2 <span style="color: #0000ff">as</span> column2 <span style="color: #0000ff">FROM</span> sub1 <span style="color: #0000ff">INNER</span><span style="color: #0000ff">JOIN</span> sub2 <span style="color: #0000ff">ON</span> sub1.id
= sub2.id <span style="color: #0000ff">WHERE</span> Clause) table1 <span style="color: #0000ff">FROM</span> (<span style="color: #0000ff">SELECT</span> sub1.column1 <span style="color: #0000ff">as</span> column1,
sub2.column2 <span style="color: #0000ff">as</span> column2 <span style="color: #0000ff">FROM</span> sub1 <span style="color: #0000ff">INNER</span><span style="color: #0000ff">JOIN</span> sub2 <span style="color: #0000ff">ON</span> sub1.id
= sub2.id <span style="color: #0000ff">WHERE</span> Clause) table2 <span style="color: #0000ff">FROM</span> (<span style="color: #0000ff">SELECT</span> sub1.column1 <span style="color: #0000ff">as</span> column1,
sub2.column2 <span style="color: #0000ff">as</span> column2 <span style="color: #0000ff">FROM</span> sub1 <span style="color: #0000ff">INNER</span><span style="color: #0000ff">JOIN</span> sub2 <span style="color: #0000ff">ON</span> sub1.id
= sub2.id <span style="color: #0000ff">Where</span> Clause) table3 <span style="color: #0000ff">FROM</span> (<span style="color: #0000ff">SELECT</span> sub1.column1 <span style="color: #0000ff">as</span> column1,
sub2.column2 <span style="color: #0000ff">as</span> column2 <span style="color: #0000ff">FROM</span> sub1 <span style="color: #0000ff">INNER</span><span style="color: #0000ff">JOIN</span> sub2 <span style="color: #0000ff">ON</span> sub1.id
= sub2.id <span style="color: #0000ff">WHERE</span> Clause) table4 <span style="color: #0000ff">ORDER</span><span style="color: #0000ff">BY</span> table3.column1,
table3.column2 <span style="color: #0000ff">FOR</span> XML AUTO, ELEMENTS </pre>
        </div>
        <p>
 
</p>
        <p>
I ran the query thru the DB Engine tuning advisor, and it came back with no improvements,
as there were existing indexes which it probably thought was adequate. I also looked
at the estimated execution plan, and noticed 2 sorts, each with a 25% weight. According
to the comments in the stored procedure, one of the last things to be added was
the ORDER BY table3.column1, table3.column2, so I commented that out, and the query
ran in 1 second (original execution time was ~50 seconds). The first thing I thought
was a missing index, or an index that needed to be rebuilt. There was an index already
on table3.column1, so I tried adding column2 and that didn't help at all. 
</p>
        <p>
Let me take a step back and offer an opinion on how to classify the level of knowledge
a person has with SQL. 
</p>
        <ul>
          <li>
Level 0: Just starting out. Doesn't understand even the basics of optimization and
performance. 
</li>
          <li>
Level 1: Some experience in writing good queries. Understands concepts such as normalization,
not doing much with indexes at this point.</li>
          <li>
Level 2: Starting to place an emphasis on writing good queries, and creating good
schemas. Starting to create indexes</li>
          <li>
Level 3: Can start to spot performance issues in other peoples queries. Knows how
to use the DB engine tuning tool and estimated execution plan</li>
          <li>
Level 4: Adds indexes, hints, etc without needed the DB engine tuning tool for
most queries</li>
          <li>
Level 5+: I haven't gotten there yet, but it probably involves, among other things,
intelligently using the skills from level 0-4, as just adding indexes isn't always
the solution, and can cause issues themselves. 
</li>
        </ul>
        <p>
I was basically stuck at level 3 witch my problem, and needed to move to level 4.
I would suspect that allot of people who list SQL experience are at the same level.
The SQL engine does a pretty good job of optimizing queries, and throwing something
into a GUI tool isn't that hard to do once you know about it. For smaller projects,
the database isn't going to be too complex, and on really big, enterprise level projects,
you'll probably have a dedicated DBA. 
</p>
        <p>
I knew of Index hints, it just wasn't clicking at this point that, that is exactly
what I needed to do. I turned to everyone's favorite helper, Google and started searching
for ways to increase performance on sorts. The first hits were the obvious things,
add an index, but then I started to see glimpses of things like, index hints. I redid
my search for index hints, and started to get more specific hits, and realized this
was what I needed, and it finally clicked with other things I have read in the past.
When you never really have to do this level of DBA, you don't think of everything
you should, you get rusty compared to say, someone who has just read a book on SQL. 
</p>
        <p>
Armed with what "tool" I needed to do, I set out to add an WITH INDEX (ix_Table1_Column1_Column2)
statement to my query, but even this was a humbling experience. I just couldn't figure
out where to stick it, I kept getting syntax errors. I finally looked up the syntax
for a select statement in books online, and very carefully examined the syntax and
compared it with my query. I finally realized that the statement has to go between
the "FROM sub1" and the "INNER JOIN" statement in the table3 sub query. After adding
my index hint, the query completed in ~2 seconds, or a 48 second improvement. 
</p>
        <p>
This was a learning experience on several levels for me. First, I fixed my query,
and realized that when the DB tuning tool fails to provide an answer, you got to
switch to "manual" mode. I was lucky enough to have know to try removing the ORDER
BY statement, and with out the comment in the stored procedure, I'm not sure if I
would have been able to figure out exactly where to look. I'm sure the information
provided in the estimated execution plan, would have pointed a more experience DBA
in the right direction.
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=26f944cf-a50b-418e-b1ab-407852e6e406" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Index Hints</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,26f944cf-a50b-418e-b1ab-407852e6e406.aspx</guid>
      <link>http://blog.salvoz.com/2007/10/27/IndexHints.aspx</link>
      <pubDate>Sat, 27 Oct 2007 18:12:13 GMT</pubDate>
      <description>&lt;p&gt;
I must make a confession, I am not a DBA. I think I know quite a bit about SQL, but
when it comes down to it, there is just too much to know without specializing in SQL.
I will probably sound like&amp;nbsp;a SQL rookie with this post, but that's the price
to pay for getting better, acknowledging weaknesses, and working to improve on them. 
&lt;/p&gt;
&lt;p&gt;
A query in one of our batch processes was timing out, and it was up to me to fix it.
You pretty much have two options, the easy way, just increase the timeout, or the
harder, tune the query. I personally feel the second option is more rewarding, but
ended up spending more time on it then I expected, and exposed myself as the DBA imposter
that I am. 
&lt;/p&gt;
&lt;p&gt;
I have tried to reproduce the general form of the query. It basically consists of
several derived tables joined together and returned as an XML document.
&lt;/p&gt;
&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; table1.column1,
table1.column2, table2.column1, table2.column2, table3.column1, table3.column2, table4.column1,
table4.column2 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; sub1.column1 &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; column1,
sub2.column2 &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; column2 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; sub1 &lt;span style="color: #0000ff"&gt;INNER&lt;/span&gt; &lt;span style="color: #0000ff"&gt;JOIN&lt;/span&gt; sub2 &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt; sub1.id
= sub2.id &lt;span style="color: #0000ff"&gt;WHERE&lt;/span&gt; Clause) table1 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; sub1.column1 &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; column1,
sub2.column2 &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; column2 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; sub1 &lt;span style="color: #0000ff"&gt;INNER&lt;/span&gt; &lt;span style="color: #0000ff"&gt;JOIN&lt;/span&gt; sub2 &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt; sub1.id
= sub2.id &lt;span style="color: #0000ff"&gt;WHERE&lt;/span&gt; Clause) table2 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; sub1.column1 &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; column1,
sub2.column2 &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; column2 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; sub1 &lt;span style="color: #0000ff"&gt;INNER&lt;/span&gt; &lt;span style="color: #0000ff"&gt;JOIN&lt;/span&gt; sub2 &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt; sub1.id
= sub2.id &lt;span style="color: #0000ff"&gt;Where&lt;/span&gt; Clause) table3 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; sub1.column1 &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; column1,
sub2.column2 &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; column2 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; sub1 &lt;span style="color: #0000ff"&gt;INNER&lt;/span&gt; &lt;span style="color: #0000ff"&gt;JOIN&lt;/span&gt; sub2 &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt; sub1.id
= sub2.id &lt;span style="color: #0000ff"&gt;WHERE&lt;/span&gt; Clause) table4 &lt;span style="color: #0000ff"&gt;ORDER&lt;/span&gt; &lt;span style="color: #0000ff"&gt;BY&lt;/span&gt; table3.column1,
table3.column2 &lt;span style="color: #0000ff"&gt;FOR&lt;/span&gt; XML AUTO, ELEMENTS &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
I ran the query thru the DB Engine tuning advisor, and it came back with no improvements,
as there were existing indexes which it probably thought was adequate. I also looked
at the estimated execution plan, and noticed 2 sorts, each with a 25% weight. According
to&amp;nbsp;the comments in the stored procedure, one of the last things to be added was
the ORDER BY table3.column1, table3.column2, so I commented that out, and the query
ran in 1 second (original execution time was ~50 seconds). The first thing I thought
was a missing index, or an index that needed to be rebuilt. There was an index already
on table3.column1, so I tried adding column2 and that didn't help at all. 
&lt;/p&gt;
&lt;p&gt;
Let me take a step back and offer an opinion on how to classify the level of knowledge
a person has with SQL. 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Level 0: Just starting out. Doesn't understand even the basics of optimization and
performance. 
&lt;/li&gt;
&lt;li&gt;
Level 1: Some experience in writing good queries. Understands concepts such as normalization,
not doing much with indexes at this point.&lt;/li&gt;
&lt;li&gt;
Level 2: Starting to place an emphasis on writing good queries, and creating good
schemas. Starting to create indexes&lt;/li&gt;
&lt;li&gt;
Level 3: Can&amp;nbsp;start to spot performance issues in other peoples queries. Knows&amp;nbsp;how
to use the DB engine tuning&amp;nbsp;tool and estimated execution plan&lt;/li&gt;
&lt;li&gt;
Level 4:&amp;nbsp;Adds indexes, hints, etc without needed the DB engine tuning tool for
most queries&lt;/li&gt;
&lt;li&gt;
Level 5+: I haven't gotten there yet, but it probably involves, among other things,
intelligently using the skills from level 0-4, as just adding indexes isn't always
the solution, and can cause issues themselves. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I was basically stuck at level 3 witch my problem, and needed to move to level 4.
I would suspect that allot of people who list SQL experience are at the same level.
The SQL engine does a pretty good job of optimizing queries, and throwing something
into a GUI tool isn't that hard to do once you know about it. For smaller projects,
the database isn't going to be too complex, and on really big, enterprise level projects,
you'll probably have a dedicated DBA. 
&lt;/p&gt;
&lt;p&gt;
I knew of Index hints, it just wasn't clicking at this point that, that is exactly
what I needed to do. I turned to everyone's favorite helper, Google and started searching
for ways to increase performance on sorts. The first hits were the obvious things,
add an index, but then I started to see glimpses of things like, index hints. I redid
my search for index hints, and started to get more specific hits, and realized this
was what I needed, and it finally clicked with other things I have read in the past.
When you never really have to do this level of DBA, you don't think of everything
you should, you get rusty compared to say, someone who has just read a book on SQL. 
&lt;/p&gt;
&lt;p&gt;
Armed with what "tool" I needed to do, I set out to add an WITH INDEX (ix_Table1_Column1_Column2)
statement to my query, but even this was a humbling experience. I just couldn't figure
out where to stick it, I kept getting syntax errors. I finally looked up the syntax
for a select statement in books online, and very carefully examined the syntax and
compared it with my query. I finally realized that the statement has to go between
the "FROM sub1" and the "INNER JOIN" statement in the table3 sub query. After adding
my index hint, the query completed in ~2 seconds, or a 48 second improvement. 
&lt;/p&gt;
&lt;p&gt;
This was a learning experience on several levels for me. First, I fixed my query,
and realized that when the DB tuning tool fails to provide an answer, you got&amp;nbsp;to
switch to "manual" mode. I was lucky enough to have know to try removing the ORDER
BY statement, and with out the comment in the stored procedure, I'm not sure if I
would have been able to figure out exactly where to look.&amp;nbsp;I'm sure the information
provided in the estimated execution plan, would have pointed a more experience DBA
in the right direction.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=26f944cf-a50b-418e-b1ab-407852e6e406" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,26f944cf-a50b-418e-b1ab-407852e6e406.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=6f8d76ca-70e7-420b-9fd0-e541452a3abe</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,6f8d76ca-70e7-420b-9fd0-e541452a3abe.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,6f8d76ca-70e7-420b-9fd0-e541452a3abe.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=6f8d76ca-70e7-420b-9fd0-e541452a3abe</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I recently came across an article on <a href="http://aspnet.4guysfromrolla.com/articles/081507-1.aspx">UTC
to store date/time values</a>. A decision made on a <a href="http://www.tersosolutions.com">current
project</a> I am working on was to use UTC for client applications. However, the dates
stored in SQL currently not in UTC. 
</p>
        <p>
I guess I've just gotten used to the GetDate() function in SQL.  A more appropriate
function for our application would be the GetUtcDate(), which will return the current
date/time in UTC format.
</p>
        <p>
From the article:
</p>
        <blockquote>
          <p>
The primary advantage of storing date/time values in UTC is that it makes the data
transportable. To see what I mean, imagine that following scenario: you have an eCommerce
website that is being hosted in a web server located in the Pacific time zone (UTC
-8) and this application stores the date and time orders were placed in server time.
Say a user, Bob, makes an order on August 1, 2007 at 9:00 AM UTC -8. After many months
of phenomenal growth, you decide to switch to a larger web hosting company, one on
the east coast where the time zone is UTC -5. Since the date/time is stored in server
time, Bob's previous order still shows that it was made on August 1 2007 at 9:00 AM.
But since we are now in UTC -5, it is as if Bob's order was made three hours earlier
than it really was (since when it was 9:00 AM on August 1, 2007 in the west coast
it was really 12:00 noon on the east coast). 
</p>
        </blockquote>
        <p>
 The author then goes into explain how you can fix the above issue by doing an
update on the data to correct the time, which he refers to as "Ick", and I will have
to agree with that. You don't want to, nor should you have to ever update a time stamp
type property.
</p>
        <p>
The next example uses various time zones to illustrate the problem of converting from
one time zone to another (not to mention DST and SDT). Since we plan on eventually
offering localized versions of our Web Application, displaying all times in CST/CDT
is not idea. Not to mention the change from daylight savings time to stand time makes
the way we display data currently, very confusing. Things seem out of order at best.
</p>
        <p>
 Well, I'm off to update my use of GetDate to GetUTCDate. Be sure to read the
full article.
</p>
        <p>
Note: I found this article originally from ScottGu's <a href="http://weblogs.asp.net/scottgu/rss.aspx">RSS
feed</a>. However, the actual <a href="http://weblogs.asp.net/scottgu/archive/2007/08/30/august-30th-links-asp-net-asp-net-ajax-iis7-visual-studio-silverlight-net.aspx">blog</a> doesn't
have the UTC article listed under Asp.Net, or listed at all.
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=6f8d76ca-70e7-420b-9fd0-e541452a3abe" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Using UTC to store Date/Time</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,6f8d76ca-70e7-420b-9fd0-e541452a3abe.aspx</guid>
      <link>http://blog.salvoz.com/2007/09/01/UsingUTCToStoreDateTime.aspx</link>
      <pubDate>Sat, 01 Sep 2007 21:21:49 GMT</pubDate>
      <description>&lt;p&gt;
I&amp;nbsp;recently came across an article on &lt;a href="http://aspnet.4guysfromrolla.com/articles/081507-1.aspx"&gt;UTC
to store date/time values&lt;/a&gt;. A decision made on a &lt;a href="http://www.tersosolutions.com"&gt;current
project&lt;/a&gt; I am working on was to use UTC for client applications. However, the dates
stored in SQL currently not in UTC. 
&lt;/p&gt;
&lt;p&gt;
I guess I've just gotten used to the GetDate() function in SQL. &amp;nbsp;A more appropriate
function for our application would be the GetUtcDate(), which will return the current
date/time in UTC format.
&lt;/p&gt;
&lt;p&gt;
From the article:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
The primary advantage of storing date/time values in UTC is that it makes the data
transportable. To see what I mean, imagine that following scenario: you have an eCommerce
website that is being hosted in a web server located in the Pacific time zone (UTC
-8) and this application stores the date and time orders were placed in server time.
Say a user, Bob, makes an order on August 1, 2007 at 9:00 AM UTC -8. After many months
of phenomenal growth, you decide to switch to a larger web hosting company, one on
the east coast where the time zone is UTC -5. Since the date/time is stored in server
time, Bob's previous order still shows that it was made on August 1 2007 at 9:00 AM.
But since we are now in UTC -5, it is as if Bob's order was made three hours earlier
than it really was (since when it was 9:00 AM on August 1, 2007 in the west coast
it was really 12:00 noon on the east coast). 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&amp;nbsp;The author then goes into explain how you can fix the above issue by doing an
update on the data to correct the time, which he refers to as "Ick", and I will have
to agree with that. You don't want to, nor should you have to ever update a time stamp
type property.
&lt;/p&gt;
&lt;p&gt;
The next example uses various time zones to illustrate the problem of converting from
one time zone to another (not to mention DST and SDT). Since we plan on eventually
offering localized versions of our Web Application, displaying all times in CST/CDT
is not idea. Not to mention the change from daylight savings time to stand time makes
the way we display data currently, very confusing. Things seem out of order at best.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;Well, I'm off to update my use of GetDate to GetUTCDate. Be sure to read the
full article.
&lt;/p&gt;
&lt;p&gt;
Note: I found this article originally from ScottGu's &lt;a href="http://weblogs.asp.net/scottgu/rss.aspx"&gt;RSS
feed&lt;/a&gt;. However, the actual &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/08/30/august-30th-links-asp-net-asp-net-ajax-iis7-visual-studio-silverlight-net.aspx"&gt;blog&lt;/a&gt;&amp;nbsp;doesn't
have the UTC article listed under Asp.Net, or listed at all.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=6f8d76ca-70e7-420b-9fd0-e541452a3abe" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,6f8d76ca-70e7-420b-9fd0-e541452a3abe.aspx</comments>
      <category>Technology/Programming</category>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=3fc111dc-0a81-4529-94b3-64b523f65f05</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,3fc111dc-0a81-4529-94b3-64b523f65f05.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,3fc111dc-0a81-4529-94b3-64b523f65f05.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=3fc111dc-0a81-4529-94b3-64b523f65f05</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today I came across 2 articles relating to SQL server. The <a href="http://www.sqlservercentral.com/columnists/jLynds/3136.asp">first</a>,
talks about determining events that take place during a time slice. I can see
possible uses for this in scheduling, and definite use in reporting.
</p>
        <p>
The second <a href="http://www.databasejournal.com/features/mssql/article.php/3691821">article</a>,
discusses some new features and functionality in SQL 2008. Below are some
quick notes that were important to me. 
</p>
        <ul>
          <li>
Transparent DB encryption - I'm more in interested in transparent table encryption,
including indexes (in case the index contains sensitive data). Further research is
needed. I know SQL 2005 has some encryption functionality, so I'm interested in what
has exactly changed.</li>
          <li>
Built in support for auditing data. Configured thru T-SQL. 
</li>
          <li>
Data Compression. 
</li>
          <ul>
            <li>
MS says slight processor performance hit on compression, but made up due to less I/O. 
</li>
            <li>
It will be an interesting exercise to see how this will work on VMWare.</li>
          </ul>
          <li>
Resource Governor 
</li>
          <ul>
            <li>
Prevent users or groups from consuming high levels of resources. 
</li>
            <li>
Since everyone is going to be coming in as Network Service (a rather large assumption),
be interesting to see if we can still take advantage of this</li>
          </ul>
          <li>
HotPlug CPU 
</li>
          <ul>
            <li>
Don't know if we can take advantage of this. Probably only if we were using blades.</li>
          </ul>
          <li>
Performance Data 
</li>
          <ul>
            <li>
Sql Dashboard to display 
</li>
            <li>
Suggestions for improving performance 
</li>
            <li>
Current and historical data</li>
          </ul>
          <li>
Installation sounds allot easier 
</li>
          <ul>
            <li>
Configuration data separate from engine, so you should be able to setup once, deploy
multiple servers and then configure. 
</li>
            <li>
Should help with cloning.</li>
          </ul>
        </ul>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=3fc111dc-0a81-4529-94b3-64b523f65f05" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>SQL Server (2008) Articles</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,3fc111dc-0a81-4529-94b3-64b523f65f05.aspx</guid>
      <link>http://blog.salvoz.com/2007/08/16/SQLServer2008Articles.aspx</link>
      <pubDate>Thu, 16 Aug 2007 01:17:39 GMT</pubDate>
      <description>&lt;p&gt;
Today I came across 2 articles relating to SQL server. The &lt;a href="http://www.sqlservercentral.com/columnists/jLynds/3136.asp"&gt;first&lt;/a&gt;,
talks about determining events that take place during a time slice.&amp;nbsp;I can see
possible uses for this in&amp;nbsp;scheduling, and definite use in&amp;nbsp;reporting.
&lt;/p&gt;
&lt;p&gt;
The second &lt;a href="http://www.databasejournal.com/features/mssql/article.php/3691821"&gt;article&lt;/a&gt;,
discusses some new&amp;nbsp;features and functionality&amp;nbsp;in SQL 2008. Below are some
quick notes that were important to me. 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Transparent DB encryption - I'm more in interested in transparent table encryption,
including indexes (in case the index contains sensitive data). Further research is
needed. I know SQL 2005 has some encryption functionality, so I'm interested in what
has exactly changed.&lt;/li&gt;
&lt;li&gt;
Built in support for auditing data. Configured thru T-SQL. 
&lt;/li&gt;
&lt;li&gt;
Data Compression. 
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
MS says slight processor performance hit on compression, but made up due to less I/O. 
&lt;/li&gt;
&lt;li&gt;
It will be an interesting exercise to see how this will work on VMWare.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Resource Governor 
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
Prevent users or groups from consuming high levels of resources. 
&lt;/li&gt;
&lt;li&gt;
Since everyone is going to be coming in as Network Service (a rather large assumption),
be interesting to see if we can still take advantage of this&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
HotPlug CPU 
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
Don't know if we can take advantage of this. Probably only if we were using blades.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Performance Data 
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
Sql Dashboard to display 
&lt;/li&gt;
&lt;li&gt;
Suggestions for improving performance 
&lt;/li&gt;
&lt;li&gt;
Current and historical data&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Installation sounds allot easier 
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
Configuration data separate from engine, so you should be able to setup once, deploy
multiple servers and then configure. 
&lt;/li&gt;
&lt;li&gt;
Should&amp;nbsp;help with cloning.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=3fc111dc-0a81-4529-94b3-64b523f65f05" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,3fc111dc-0a81-4529-94b3-64b523f65f05.aspx</comments>
      <category>Technology/Sql</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=ba70f062-cf73-4518-9556-74c9dfd12b1b</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,ba70f062-cf73-4518-9556-74c9dfd12b1b.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,ba70f062-cf73-4518-9556-74c9dfd12b1b.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ba70f062-cf73-4518-9556-74c9dfd12b1b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So I got around to adding Database rollback functionality to my MSTest unit tests
by using an article I read in MSDN magazine back in 04, before switching to MBUnit
at my last job. 
</p>
        <p>
  
</p>
        <p>
Everything was working great on my local computer (Vista even), and then I checked
in my tests, and the failed, horribly on the build server. Fist issue was MSDTC network
access was not enable, so I fixed that, but Then the build wouldn't even complete. 
</p>
        <p>
  
</p>
        <p>
I dropped down to a console window and ran the tests manually using the MSTest command
line tool. When running all of the tests, it hung after about test #9 of 17. When
running the tests individually I was getting MSDTC errors. After spending too long
just randomly trying DTC settings, I remembered the trusty MSDTC testing tool I had
stashed away for problems like this. Got that copied over to the build server and.....a
generic error message that had me searching on Google to no avail. 
</p>
        <p>
  
</p>
        <p>
Around this time, I noticed that the event view was conveniently located in the same
MMC windows as Component Services, and had meant to check it for the past 30 minutes,
I finally opened it up and BAM, there it was, a DTC error, but would it give me a
clue as to what the problem was? YES! Not only a clue, but a god dam solution to boot
(a welcome change). 
</p>
        <p>
  
</p>
        <p>
The problem? My build server was from the same clone as my Dev Server that had the
SQL DB on, and since I did not use sysprep, but SysInternals NewSid app, the DTC was
not setup correctly (they both had the same ID). 
</p>
        <p>
  
</p>
        <p>
The solution? Run msdtc -uninstall and then msdtc -install from the command line to
reinstall msdtc. I had to run msdtc -install twice and click around in the Component
Services windows a couple of times before i could get DTC configured for using a local
coordinator, but in the end, it was running. 
</p>
        <p>
  
</p>
        <p>
Back to dtctester, which passed, back to my command line unit tests, which passed,
back to the build server, which passed. 
</p>
        <p>
  
</p>
        <p>
Now because I like the extra challenge, I thought I'd enable windows firewall on the
build server as well. Whooops, broke it again, but I knew I had gotten DTC to work
before so it was just a matter of comparing settings. 
</p>
        <p>
  
</p>
        <p>
It's pretty easy to get DTC to work with windows firewall, just enable an exception
in the firewall for c:\windows\system32\msdtc.exe, and don't forget to restart MSDTC
service for changes to really take affect. 
</p>
        <p>
  
</p>
        <p>
Bam, everything works, and now, I can go home.
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=ba70f062-cf73-4518-9556-74c9dfd12b1b" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>Don't forget to check the event log - MSDTC</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,ba70f062-cf73-4518-9556-74c9dfd12b1b.aspx</guid>
      <link>http://blog.salvoz.com/2007/06/26/DontForgetToCheckTheEventLogMSDTC.aspx</link>
      <pubDate>Tue, 26 Jun 2007 04:29:13 GMT</pubDate>
      <description>&lt;p&gt;
So I got around to adding Database rollback functionality to my MSTest unit tests
by using an article I read in MSDN magazine back in 04, before switching to MBUnit
at my last job. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
Everything was working great on my local computer (Vista even), and then I checked
in my tests, and the failed, horribly on the build server. Fist issue was MSDTC network
access was not enable, so I fixed that, but Then the build wouldn't even complete. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
I dropped down to a console window and ran the tests manually using the MSTest command
line tool. When running all of the tests, it hung after about test #9 of 17. When
running the tests individually I was getting MSDTC errors. After spending too long
just randomly trying DTC settings, I remembered the trusty MSDTC testing tool I had
stashed away for problems like this. Got that copied over to the build server and.....a
generic error message that had me searching on Google to no avail. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
Around this time, I noticed that the event view was conveniently located in the same
MMC windows as Component Services, and had meant to check it for the past 30 minutes,
I finally opened it up and BAM, there it was, a DTC error, but would it give me a
clue as to what the problem was? YES! Not only a clue, but a god dam solution to boot
(a welcome change). 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
The problem? My build server was from the same clone as my Dev Server that had the
SQL DB on, and since I did not use sysprep, but SysInternals NewSid app, the DTC was
not setup correctly (they both had the same ID). 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
The solution? Run msdtc -uninstall and then msdtc -install from the command line to
reinstall msdtc. I had to run msdtc -install twice and click around in the Component
Services windows a couple of times before i could get DTC configured for using a local
coordinator, but in the end, it was running. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
Back to dtctester, which passed, back to my command line unit tests, which passed,
back to the build server, which passed. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
Now because I like the extra challenge, I thought I'd enable windows firewall on the
build server as well. Whooops, broke it again, but I knew I had gotten DTC to work
before so it was just a matter of comparing settings. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
It's pretty easy to get DTC to work with windows firewall, just enable an exception
in the firewall for c:\windows\system32\msdtc.exe, and don't forget to restart MSDTC
service for changes to really take affect. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
Bam, everything works, and now, I can go home.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=ba70f062-cf73-4518-9556-74c9dfd12b1b" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,ba70f062-cf73-4518-9556-74c9dfd12b1b.aspx</comments>
      <category>Technology/Programming</category>
      <category>Technology/Sql</category>
    </item>
  </channel>
</rss>