<?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>tim laqua dot com &#187; dtsx</title>
	<atom:link href="http://timlaqua.com/tag/dtsx/feed/" rel="self" type="application/rss+xml" />
	<link>http://timlaqua.com</link>
	<description>Thoughts and Code from Tim Laqua</description>
	<lastBuildDate>Sun, 09 May 2010 15:25:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Exporting SSIS Packages Stored on the Server (MSDB) to .DTSX (XML)</title>
		<link>http://timlaqua.com/2008/06/exporting-ssis-packages-stored-on-the-server-msdb-to-dtsx-xml/</link>
		<comments>http://timlaqua.com/2008/06/exporting-ssis-packages-stored-on-the-server-msdb-to-dtsx-xml/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 17:10:34 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[business intelligence]]></category>
		<category><![CDATA[dtsx]]></category>
		<category><![CDATA[msdb]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[ssis]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=33</guid>
		<description><![CDATA[We wanted to export an SSIS package that was stored on the server in the msdb.dbo.sysdtspackages90 table to a .dtsx file so we could poke at it. Here's what we came up with: DECLARE @SQLcommand VARCHAR&#40;MAX&#41; SET @SQLcommand = 'bcp &#34;SELECT cast(cast(packagedata as varbinary(max)) as varchar(max)) FROM msdb.dbo.sysdtspackages90 WHERE name=''PackageName''&#34; queryout &#34;c:\output.dtsx&#34; -T -c' EXEC [...]]]></description>
			<content:encoded><![CDATA[<p>We wanted to export an SSIS package that was stored on the server in the msdb.dbo.sysdtspackages90 table to a .dtsx file so we could poke at it. </p>
<p>Here's what we came up with:</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">DECLARE</span> @SQLcommand <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">MAX</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">SET</span> @SQLcommand <span style="color: #808080;">=</span> 
    <span style="color: #FF0000;">'bcp &quot;SELECT cast(cast(packagedata as varbinary(max)) as varchar(max)) 
     FROM msdb.dbo.sysdtspackages90 
     WHERE name='</span><span style="color: #FF0000;">'PackageName'</span><span style="color: #FF0000;">'&quot; queryout &quot;c:<span style="color: #000099; font-weight: bold;">\o</span>utput.dtsx&quot; -T -c'</span>
<span style="color: #0000FF;">EXEC</span> xp_cmdshell @SQLcommand</pre></div></div>

<p>Alternatively, you can just Export the package via SSMS <img src='http://timlaqua.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2008/06/exporting-ssis-packages-stored-on-the-server-msdb-to-dtsx-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
