<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Coding Corner</title>
	<atom:link href="http://www.sres.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sres.co.uk</link>
	<description>Like a muller corner, mostly creamy yoghurt with a little bit of tasty stuff</description>
	<lastBuildDate>Tue, 30 Mar 2010 17:05:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Working with XML in SQL2008</title>
		<link>http://www.sres.co.uk/2009/08/25/working-with-xml-sql2008/</link>
		<comments>http://www.sres.co.uk/2009/08/25/working-with-xml-sql2008/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 13:56:05 +0000</pubDate>
		<dc:creator>Sres</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Insert]]></category>
		<category><![CDATA[Select]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL2008]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.sres.co.uk/?p=56</guid>
		<description><![CDATA[Since SQL2005 the ability to store entire XML documents within a database field has been achievable using the xml data type.  In this article I&#8217;m going to demonstrate how easy it is to create, store and retrieve an XML document from within SQL2008.
--Create a new table

CREATE TABLE BooksXML (
  BookID int PRIMARY KEY,
  [...]]]></description>
			<content:encoded><![CDATA[<p>Since SQL2005 the ability to store entire XML documents within a database field has been achievable using the xml data type.  In this article I&#8217;m going to demonstrate how easy it is to create, store and retrieve an XML document from within SQL2008.</p>
<pre class="brush:[sql]">--Create a new table

CREATE TABLE BooksXML (
  BookID int PRIMARY KEY,
  BookXml xml NOT NULL)</pre>
<p>Once the table has been created we need to add some basic information and insert it into the table.</p>
<pre class="brush:[sql]">--Insert two XML fragments

DECLARE @xml AS XML
SET @xml = '
<Books>
 <Book ID="1"
   BookTitle="Where Eagles Dare"
   BookAuthor="Alistair MacClean"
   BookCost="£9.99">
 </Book>
</Books>'

--insert into the table
INSERT INTO BooksXML (BookID, BookXml) VALUES (1, @xml)

SET @xml = '
<Books>
 <Book ID="2"
   BookTitle="Marker"
   BookAuthor="Robin Cook"
   BookCost="£8.99">
</Books>'

--insert into the table
INSERT INTO BooksXML (BookID, BookXml) VALUES (2, @xml)</pre>
<p>Your XML must be well formed when inserting into the database, any attempt to insert malformed XML will result in a regular XML error message.</p>
<p>Once we have stored the data, you will want to get at it again to display it.  If you want to find a specific book title you could use the exist function as below.</p>
<pre class="brush:[sql]">--Retrieve the book Marker by its name.

SELECT * FROM BooksXML
WHERE BookXml.exist('Books/Book[@name="Marker"]') = 1</pre>
<p>And that is it, you&#8217;ve stored XML, retrieved XML of a specific value, by delving into the XML stored within the SQL Server database.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sres.co.uk/2009/08/25/working-with-xml-sql2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where are SSIS Packages stored?</title>
		<link>http://www.sres.co.uk/2009/08/19/where-are-ssis-packages-stored/</link>
		<comments>http://www.sres.co.uk/2009/08/19/where-are-ssis-packages-stored/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 13:17:54 +0000</pubDate>
		<dc:creator>Sres</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[DTS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://www.sres.co.uk/?p=38</guid>
		<description><![CDATA[SQL Server Integration Services (SSIS) are nothing new, but they are still shrouded in mystery.  Data Transformation Services (DTS) are now a thing of the past, however many developers still cling onto the legacy way of scripting SQL Server because of how fundamentally easy it was to create a package.
Lets face it, Microsoft have never [...]]]></description>
			<content:encoded><![CDATA[<p>SQL Server Integration Services (SSIS) are nothing new, but they are still shrouded in mystery.  Data Transformation Services (DTS) are now a thing of the past, however many developers still cling onto the legacy way of scripting SQL Server because of how fundamentally easy it was to create a package.</p>
<p>Lets face it, Microsoft have never been good at documentation; and it is with heavy heart that when a product finally falls off the shelf a new equally undocumented product is paraded.</p>
<p><span id="more-38"></span><br />
SSIS was no different, unless you&#8217;re willing to wade through what documentation there is with little or no organisation, you&#8217;ll have to patch together how things work by searching the internet and hoping that someone has already done what you want.</p>
<p>Migrating DTS from SQL Server 2000 can be daunting, it has its pitfalls, the Migration Wizard supplied with SQL Server 2005 and 2008 only has a success rate of at best 25%, you can see why Microsoft are pushing a 3rd party tool (which I&#8217;m quite surprised that they haven&#8217;t already bought the company out).</p>
<p>Migrating simple DTS packages is easy enough and you can find articles on these all over the net (links at the bottom).  However this is where all the articles stop, short of actually telling you where the actual SSIS packages are placed and how to get at them.</p>
<p>SSIS packages are kept within the msdb database, in a system table called dbo.sysdtspackages.</p>
<p>To view the package you will need to have installed Microsoft Visual Studio (2005 or 2008), depending on your version that comes with your SQL Server installation.</p>
<p>Once it Visual Studio has loaded, create a new Integration Services Project, give it a name and click open.  In the solution explorer on the right, you can delete the package.dtsx file that is created, this is blank.</p>
<p style="text-align: center;"><a href="http://www.sres.co.uk/wp-content/uploads/2009/08/newproject.jpg"><img class="aligncenter size-full wp-image-43" title="New Project" src="http://www.sres.co.uk/wp-content/uploads/2009/08/newproject.jpg" alt="New Project" width="437" height="314" /></a></p>
<p>Next right click on the SSIS Packages title and choose, Add Existing Package.</p>
<p style="text-align: center;"><a href="http://www.sres.co.uk/wp-content/uploads/2009/08/addpackage.jpg"><img class="aligncenter size-full wp-image-45" title="Add SSIS Package" src="http://www.sres.co.uk/wp-content/uploads/2009/08/addpackage.jpg" alt="Add SSIS Package" width="339" height="398" /></a></p>
<p>Fill in each of the sections, generally you&#8217;ll be working locally, use the browse button (&#8230;) to find your package and then click OK to open it.</p>
<p style="text-align: center;"><a href="http://www.sres.co.uk/wp-content/uploads/2009/08/addexistingpackage.jpg"><img class="aligncenter size-full wp-image-44" title="Add Existing Package" src="http://www.sres.co.uk/wp-content/uploads/2009/08/addexistingpackage.jpg" alt="Add Existing Package" width="468" height="386" /></a></p>
<p>Your package will appear in the main window.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sres.co.uk/2009/08/19/where-are-ssis-packages-stored/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
