<?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>Sqlserver007 &#187; SSIS</title>
	<atom:link href="http://www.sqlserver007.com/category/bi/ssis/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sqlserver007.com</link>
	<description>Blog on SQL SERVER and Business Intelligence  by Vivekanand Serou</description>
	<lastBuildDate>Fri, 21 May 2010 11:37: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>Running SQL Reporting Services Report from SSIS</title>
		<link>http://www.sqlserver007.com/2010/01/20/running-sql-reporting-services-report-from-ssis/</link>
		<comments>http://www.sqlserver007.com/2010/01/20/running-sql-reporting-services-report-from-ssis/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 10:35:03 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.sqlserver007.com/?p=496</guid>
		<description><![CDATA[Whenever you create a new Subscription in Sql server reporting services, a new job is created under the Sql agent as shown in the figure below. You can use the msdb.dbo.sp_start_job procedure to start the job. In SSIS create a new SQL task and run the job wherever required exec msdb.dbo.sp_start_job @job_name = 'JobName' For [...]]]></description>
			<content:encoded><![CDATA[<p>Whenever you create a new Subscription in Sql server reporting services, a new job is created under the Sql agent as shown in the figure below.</p>
<p><a href="http://www.sqlserver007.com/wp-content/uploads/2010/01/Job1.jpg"><img src="http://www.sqlserver007.com/wp-content/uploads/2010/01/Job1.jpg" alt="" title="Job" width="291" height="60" class="aligncenter size-full wp-image-502" /></a></p>
<p> You can use the <strong>msdb.dbo.sp_start_job</strong> procedure to start the job.  In SSIS create a new SQL task and run the job wherever required</p>
<pre>exec msdb.dbo.sp_start_job @job_name = 'JobName'</pre>
<p>For more information about sp_start_job please refer <a href="http://msdn.microsoft.com/en-us/library/ms186757.aspx">MSDN</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserver007.com/2010/01/20/running-sql-reporting-services-report-from-ssis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Could not open global shared memory to communicate with performance DLL; data flow performance counters are not available.  To resolve, run this package as an administrator, or on the system&#8217;s console.</title>
		<link>http://www.sqlserver007.com/2010/01/17/could-not-open-global-shared-memory-to-communicate-with-performance-dll-data-flow-performance-counters-are-not-available-to-resolve-run-this-package-as-an-administrator-or-on-the-systems-consol/</link>
		<comments>http://www.sqlserver007.com/2010/01/17/could-not-open-global-shared-memory-to-communicate-with-performance-dll-data-flow-performance-counters-are-not-available-to-resolve-run-this-package-as-an-administrator-or-on-the-systems-consol/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 09:59:58 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[SQLErrors]]></category>

		<guid isPermaLink="false">http://www.sqlserver007.com/?p=490</guid>
		<description><![CDATA[You may see the above error if you are using the SQL server Destination in your SSIS package. Sql server Destination cannot be used in packages that access a SQL Server database on a remote server. Instead use the OLEDB destination. Things to note for SQL Server Destination a. It offers the same speed as [...]]]></description>
			<content:encoded><![CDATA[<p>You may see the above error if you are using the <strong>SQL server Destination</strong> in your SSIS package.<br />
<a href="http://www.sqlserver007.com/wp-content/uploads/2010/01/SqlserveDestination.jpg"><img src="http://www.sqlserver007.com/wp-content/uploads/2010/01/SqlserveDestination.jpg" alt="" title="SqlserveDestination" width="168" height="74" class="aligncenter size-full wp-image-491" /></a></p>
<p>Sql server Destination cannot be used  in packages that access a SQL Server database on a remote server. Instead use the OLEDB destination.</p>
<p>Things to note for SQL Server Destination</p>
<p>a. It offers the same speed as the Bulk Insert Operation.<br />
b. It does not support Error Output.</p>
<p>For more information please check <a href="http://msdn.microsoft.com/en-us/library/ms141095.aspx">msdn</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserver007.com/2010/01/17/could-not-open-global-shared-memory-to-communicate-with-performance-dll-data-flow-performance-counters-are-not-available-to-resolve-run-this-package-as-an-administrator-or-on-the-systems-consol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encryption in SQL SERVER using SSIS</title>
		<link>http://www.sqlserver007.com/2009/11/07/encryption-in-sql-server-using-ssis/</link>
		<comments>http://www.sqlserver007.com/2009/11/07/encryption-in-sql-server-using-ssis/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 15:37:36 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[SSIS]]></category>
		<category><![CDATA[TSQL Development]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.sqlserver007.com/?p=288</guid>
		<description><![CDATA[I have been recently working on an Sql Server Encryption Project. It includes getting the data from a source and importing them into the Datawarehouse via the ETL(SSIS in this case) and then Encrypting it. I decided to blog on Encryption to share my experience. a. When you Encrypt the Data in SSIS make sure [...]]]></description>
			<content:encoded><![CDATA[<p>I have been recently working on an Sql Server Encryption Project. It includes getting the data from a source and importing them into the Datawarehouse via the ETL(SSIS in this case) and then Encrypting it. I decided to blog on Encryption to share my experience.</p>
<p>a. When you Encrypt the Data in SSIS make sure you Encrypt in Batches(i.e dont encrypt the same data again).<br />
b. The datatypes should be valid for the Encrypted Content and should have enough space to store it(I used nvarchar(max))</p>
<p>Below is a small Example of the Encryption Process:</p>
<p><strong>Encrypting the Database</strong></p>
<pre>
use EncryptionTest

--Create a Master Key by Encryption
create master key Encryption by password = 'Sql5erver'

--Create the Certificate
create certificate testcert with Subject = 'Testing the Symmetric Encryption'

--Create the Symmetric Key with Algorithm and Encrypt it with the certificate
create Symmetric Key testkey with algorithm =  AES_256 encryption by certificate testcert;
</pre>
<p><strong>Sample Tables and Data</strong></p>
<pre>
create Database Encryptiontest
go

create table Source
(
	UserID int
	,[Name] varchar(100)
	,Password varchar(max)
)
go

insert into Source
select 1,'Vivek','Sqlserver007'
union
select 2,'Jermey','MungingData'
union
select 3,'Marcus','SirMarcus'
union
select 4,'Cesare','Berlusconi'
go

create table EncryptedData
(
	userID int
	,[Name] varchar(100)
	,EncryptedPassword nvarchar(max)
	,Logid int
)

go
</pre>
<p><strong><u>Procedure for Encryption</u></strong></p>
<p>The Detailed Syntax for <strong>EncryptbyKey </strong>is given in this <a href="http://technet.microsoft.com/en-us/library/ms174361.aspx">MSDN </a>article</p>
<pre>
create procedure EncryptData
(
	@Logid int
)

as

Open Symmetric Key Testkey Decryption by Certificate TestCert

update EncryptedData
set EncryptedPassword = ENCRYPTBYKEY(Key_guid('testkey'),EncryptedPassword) where Logid = @Logid
</pre>
<p>Now Coming to the SSIS Task. I have used the Logid as the variable which controls the records to be encrypted in every flow(i.e the Log id changes for every iteration of the dataflow task). Once the records are transferred to the Destination table EncryptedData the procedure Encryptdata @Logid is executed.<br />
<br />
<img src="http://www.sqlserver007.com/wp-content/uploads/2009/11/SSISTask.jpg" alt="SSISTask" title="SSISTask" width="355" height="290" class="aligncenter size-full wp-image-295" /></p>
<p><strong>Variables and the DataSourcetask</strong></p>
<p>
<img src="http://www.sqlserver007.com/wp-content/uploads/2009/11/Encryption_DataFlow.jpg" alt="Encryption_DataFlow" title="Encryption_DataFlow" width="833" height="464" class="aligncenter size-full wp-image-296" /></p>
<p><strong>DataFlow task and Derived Column</strong><br />
<br />
<img src="http://www.sqlserver007.com/wp-content/uploads/2009/11/DataFlow_DerivedColumn.jpg" alt="DataFlow_DerivedColumn" title="DataFlow_DerivedColumn" width="623" height="705" class="aligncenter size-full wp-image-298" /></p>
<p><strong><u>How to Decrypt the Data?</u></strong></p>
<p>Once the Data is encrypted the table is displayed as follows</p>
<p><img src="http://www.sqlserver007.com/wp-content/uploads/2009/11/EncryptedData.jpg" alt="EncryptedData" title="EncryptedData" width="272" height="179" class="aligncenter size-full wp-image-304" /></p>
<p>For Decryption the End user should have the following permissions<br />
<a href="http://msdn.microsoft.com/en-us/library/ms186278.aspx">Grant Control on Certificate</a><br />
<a href="http://msdn.microsoft.com/en-us/library/ms179887.aspx">Grant View Definition on Symmetric Key</a></p>
<p>Following is the way to Decrypt. You need to open the Symmetric key to Decrypt it.</p>
<pre>
Open Symmetric Key TestKey Decryption by Certificate TestCert

select UserID,[name],CAST(DecryptByKey(EncryptedPassword) as nvarchar) as Password from
EncryptedData
 </pre>
<p>The following are the DMV&#8217;s(Dynamic Management Views) that can be used for Encryption</p>
<pre>
--Checking the Symmetric keys
select * From sys.symmetric_keys

--Checking the certificates
select  * from sys.certificates

--Checking for any openkeys
select * From sys.openkeys
</pre>
<p>There are some good articles on Encryption that may be useful to you in future.</p>
<p><a href="http://technet.microsoft.com/en-us/library/ms189586.aspx">Encryption HierArchy</a><br />
<a href="http://blogs.technet.com/keithcombs/archive/2005/11/24/sql-server-2005-data-encryption.aspx">http://blogs.technet.com/keithcombs/archive/2005/11/24/sql-server-2005-data-encryption.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserver007.com/2009/11/07/encryption-in-sql-server-using-ssis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding Expressions in SSIS &#8211; Connection Strings</title>
		<link>http://www.sqlserver007.com/2009/06/20/adding-expressions-in-ssis/</link>
		<comments>http://www.sqlserver007.com/2009/06/20/adding-expressions-in-ssis/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 12:00:17 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://www.sqlserver007.com/?p=175</guid>
		<description><![CDATA[Expressions are powerful in Integration Services. With Expressions you can dynamically set the servername (based on the environment) or the name of the excel file(if it is a fixed format). Let me give you an example. I have a simple Dataflow task(as shown below) that gets the data from a table and exports it in [...]]]></description>
			<content:encoded><![CDATA[<p>Expressions are powerful in Integration Services. With Expressions you can dynamically set the servername (based on the environment) or the name of the excel file(if it is a fixed format). Let me give you an example.</p>
<p>I have a simple Dataflow task(as shown below) that gets the data from a table and exports it in a Tab delimited text file. </p>
<div id="attachment_187" class="wp-caption aligncenter" style="width: 443px"><img src="http://www.sqlserver007.com/wp-content/uploads/2009/06/Expressions_SSIS_DataFlow.png" alt="The Data Flow Task" title="The Data Flow Task" width="433" height="220" class="size-full wp-image-187" /><p class="wp-caption-text">The Data Flow Task</p></div>
<p>I have set up a following variable called ServerName where I can change the value dynamically on the Connection String.</p>
<div id="attachment_185" class="wp-caption aligncenter" style="width: 458px"><img src="http://www.sqlserver007.com/wp-content/uploads/2009/06/Expressions_ServerName.png" alt="Variable Server Name" title="Variable ServerName" width="448" height="85" class="size-full wp-image-185" /><p class="wp-caption-text">Variable Server Name</p></div>
<p><script language="javascript" type="text/javascript" src="http://ads.netklix.com/ASEAAAAAAABVAAAAAAAA2QAAAAAAkQAAAAAAey8AjQAA">
</script><br />
<noscript><a href="http://www.netklix.co.uk/">netklix.co.uk</a></noscript></p>
<p>To configure the ConnectionString to use the Variable name dynamically at RunTime we need to configure Dimensions. This is how its done.Right Click on the Connection String and click properties(or click F4 by highlighting Databaes connection)</p>
<div id="attachment_190" class="wp-caption aligncenter" style="width: 505px"><img src="http://www.sqlserver007.com/wp-content/uploads/2009/06/SSIS_Connection_Properties.png" alt="Database Connection Properties" title="SSIS_Connection_Properties" width="495" height="393" class="size-full wp-image-190" /><p class="wp-caption-text">Database Connection Properties</p></div>
<p>In the Properties section click on the Expression for configuring nd also setting the Servername settings as below.</p>
<div id="attachment_192" class="wp-caption aligncenter" style="width: 411px"><img src="http://www.sqlserver007.com/wp-content/uploads/2009/06/Expressions_Connection_Properties.png" alt="Expressions_Connection_Properties" title="Expressions_Connection_Properties" width="401" height="387" class="size-full wp-image-192" /><p class="wp-caption-text">Expressions_Connection_Properties</p></div>
<div id="attachment_193" class="wp-caption aligncenter" style="width: 481px"><img src="http://www.sqlserver007.com/wp-content/uploads/2009/06/Expressions_SelectServerName.png" alt="Select ServerName " title="Expressions_SelectServerName" width="471" height="375" class="size-full wp-image-193" /><p class="wp-caption-text">Select ServerName </p></div>
<div id="attachment_194" class="wp-caption aligncenter" style="width: 602px"><img src="http://www.sqlserver007.com/wp-content/uploads/2009/06/Expressions_VariableServerName.png" alt="Configure Value as ServerName" title="Expressions_VariableServerName" width="592" height="521" class="size-full wp-image-194" /><p class="wp-caption-text">Configure Value as ServerName</p></div>
<p>Click Ok twice and the expressions are now configured. The best way to check it is to use the Bidshelper. (www.codeplex.com/BidsHelper) In the below diagram as you notice the Pink colour on the edge of the Connection String Icon which represents that the connection is configured via Expression.</p>
<p><img src="http://www.sqlserver007.com/wp-content/uploads/2009/06/Expressions_BidsHelper.png" alt="Expressions_BidsHelper" title="Expressions_BidsHelper" width="183" height="78" class="aligncenter size-full wp-image-196" /></p>
<p>The above example should give you a good example on how to configure Connection Strings using Expressions. Just keep commenting .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserver007.com/2009/06/20/adding-expressions-in-ssis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Null value is eliminated by an aggregate or other SET operation</title>
		<link>http://www.sqlserver007.com/2009/04/06/null-value-is-eliminated-by-an-aggregate-or-other-set-operation/</link>
		<comments>http://www.sqlserver007.com/2009/04/06/null-value-is-eliminated-by-an-aggregate-or-other-set-operation/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 14:11:09 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[SSIS]]></category>
		<category><![CDATA[TSQL Development]]></category>
		<category><![CDATA[SQLErrors]]></category>

		<guid isPermaLink="false">http://www.sqlserver007.com/?p=68</guid>
		<description><![CDATA[The Problem occurs when an aggregate function(max,sum,avg..) exists on null values. Trying to get rid of the null values may be the solution but in certain cases..you may need the extra data relying on the null values. So whats the solution? Append set ANSI_WARNINGS OFF on the beginning of the sql statement. When using the [...]]]></description>
			<content:encoded><![CDATA[<p>The Problem occurs when an aggregate function(max,sum,avg..) exists on null values. Trying to get rid of the null values may be the solution but in certain cases..you may need the extra data relying on the null values.</p>
<p>So whats the solution?<br />
Append <strong>set ANSI_WARNINGS OFF</strong> on the beginning of the sql statement.</p>
<p>When using the same in SSIS packages the Packages may fail.The Output Window may indicate that there is already a OLEDB destination exported which in this case is the error message.<br />
<em><br />
An OLE DB record is available.  Source: &#8220;Microsoft SQL Native Client&#8221;  Hresult: 0x00040EDA  Description: &#8220;Warning: Null value is eliminated by an aggregate or other SET operation.&#8221;</em></p>
<p>So use <strong>set ANSI_WARNINGS OFF</strong></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2446771569747112";
google_ad_slot = "6029010469";
google_ad_width = 300;
google_ad_height = 250;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserver007.com/2009/04/06/null-value-is-eliminated-by-an-aggregate-or-other-set-operation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
