<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-32616583</id><updated>2024-09-28T21:49:36.300-07:00</updated><category term="Rajat"/><category term="RAJAT JAISWAL"/><category term="SQLServer"/><category term="Sql server"/><category term="ASP.NET"/><category term="TIPS"/><category term="indiandotnet"/><category term="Tips  Tricks"/><category term="SQL SERVER 2012"/><category term="SQL SERVER Feature"/><category term="trick"/><category term="SQL SERVER Tips"/><category term="ASP.NET 4"/><category term="ETL"/><category term="Performance"/><category term="SSIS"/><category term="SQL SERVER 2016"/><category term="AJAX"/><category term="Best Practices"/><category term="SQL SERVER Security"/><category term="Step by step SSIS"/><category term="WPF"/><category term="Step by Step ETL"/><category term="interview Question"/><category term="SQL Injections"/><category term="SQL Server Integreation Services"/><category term="SSIS Package deployment"/><category term="SSIS Sort"/><category term="SilverLight"/><category term="Simple Steps"/><category term="Backup"/><category term="Database Design"/><category term="Disaster Recovery"/><category term="JQuery"/><category term="Maintenance"/><category term="SQL SERVER Instance"/><category term="Security"/><category term="VB.Net"/><category term="CT"/><category term="Change Tracker"/><category term="Deploy SSIS Package"/><category term="IIS"/><category term="ISNULL"/><category term="MVC"/><category term="Mirroring"/><category term="Performance Dashboard"/><category term="Sql Server Integreation Service"/><category term="Utility"/><category term="sql system command"/><category term="table Information"/><category term="windows phone"/><category term="Aliasing"/><category term="BPA"/><category term="COUNT"/><category term="Change Data Capture"/><category term="Checksum backup"/><category term="Compression"/><category term="Differential backup"/><category term="Entity Framework"/><category term="FTP Connection"/><category term="GROUP BY"/><category term="Heap table"/><category term="IS NULL"/><category term="IndexDefrag"/><category term="LEARN WPF"/><category term="Merge statement"/><category term="NULL"/><category term="PWDCompare"/><category term="PWDENCRYPT"/><category term="Packages"/><category term="Page Compression"/><category term="Pivot"/><category term="REST"/><category term="Recover space"/><category term="Restore Database"/><category term="Row Compression"/><category term="SSIS Condition Split"/><category term="SSIS Conversion tool"/><category term="Secure password"/><category term="Space"/><category term="Space issue"/><category term="Statistics"/><category term="Stored procedure"/><category term="TVP"/><category term="Table Value parameter"/><category term="Undocumented feature"/><category term="VS 2010"/><category term="Visual Studio 2010"/><category term="WCF"/><category term="Web API"/><category term="XML"/><category term="freelancer"/><category term="stored procedures"/><category term="table Structure"/><category term="/3GB Switch"/><category term="ALTER TABLE TYPE"/><category term="Aggregate"/><category term="Aggregate Transformation"/><category term="BCP"/><category term="BCP in SQL SERVEr"/><category term="Binary Serialization"/><category term="Bulk copy program"/><category term="CDC"/><category term="CHECK CONSTRAINTS"/><category term="COALESCE"/><category term="CSS"/><category term="CSS PRE PROCESSOR"/><category term="CTE"/><category term="Chat Application"/><category term="CleanTable"/><category term="Code Generator"/><category term="Column Aliasing"/><category term="Compress backup"/><category term="Compressed backup"/><category term="Conditional split Transformation"/><category term="Constraint enable &amp; disable"/><category term="Contained Database"/><category term="Customize IDE"/><category term="DBCC CHECKIDENT"/><category term="DEFAULT VALUES"/><category term="DISABLE CONSTRAINTS"/><category term="DOM"/><category term="Database Email"/><category term="Date Range"/><category term="Date function"/><category term="Derived Column Transformation"/><category term="ESB"/><category term="EXPLICIT TRANSACTION"/><category term="Export Excel"/><category term="Find mobile"/><category term="GROUPING SETS"/><category term="HASHBYTES"/><category term="Hacking"/><category term="Hide Instance"/><category term="Highest salary"/><category term="IDENTTITY"/><category term="IN Clause"/><category term="Identity column"/><category term="JASON"/><category term="KILL"/><category term="KILL PROCESS"/><category term="LESS"/><category term="LESS.JS"/><category term="LINQ"/><category term="LINQ TO XML"/><category term="Learn WCF"/><category term="Live Streaming"/><category term="Log Shipping"/><category term="MS BUILD 2016"/><category term="Meta data"/><category term="Minimum salary"/><category term="Mobile Finder"/><category term="MultiCast Transformation"/><category term="Multilevel Grid"/><category term="Music with WPF"/><category term="NORESSED"/><category term="OSQL"/><category term="Outsource"/><category term="PAUSE Statements"/><category term="PHP Code Generator"/><category term="PMB"/><category term="PORT"/><category term="PORT 1433"/><category term="POX"/><category term="Password Encryption"/><category term="Pivot Viewer"/><category term="Policy Based Managment"/><category term="Project List"/><category term="RESSED"/><category term="Reference table"/><category term="Replication"/><category term="Resource file reading"/><category term="SEO"/><category term="SPAs"/><category term="SQL SERVER Backup check"/><category term="SQL SERVER max memory"/><category term="SSIS Multicast"/><category term="SSL"/><category term="SSRS"/><category term="Sammy.Js"/><category term="Security information popup"/><category term="Self signed Certificate"/><category term="Sequence feature"/><category term="ShrinkDatabase"/><category term="ShrinkFile"/><category term="Silverlight4"/><category term="Sort Control"/><category term="Sort Data"/><category term="Stored Procedure Generator"/><category term="TIC-TAC-TO Game"/><category term="TRANSACTION"/><category term="TRANSACTION LOG BACKUP"/><category term="Table Aliasing"/><category term="Testing"/><category term="Threading"/><category term="Thumbnail creator"/><category term="Trigger"/><category term="Twitter integration"/><category term="UNCOMMITED DATA"/><category term="UNION ALL"/><category term="UNION ALL Transformation"/><category term="UpdateUsage"/><category term="Verify restore"/><category term="Visual Studio 2015"/><category term="WAITFOR Delay"/><category term="WAITFOR Time"/><category term="WRITE"/><category term="Web Security"/><category term="XACT_ABORT"/><category term="XAML"/><category term="Youtube"/><category term="animation"/><category term="batch files"/><category term="colourful IDE"/><category term="customize VS 2008"/><category term="download latest dotnet"/><category term="dynamic queries"/><category term="earn money"/><category term="email SQL SERVEr"/><category term="export file"/><category term="html to word"/><category term="isqlw"/><category term="knockout.js"/><category term="localization"/><category term="manage sql server error logs"/><category term="online money"/><category term="rebuild sql server database"/><category term="rebuild sql server master database"/><category term="selenium IDE"/><category term="send Email using SQL SERVER"/><category term="software consultant"/><category term="sp_db_send_DBMail"/><category term="sp_executeSQL"/><category term="sp_helptext"/><category term="sp_msdependencies"/><category term="sp_who2"/><category term="sql server error log management"/><category term="table dependencies"/><category term="video downloader"/><category term="viewState"/><category term="web tools"/><title type='text'>Asp.net &amp;amp; Sql server fundas with Rajat Jaiswal</title><subtitle type='html'>this blog is basically for those people who want to help other and help themselves in web development.Main key feature of this blog is asp, asp.net ,Php and other web development lanaguage &amp;amp; Database</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rajatjaiswal.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>194</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-32616583.post-4922396925693724877</id><published>2016-05-11T01:13:00.000-07:00</published><updated>2016-05-11T05:43:45.235-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="rebuild sql server database"/><category scheme="http://www.blogger.com/atom/ns#" term="rebuild sql server master database"/><title type='text'>How to Rebuild SQL Server Database After a Failure</title><content type='html'>&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;SQL Server plays an integral part of its users who creates their own database where they can store and retrieve data whenever required. Sometimes, the user may face issue while trying to access their database due to crash of SQL Server. To overcome such issue and to make the database accessible, we need to be able to make the database run on another physical server. For this, we can recreate the entire SQL Server environment on an existing server instead of building a new server and installing SQL again.&lt;/p&gt;
&lt;h2&gt;Things to keep in mind before Rebuild SQL Server Database&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;In order to recreate the SQL environment, we will use an existing SQL Server that is already setup.&lt;/li&gt;
&lt;li&gt;Since the process involves restoring the master, msdb and user databases, we need to make sure that both the source and target SQL Servers must be on the exact service pack.&lt;/li&gt;
&lt;li&gt;If the Source and Target environment are not similar, the restore of master database on the target server will not be possible. &lt;/li&gt;
&lt;li&gt;To check the version of the target environment, use command ‘Select @@version’ in SSMS. &lt;/li&gt; 
&lt;li&gt;For version of Source environment, we can use a master backup file to check the SoftwareVersionMajor, SoftwareVersionMinor and SoftwareVersionBuild using the command ‘RESTORE HEADERONLY FROM DISK =&#39;F:\Backup\master_backup_2015_10_9_000001_7422453.BAK&#39;&lt;/li&gt;
&lt;li&gt;Ensure that both the environments have the same version before beginning the rebuild process on the target server.&lt;/li&gt;
&lt;li&gt;As an example for this page, we will use SQL 2008 SP2 (10.0.5000) for both source and destination.&lt;/li&gt;
&lt;li&gt;In Source- master, model and msdb databases are located on drive D while tempdb is on a dedicated drive E with initial size of 10GB.&lt;/li&gt;
&lt;li&gt;In Target- server has only one drive C without enough space to create 10GB file for tempdb.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Rebuilding SQL Server Database after a Failure&lt;/h3&gt;
&lt;p&gt;Here are the steps that need to be followed for rebuilding SQL Server database after a Failure:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Shutdown the SQL Services like SQL Server, Agent, SSIS, etc. on the target SQL Server using SQL Server Configuration Manager. &lt;/li&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQD_N3iRifFlVc6R2kf6r5nTkTFVjiO8qFWIDANC2R90t0DzbogsvgVeG9lwacNNQoXP022iJCmnyxmPX8pKvpcwp06FqlZG0f-rmAPeTg9Y2nHyenE02vHY25dQ_-Zux0oynN/s1600/g-1.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQD_N3iRifFlVc6R2kf6r5nTkTFVjiO8qFWIDANC2R90t0DzbogsvgVeG9lwacNNQoXP022iJCmnyxmPX8pKvpcwp06FqlZG0f-rmAPeTg9Y2nHyenE02vHY25dQ_-Zux0oynN/s400/g-1.png&quot; /&gt;&lt;/a&gt;
&lt;li&gt;Go to command window by typing cmd in the search box. Use the command &lt;br /&gt;
&lt;b&gt;&lt;i&gt;‘sqlservr -m’&lt;/i&gt;&lt;/b&gt; 
&lt;/li&gt;
&lt;li&gt;Open a new command prompt to start SQLCMD and use the following command to restore the master database:&lt;/li&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCb2EIuroLWH-etaYo9D7F2WsZ3qkQMSDGA-sURii8oDCySUAOo_0wv0dmcmlXR35hrGymP6Ec6vKdl8ewgqv8fW8FZci65mavCSeG_XQB8K0chTg1RXZ4H1_e6nzOT4DVB9Xz/s1600/g-cmd-1.PNG&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCb2EIuroLWH-etaYo9D7F2WsZ3qkQMSDGA-sURii8oDCySUAOo_0wv0dmcmlXR35hrGymP6Ec6vKdl8ewgqv8fW8FZci65mavCSeG_XQB8K0chTg1RXZ4H1_e6nzOT4DVB9Xz/s400/g-cmd-1.PNG&quot; /&gt;&lt;/a&gt;
&lt;li&gt;The instance of SQL Server, which was started in single user mode stops after the completion of master database restore. While trying to run ‘sqlservr -m’ again, SQL Server will not start as master database has the reference that model and msdb are on drive D and tempdb is on E drive. Since the target server does not contain Drives D and E, we will use the following command:&lt;br /&gt;
&lt;b&gt;&lt;i&gt;‘sqlservr –c –m –f –T3608’&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Where -c &gt;&gt; Starting SQL not as a service&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;-f &gt;&gt; starting with minimum configuration&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;-T3608 &gt;&gt;trace flag 3608 will skip automatic recovery of all databases except master database&lt;/i&gt;
&lt;/li&gt;
&lt;li&gt;We can change the location of the model and tempdb by using below commands after starting SQLCMD. We can also resize tempdb as well. &lt;/li&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZwY0jXnM4_FgT-eBdFs1Ir-V1CY723L-T1wYQ-AzZVzQ6VnjslCR9WSlW04pi_FDs55p5lHHcNVjYyBX-RomDSGGU-HgqjOmcfDRCkn_aOdReTy_LzsaPxvgJD8NBXer7p9xG/s1600/g-2-alter-database.PNG&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZwY0jXnM4_FgT-eBdFs1Ir-V1CY723L-T1wYQ-AzZVzQ6VnjslCR9WSlW04pi_FDs55p5lHHcNVjYyBX-RomDSGGU-HgqjOmcfDRCkn_aOdReTy_LzsaPxvgJD8NBXer7p9xG/s400/g-2-alter-database.PNG&quot; /&gt;&lt;/a&gt;
&lt;li&gt;We will stop the SQL Server from the CMD window by either closing it directly or using CTRL+BREAK. Restart the SQL Server with the help of SQL Server Configuration Manager. &lt;/li&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUAzyawhCtinrEiAWBWOpXWoOgkKfRtOn0w4Lwkp-QdnbW4gqBBQIbNZJg1XnH-S6RLsZBzevPiyKPy5hEfZ20dMokXuArfH5aLqZcra_P35BSH4CdBfdK7Byy5O6X1GR5B-uS/s1600/g-3.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUAzyawhCtinrEiAWBWOpXWoOgkKfRtOn0w4Lwkp-QdnbW4gqBBQIbNZJg1XnH-S6RLsZBzevPiyKPy5hEfZ20dMokXuArfH5aLqZcra_P35BSH4CdBfdK7Byy5O6X1GR5B-uS/s400/g-3.png&quot; /&gt;&lt;/a&gt;
&lt;li&gt;We will run the following command either on SSMS or SQLCMD to restore msdb database&lt;/li&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMOUgC2cWbdZTM5Ydx7hKX3MZr5M_THhadvuetyWZ6iI1JnEAhuNKCr9HQsi5dZyblWh816byWQKvy76LAT8Q4nxEL76-SYoQg5NvqSlqgTrvMCBXwrJBpAjdt_Dt7Jq1QhSh6/s1600/g-cmd-2.PNG&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMOUgC2cWbdZTM5Ydx7hKX3MZr5M_THhadvuetyWZ6iI1JnEAhuNKCr9HQsi5dZyblWh816byWQKvy76LAT8Q4nxEL76-SYoQg5NvqSlqgTrvMCBXwrJBpAjdt_Dt7Jq1QhSh6/s400/g-cmd-2.PNG&quot; /&gt;&lt;/a&gt;
&lt;li&gt;In the end, we will restore the user databases and start the SQL Server Agent.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;In the blog, we have been discussing ways on how to rebuild SQL Server database after a failure using existing server instead of creating a new one. After restoring the master and msdb databases, we were able to recover all the system information such as logins, schedules, jobs etc. without the need to recreate them. This method saves time since we do not need to build the entire server and install SQL Server all over again. However, if this methods fails to rebuild SQL Server Database then you can also take the help of third party utility like &lt;a href=&quot;https://www.systoolsgroup.com/sql-recovery.html&quot; target=&quot;_blank&quot;&gt;&lt;font color=&quot;orange&quot;&gt;SysTools SQL Recovery&lt;/font&gt;&lt;/a&gt; &lt;/p&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/4922396925693724877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/4922396925693724877'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2016/05/rebuild-sql-server-database-after-failure.html' title='How to Rebuild SQL Server Database After a Failure'/><author><name>Andrew Jackson</name><uri>http://www.blogger.com/profile/13681691598848401466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQD_N3iRifFlVc6R2kf6r5nTkTFVjiO8qFWIDANC2R90t0DzbogsvgVeG9lwacNNQoXP022iJCmnyxmPX8pKvpcwp06FqlZG0f-rmAPeTg9Y2nHyenE02vHY25dQ_-Zux0oynN/s72-c/g-1.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-5335814437613714828</id><published>2016-03-29T08:55:00.003-07:00</published><updated>2016-03-29T08:55:55.785-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Live Streaming"/><category scheme="http://www.blogger.com/atom/ns#" term="MS BUILD 2016"/><title type='text'>MS Build 2016 Live Streaming</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;style type=&quot;text/css&quot;&gt;  iframe#videoPlayerIframe {   background-color: white; /* remove or change this declaration to look nice on the parent site */   border: 0px solid white;   height: 1000px; /* this is a guess of the default height of the embedded page */   overflow: hidden;   padding: 0px;   width: 780px; /* change this declaration to look nice on the parent site */  } &lt;/style&gt;  

&lt;script type=&quot;text/javascript&quot;&gt;  (function($) {   var height, newHeight;   $(window).on(&#39;message&#39;, function(e){    try{     newHeight = e.originalEvent.data;     if(newHeight &amp;&amp; (height != newHeight)){      $(&#39;#videoPlayerIframe&#39;).height(newHeight);      height = newHeight;     }    }catch(e){}   });  })(jQuery); &lt;/script&gt;  

&lt;iframe src=&quot;https://channel9.msdn.com/LiveEmbedPlayer/Build2016?wt.mc_id=DX_835177&quot; seamless=&quot;seamless&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; id=&quot;videoPlayerIframe&quot; allowfullscreen&gt;&lt;/iframe&gt;

 
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/5335814437613714828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/5335814437613714828'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2016/03/ms-build-2016-live-streaming.html' title='MS Build 2016 Live Streaming'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-8974535044633672826</id><published>2016-03-28T00:22:00.000-07:00</published><updated>2016-03-28T00:22:19.070-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="manage sql server error logs"/><category scheme="http://www.blogger.com/atom/ns#" term="sql server error log management"/><title type='text'>Know How to Manage SQL Server Error Logs</title><content type='html'>&lt;p&gt;The SQL Server error log file contains an account of the entire information generated in SQL Server. It contains warnings, informational messages, and information about critical events that take place in SQL Server. Furthermore, important information, like success and failure of logon events user-generated messages also get stored in the SQL Server error log. Since it is a valuable data point for the SQL Server administrators, managing the size of the error logs is the most important thing that needs to be done.&lt;/p&gt;
&lt;p&gt;Every time, the SQL Server instance is started, the error log is initialized. In case the SQL Server instance has not been stated from a very long time, the error log can grow to a very large size. However, management of SQL Server error logs helps in maintaining the size of error log under control.&lt;/p&gt;
&lt;p&gt;In this write-up, we will discuss some of these methods by which an administrator can manage SQL Server error logs effectively. &lt;/p&gt;
&lt;h2&gt;Methods for Managing SQL Server Error Logs&lt;/h2&gt;
&lt;p&gt;There are many methods, which can help the administrators to manage the SQL server error logs effectively. Some of them are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;u&gt;Reinitialize SQL Server Error Logs&lt;/u&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;p&gt;In order to reinitialize the server, the stored procedure &lt;strong&gt;sp_cycle_errorlog&lt;/strong&gt; can be used. This stored procedure closes current error log and like a server restart, cycles error log extension. The new error log file will contain the version and copyright information and a line that will indicate that a new log is created.&lt;/p&gt;
&lt;p&gt;Each time, SQL Server is started, the error log file is named to &lt;strong&gt;errorlog.1&lt;/strong&gt;, and then errorlog.1 becomes &lt;strong&gt;errorlog.2&lt;/strong&gt; and so on. The syntax sp_cycle_errorlog cycles the error log files and that too without stopping and starting the server.&lt;/p&gt;
&lt;li&gt;&lt;strong&gt;&lt;u&gt;Increase Number Of Error Logs&lt;/u&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;p&gt;The second method by which an administrator can effectually manage SQL Server error log files is by increasing the number of error log files for a specific instance. There are seven error logs by default in SQL Server, which are stored in the log folder. For better management of error logs, the user might want to create more than seven log files. This can be done by adding a registry key in the registry editor. Before making any changes in the registry, it is advised to create a backup of the entire data.&lt;/p&gt;
&lt;p&gt;Browse to the following location in registry editor.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Create a key with the name &lt;strong&gt;NumErrorLogs&lt;/strong&gt; of value &lt;strong&gt;REG_DWORD type&lt;/strong&gt; to it. Double click on it and change its value data to the number of extra error logs you require in SQL Server.&lt;/p&gt;
&lt;li&gt;&lt;strong&gt;&lt;u&gt;Limiting Error Log Size&lt;/u&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;p&gt;Limiting the size of error log file is another method with the help of which the SQL Server error logs can be maintained. In SQL Server 2012 and subsequent versions, following mentioned script can be run to manage the size of an individual error log file.&lt;/p&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI5b_c19WJrHKmujFkCdejFNGD-W7cd6WoEyjrsQrPfxUSw_ZORkGKn8TYp-k36N3M5AarW-BKEZysYGxOmqkYngNiTxcCG4rwE1JDDc1nsvIzp-wdEfelgQmFL1DdFPc53rgb/s1600/blog-1.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI5b_c19WJrHKmujFkCdejFNGD-W7cd6WoEyjrsQrPfxUSw_ZORkGKn8TYp-k36N3M5AarW-BKEZysYGxOmqkYngNiTxcCG4rwE1JDDc1nsvIzp-wdEfelgQmFL1DdFPc53rgb/s400/blog-1.png&quot; /&gt;&lt;/a&gt;
&lt;/ol&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;With the help of the above-mentioned parameters, a database administrator can easily manage SQL Server the error log files.&lt;/p&gt;

&lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/8974535044633672826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/8974535044633672826'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2016/03/how-to-manage-sql-server-error-logs.html' title='Know How to Manage SQL Server Error Logs'/><author><name>Andrew Jackson</name><uri>http://www.blogger.com/profile/13681691598848401466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI5b_c19WJrHKmujFkCdejFNGD-W7cd6WoEyjrsQrPfxUSw_ZORkGKn8TYp-k36N3M5AarW-BKEZysYGxOmqkYngNiTxcCG4rwE1JDDc1nsvIzp-wdEfelgQmFL1DdFPc53rgb/s72-c/blog-1.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-8967999932148177183</id><published>2015-10-18T10:56:00.000-07:00</published><updated>2015-10-18T12:01:14.814-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="indiandotnet"/><category scheme="http://www.blogger.com/atom/ns#" term="MultiCast Transformation"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Multicast"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Package deployment"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Sort"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by step SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips  Tricks"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><title type='text'>Step by Step SSIS Multicast Transformation TIP #121</title><content type='html'>&lt;p&gt;Dear Friends,&lt;/p&gt; &lt;p&gt;This is another post in the series of &lt;strong&gt;step by step SSIS&lt;/strong&gt; ,&lt;strong&gt;Zero to hero series&lt;/strong&gt;. In this post we will discuss another transformation control which is &lt;strong&gt;Multicast transformation.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Multicast&lt;/strong&gt; is a way which help us to provide multiple copy of same source data for different transformation. Or in other words we can say &lt;strong&gt;multicast&lt;/strong&gt; transformation create &lt;strong&gt;multiple pipelines for the same data.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Lets understand this by an example. Suppose, we are product developer and selling product in different state in India. Now ,the problem is same product may have different selling price due to different tax system. So, we have to use same data of product but there will be different discount according to sate tax.&lt;/p&gt; &lt;p&gt;Now, here we go &lt;strong&gt;step by step&lt;/strong&gt;. for your information in this example we are going to use similar example which we did in last post of &lt;a href=&quot;http://sqlraaga.blogspot.in/2015/10/step-by-step-ssisderived-column.html&quot; target=&quot;_blank&quot;&gt;Derived column Transformation tip #120&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 1:- Add a package and drag drop data flow task and configure source database. I am taking Adventurework2012 database and using product &amp;amp;&amp;nbsp; productCategory tables for source data query below is simple snap of data &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS0tnSSulW9_xhj-OEZV4T5NH32-n9vlC6EIiuly4rfaKTP7QiyuTvxJzcy6ynq9bC6jeNagU1CwhGtOa2q3iyup1Sm1Idx_oFNlOLwiU0IlFOQWoqf65rUFC6k07_K1xbhdw_8g/s1600-h/Data1%25255B9%25255D.jpg&quot;&gt;&lt;img title=&quot;Data1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Data1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF_AuN5q6pJTO0AszRgOu6MhLKphQGZi-w2waJAXcSAGQZfut-79ZmRGeHOJ0rKFVt0bs26YEnBHd3qJldYCFFFllI8vZCBKvpzUoXe4Kr64-9MFUN7jzSh_3Q9KsdWzu4OMyvbQ//?imgmax=800&quot; width=&quot;538&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 2:- Once the data is configured. Drag drop &lt;strong&gt;Multicast&lt;/strong&gt; control&amp;nbsp; as shown in below figure and give output of source object to &lt;strong&gt;Multicast&lt;/strong&gt; and try to configure it.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIspKFpuB2cp5VTWzE0v2kcTofXe1uxP3Wk_TlUf2-kOPnilnsINZTCTms5hfrkK_48xmvK0wlkdkA4WNib38lZ070ZQyyMTj_IXBpyb9UMIIgisZqXrw-hq8fb5_6CvSTgaI1yA/s1600-h/DragDropMulticast%25255B8%25255D.jpg&quot;&gt;&lt;img title=&quot;DragDropMulticast&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;DragDropMulticast&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcuNEydPirUwKaezCqbanVWSrA1_Qk-xzRtb0j0bxnL34hZBSkGNkKWvsxr2payw1NswD-egk47j4AAOmmNQBVDKSTJsTd-BKLX5ZBxHJqQpTEtHR1C8rgOn3lmHr1s1tGX813wg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;260&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 3:- Now, when we have &lt;strong&gt;configured Multicast&lt;/strong&gt; we can get multiple output from &lt;strong&gt;Multicast&lt;/strong&gt; control. Suppose , One state is taking 10% WAT tax, another state taking 20% WAT tax and last one is taking no tax (wow that’s great). So we can &lt;strong&gt;drag drop derived column&lt;/strong&gt; and configure then according to 10% ,20% WAT tax for reference you can take a look of &lt;a href=&quot;https://indiandotnet.wordpress.com/2015/10/18/step-by-step-ssisderived-column-transformation-tip-120/&quot; target=&quot;_blank&quot;&gt;tip #120&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I configured the the 3 different output in same way and adding the respective flat files. As shown in below figure you will see we added 3 files &lt;/p&gt; &lt;p&gt;1) with 10% ,with 20 % and without and tax &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWrnrXjWzYL89dTEq7GV_kQBvSNMazhBSef5bvzHm2Q20A_TmNIaLYLMpAL408QLXKhh03-Yme8Up5DgWQPuyqAeep45qBIq4nQlbDWMXKTCRvObhHTGew09x33iSwwzZB8J6iWQ/s1600-h/FileDestination%25255B9%25255D.jpg&quot;&gt;&lt;img title=&quot;FileDestination&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;FileDestination&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGxGOqWOZhnvfxwH5p0Ha1OgD_YByvFNrkdN5l38ChenYmWGDxFmbp0vONR0PIyR-VMn3_hRZyylw0_uR0RBLW2AIkA-1xBGrLY1GpWRKMcD6bsXdqEP_e50p6uJDkSbhN_gV9og//?imgmax=800&quot; width=&quot;644&quot; height=&quot;324&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;After configuration you will get structure something like as shown in below image. As a result we will get 3 flat files with 10% ,20% and without any change.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXJ8vmffdfcbsqA4VRW-cc2ll3vqVP1ZR55pJDWMgNaWUkwSmuxDdZlfWcIEBY1sDJ5pEK2pjekDVBlE0ohj5PkvE2DTfIX8kEBYSf_gx7RMv5YsIkDJIGGKUZLiXJddxStTys3w/s1600-h/finalDesign%25255B5%25255D.jpg&quot;&gt;&lt;img title=&quot;finalDesign&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;finalDesign&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnTz4Dr2dXdvQGPZ8aJt0AUOCar-ERU7LQ3DXqZvWRcNu69zWisFFwLi89hqFYgdxHOnxwrzyXjoAVGbfVGUnXoL0E-aDZtxAdyVusHpF-40z5SfvqpNg6pz0NAQSmgSTBB3Z48Q//?imgmax=800&quot; width=&quot;644&quot; height=&quot;354&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 4:- If you face any difficulty in &lt;strong&gt;Derived column configuration&lt;/strong&gt; and moving the data to file please follow earlier post. Now once everything is configured run the package by pressing F5 or hitting run button you will get following screen. So , if you see &lt;strong&gt;Multicast providing&lt;/strong&gt; similar row count to different output which is 295 rows.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJhFwki5DlyCNukUVDiXmAiWOkmmK0qToxJC9f84Njfaez3666SPZ1IsXLYvDUDiDj_gtJWnXzJeIU5ukDhrIGrvYyeZXkMfN68grRlX3xrpoOpHJWZ8WqXy_o0aY4pbGgPwPAoQ/s1600-h/Final_Result%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Final_Result&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Final_Result&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgshsib_j13RnWWsrtBamdImegONGCDp8haGNcOWfkUbcmOq97za9zrHtjhsVNx3OM9tdxkMoSTgZecDmUIa6XLlXebWPYpR7P6P0YeC-Wqxz7bs552B7TBdIrupY14diiYzXWfwg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;343&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;We , can use this &lt;strong&gt;Multicast&lt;/strong&gt; where we &lt;strong&gt;need multiple copy of same source data&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;I hope this article might help you somewhere.&lt;/p&gt; &lt;p&gt;Enjoy !!!&lt;/p&gt; &lt;p&gt;RJ !!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/8967999932148177183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/8967999932148177183'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/10/step-by-step-ssis-multicast.html' title='Step by Step SSIS Multicast Transformation TIP #121'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF_AuN5q6pJTO0AszRgOu6MhLKphQGZi-w2waJAXcSAGQZfut-79ZmRGeHOJ0rKFVt0bs26YEnBHd3qJldYCFFFllI8vZCBKvpzUoXe4Kr64-9MFUN7jzSh_3Q9KsdWzu4OMyvbQ/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-7557256688392955921</id><published>2015-10-18T05:41:00.000-07:00</published><updated>2015-10-18T06:10:31.605-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Derived Column Transformation"/><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="indiandotnet"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql server"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by Step ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by step SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips  Tricks"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><title type='text'>Step by Step SSIS–Derived Column Transformation TIP # 120</title><content type='html'>&lt;p&gt;Dear Friends,&lt;/p&gt; &lt;p&gt;In the series of Step by Step SSIS , Zero to Hero in SSIS this is another post in which we will try to understand what is Derived Column Transformation.&lt;/p&gt; &lt;p&gt;Let’s understand this by a real world example. Suppose, we are a shop keeper and our work is buy things from carpenter and sell them by adding our 20%&amp;nbsp; margin. &lt;/p&gt; &lt;p&gt;So , carpenters give us source data (file, sql server etc) with their rate according to product. What we do actually ,we add another column in our register by adding 20% which is our selling price. So ,our selling price column is a derived column here which we derived from source by adding some of our operations.&lt;/p&gt; &lt;p&gt;Isn’t it simple ?&lt;/p&gt; &lt;p&gt;Let’s understand this now step by step. I am using Adventureworks2012 database here as a source database and using product &amp;amp; ProductCategory table combination query. So , Assume this source data is data of carpenter’s products.&amp;nbsp; Here if you see below image we have productId, Product Name, color,Category &amp;amp; ListPrice (price at which we (Shop Keeper bought the the product)&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiETzUL1N2sft1H2NvE7mQ3FTJx8k7Mfw8-cfbWdeKJnLG9_bql_AUp-VPeyjf4fTgwFHTioMQ5R1VbxAhnVgyCGNSO0ceI6oFZFijhjNqyGvmzxzlBMR-nIcQAYeIO6LsHMoJD5A/s1600-h/Data1%25255B6%25255D.jpg&quot;&gt;&lt;img title=&quot;Data1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Data1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBiLEeXEPR8rppf_n2Pok7f43z0bfTz7A7oqzjrbvFA1Ea6gQ5HhHyYM8RxBxwgsu5_PW46YAHOnjlBKcJN7IveKRHo8B-Jhv5uQ4nalwdKOnkySevhxlr1JvDVZIujsTow6rCHw//?imgmax=800&quot; width=&quot;538&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 1:- It is useless to say here add a new Package in your project. Drag drop data flow task on canvas. Now double click the data flow task you will get a new screen where you need to drag drop source Assistance. &lt;/p&gt; &lt;p&gt;Now,need to configure source assistance where database will be adveturework2012.&amp;nbsp; If you see below we have same columns which we shared earlier in figure&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA-BSdTm7BMBMbK2sWuCWFiDgXiMLc8m-tnbl9OwlePsBYU-GxxT0ynq8i-cSXAxbubMr0P7FcbdvjN9JV4FK5NJBDMmKxRSSqU1_DrTjrodoVRdDZal9qkTBbu-ULSA83UzYCIQ/s1600-h/SourceColumn%25255B8%25255D.jpg&quot;&gt;&lt;img title=&quot;SourceColumn&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;SourceColumn&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdr-i2bTF6Gu6AYKht14LvQgCe_rYRqkUQp7J4hK9I7Lx_McxEX2LM4cHny67sO2D7AfccOxzxAvWm_OMrVrrwflxzMFM44Z3FSjmyNwefHKGM78sEhIcd8GahHVHS-OUWwRjzLQ//?imgmax=800&quot; width=&quot;593&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 2:- I am sure you will not face any problem in configuration of source control. Now in step 2 we have to drag drop Derived column.&amp;nbsp; Once you drag drop derived column you need to provide output of source assistance to Derived Column Transformation. Now to configure this use context menu by right clicking and choose Edit option you will get below screen. Here we have different functions and operators which we can be utilized with columns and variables and parameters to create derived column.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtAC_Bvn-3H5N9EkJ4w27IQDTn5Zkzfx2CmecSMv_EmndM1UZeQ2uTFJxbITueaOQxAMj8Gy95PN0y_8beCJ1kt0ivrPZFhK8IRlD6Ciw03mP-Bki6KfRa375ccjaudtqmjp5Gbg/s1600-h/DerivedColumnSettings%25255B12%25255D.jpg&quot;&gt;&lt;img title=&quot;DerivedColumnSettings&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;DerivedColumnSettings&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO12x1d0Zcv8PZfkjcXCYtuk1OTbpZHYb_fhyAhRPj9PEnjt6hlWWQ-1i2-dmAXDFeokcRK8K4FL-E64nIZhthvsW2rh_eIyYunFfi8fY1GrofAP3FWf60Jt5CFRytrwUHkSuMww//?imgmax=800&quot; width=&quot;584&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;If you see above highlighted row in image we can add a new column or can replace any existing column as shown in drop down.&lt;/p&gt; &lt;p&gt;Step 3:- If you see there is expression column also where we can add custom expression. Here we are multiplying 0.20 in list price and adding it again in Listprice and aliasing this new column SellingRate as shown in below figure&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_TpZXKfoPf5NuEToHYBkizlDdJhHoIUPLKxCYh73tAS17wpm2EcpgeZa5AUIderN9Xo5Kn5LJ900l5l1TXBVkC_WL_WjMPkrT8T1EhFKe3M2_G9Ft9-uUI3-QgtQRqtD3lCdOgA/s1600-h/Expression%25255B9%25255D.jpg&quot;&gt;&lt;img title=&quot;Expression&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Expression&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF9W2M6gR-EuwcY7_xsKHEO84p7e17vUjLUHfdYZm3l2NIsySU-q9ebLOHW6uDsQuerPauT0Iv0wt3KdFmcvzs5n6Gp4tMqZ6V3BB8MPePgvmdylMzoF-9O1Lf-kzzuvPcZQXlZw//?imgmax=800&quot; width=&quot;644&quot; height=&quot;113&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;if you see below screenshot we can add other functions ,operators also.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOetz6FAWARko0_hYCmWIVznd_E5qWK6IhzrXxe2u6Xy9Xd4tPweHaW2dhpu1URirgyZky9LTWaJhGABu5awi7btatsl3uOgR1rp9a9I2X4TSOImjeo9RLUsmWUjHKBeW70sOttw/s1600-h/VariousOpeartors%25255B7%25255D.jpg&quot;&gt;&lt;img title=&quot;VariousOpeartors&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;VariousOpeartors&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoHKjVzEU7XvJ1UbI-6qFhu00e6sTQPjyIWPltDWrvb159o1IJnLkP7HMGO1xS_Y3omRozubdPbBqoHZdZDXrzgxJbe9Y-E8fGVYy0pQlFnwDmkQLndUP1_kLJUjsSZ8NE5HIfSg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;271&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 4:- I hope above steps are pretty much clear. Now add a destination file in which we will get derived column “SellingRate” . We have to configured the derived column. As shown in below figure we configured derived column.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4ioJ9DfB0lzEDc9LjBIGsCVspvUMWQQjk7PbPrFTZuUEMU4qGmY3mXV4Ou6qpB6WVl0ZpzCwBjSuXAm2fDLzDhV19TEGalt1l3uwpCFP06QHQ2NDG08JCH1Cz_wSINURpL0snTg/s1600-h/SellingRatemapping%25255B7%25255D.jpg&quot;&gt;&lt;img title=&quot;SellingRatemapping&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;SellingRatemapping&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEUK9Ft-6PHxgsg2DkkaSBICMGVjMmPUbml4VdHu5RNEauo9vUUSXCwCsPpAHlR_H-uWfsMncdl92C2sJHp1xGY_ki5LwuLGrdUVvMsJsa4gn1kWaDaM0jeTdYNI-uGvoJD7HPsA//?imgmax=800&quot; width=&quot;601&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 5:- Now, Once the destination file is configured run the package by pressing F5 or clicking run option. If everything working fine then we will get all the green checkbox sign as shown below figure&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOrnQfVa7RHXTVoeRlFeBkSzt5E5etMN1_EJc1rYojFqkGO34LMDds49vBE1xfQqJdGVEO7U8K5n8gHdbCEIplzSe9iT0BxOORFLetph9aSv6h628hF3a4sQPH9TjMIakOBMov-w/s1600-h/FinalResult%25255B7%25255D.jpg&quot;&gt;&lt;img title=&quot;FinalResult&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;FinalResult&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiZjbYLhbzyXld9qwHME8jmoVM89_6YI3XmsIPw-O0267VhBQIxKdlIK2IeJvoIG2f8_AaAahQZ3rstsQJ-nib8wGQOu6O95lqYmx3jy3UXyhsLkJuXadFhwjcOMRJgqhmDTgHTQ//?imgmax=800&quot; width=&quot;509&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I hope this post might help you to understand the derived column.&lt;/p&gt; &lt;p&gt;Enjoy !!!&lt;/p&gt; &lt;p&gt;RJ!!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/7557256688392955921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/7557256688392955921'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/10/step-by-step-ssisderived-column.html' title='Step by Step SSIS–Derived Column Transformation TIP # 120'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBiLEeXEPR8rppf_n2Pok7f43z0bfTz7A7oqzjrbvFA1Ea6gQ5HhHyYM8RxBxwgsu5_PW46YAHOnjlBKcJN7IveKRHo8B-Jhv5uQ4nalwdKOnkySevhxlr1JvDVZIujsTow6rCHw/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-5374618194931311089</id><published>2015-10-17T05:24:00.000-07:00</published><updated>2015-10-17T05:44:02.247-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Deploy SSIS Package"/><category scheme="http://www.blogger.com/atom/ns#" term="indiandotnet"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql Server Integreation Service"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Integreation Services"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by Step ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by step SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><category scheme="http://www.blogger.com/atom/ns#" term="UNION ALL"/><category scheme="http://www.blogger.com/atom/ns#" term="UNION ALL Transformation"/><title type='text'>Step by Step SSIS–Union ALL Tip # 119</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Dear All, &lt;/p&gt; &lt;p&gt;In the series of&amp;nbsp; zero to hero &lt;strong&gt;SSIS &lt;/strong&gt;series this is one of the simplest transformation control which known as &lt;strong&gt;UNION ALL.&lt;/strong&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;As you might aware &lt;strong&gt;UNION&lt;/strong&gt; in general term&amp;nbsp; which means collective. In &lt;strong&gt;SSIS UNION&lt;/strong&gt; all control is doing the same task. &lt;/p&gt; &lt;p&gt;It collect all the inputs may be of same type of sources or different type of sources and&amp;nbsp; union them all and provides single output for the same.&lt;/p&gt; &lt;p&gt;Lets understand this by below example.&lt;/p&gt; &lt;p&gt;Suppose, We have different text files which contain fruits &amp;amp;&amp;nbsp; vegetables name. Now our aim is to combine all the fruits and vegetables name which exists in these files.&lt;/p&gt; &lt;p&gt;if you see below image you will find 3 files which FruitA (Contains fruit names start with letter A) , FruitB (Contain fruit names start with&amp;nbsp; letter B), FruitP (contains fruit name start with letter P)&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLZDR4DH91WluoFyk5nKDPvMbmqRE1ruicgOoVIlbAX7mJLkU3811n0zwflhzyalzwbwMB3_qWwSP39hSf7Nk3dT8C-rUhAFYlY35vVpj1WU_VkYoVp_Px5GhwqDkTx-SrUSMO2Q/s1600-h/Files%25255B9%25255D.jpg&quot;&gt;&lt;img title=&quot;Files&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Files&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyV84HFLJVLuIaBeLW9biefeCCUDneWVaioOuTJAIHkvig0AS6vo-Z9M-E2-nbw8u8GEWtuQl_iz-J6jXU3BQjd6QeWfsxUf6zKkTIpWHHd-ZGlTxvq5rGZlIgrk1Mh2QHmfPtIw//?imgmax=800&quot; width=&quot;644&quot; height=&quot;394&quot;&gt;&lt;/a&gt; Now we need to combine this file using &lt;strong&gt;UNION ALL transformation&lt;/strong&gt;. So follow below step by step&lt;/p&gt; &lt;p&gt;1) Step 1:- Step 1 is simplest step and now you all well versed in this. We need to add a new &lt;strong&gt;SSIS package&lt;/strong&gt; file and drag drop&amp;nbsp; &lt;strong&gt;data flow task&lt;/strong&gt; .&lt;/p&gt; &lt;p&gt;2) Step 2:- Now add different &lt;strong&gt;flat file source&lt;/strong&gt; for all the 3 files and configure all the 3 files&amp;nbsp; fruitA.txt, fruitB.txt , fruitP.txt .&lt;/p&gt; &lt;p&gt;3) Once we configured all the 3 flat file sources, We have to drag drop &lt;strong&gt;UNION ALL transformation&lt;/strong&gt; control.Once we drag drop &lt;strong&gt;UNION ALL&lt;/strong&gt; we can provide the output of all the 3 files as a input in &lt;strong&gt;UNION ALL&lt;/strong&gt; control as shown in below&amp;nbsp; figure.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh16KyJhjpNwDL7_BOADPAGhVxAr55t3Gw2lTusSwvpKdhZ_-RHxh3aKHe87y4k1KILr1m7-oK3Dkn7ak5BTPuPxN1npK2bJW5XmRSIXdDnzY9mLedqF8zub5Q1zoozcHtlpRjAXw/s1600-h/source%25255B6%25255D.jpg&quot;&gt;&lt;img title=&quot;source&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;source&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqnYSJWBS-IQk5NkfGVCTI-BkWp_zETWz6QnepVHK7qd664aahMLXRSWGtVismI6n3F-gNcNCB-JEZGm9cSgrNu1jJ-WYXDmu9piic6H7-XQ3ibVjBkJGaRIrRMdeGOsW0Vjy7fQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;323&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 4:- Now, we have to configure the &lt;strong&gt;UNION ALL&lt;/strong&gt; control. To do this right click on&lt;strong&gt; UNION ALL&lt;/strong&gt; control and click on EDIT option. Here we have to configure all the columns which we need to union.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtr7j2WKD2QxITaeHxUvSacBS_ItJv-Onr2getr2BctX5OO8_E7QTGygV7uJ3B0C0jQ8y3uduIauTrM0bbo5JRuMEavbgF0kL60PrmxN7owa_bMgKqe_p1Z1aq6u8EHQcniwzz7Q/s1600-h/ConfigureUnionAll%25255B8%25255D.jpg&quot;&gt;&lt;img title=&quot;ConfigureUnionAll&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;ConfigureUnionAll&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUkkefDJfVdBGp6uJYx3f04lqUvEvV8_zs45YtoueoGiOs84qOoie8y92G2lvKEoYquIIOCznwWD9bUqbuu6g3mVq7CoNieFFmq2vd1EM1sM26hzC2RhNKYk8HEqJ7RiZWWMYb6Q//?imgmax=800&quot; width=&quot;568&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 5:- Once the &lt;strong&gt;UNION ALL&lt;/strong&gt; is configured our next step is to get the output of &lt;strong&gt;UNION ALL&lt;/strong&gt; in a resultant file. for this we have to drag drop destination flat file control as shown in below figure.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifkGyWnvC-7g_OB08fAlNPYCDAJIpHRw183T4cXAN1ScBoMUVOuETSyigzPABixdgDMDZFFDT_sGClBfjgiFzcFp6qO-0H6VnJlDMI_C264M8NXtbnfX6I3Hiyv0Fg1ORLRZ_XWw/s1600-h/file%25255B12%25255D.jpg&quot;&gt;&lt;img title=&quot;file&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;file&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-4Ps9UsPjQGqAd3nH-iojKDckuZ9lG2wyUCA_NVGlNRFzvIHuPSo0FlHwQv4QxmOOKTlzv5yO9dqFbpk2MO42N5U3V_qiDDod1NWpN3UXlh1uXBT4IeNQD1yjDO7Ol4HuiK2-Bg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;253&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 6:- Now we have to configure the flat file destination and save it to specific location. A part from this we have to provide input to&lt;strong&gt; flat file destination&lt;/strong&gt; which will be output of &lt;strong&gt;UNION ALL&lt;/strong&gt; control. As shown in below figure I am saving the file on same location and giving name finaloutput.txt&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd1ZEl3w1_B0LbtyfBflpy029n-M8asvjQHMcsFr3Q0wsuOj2db_0y3qnBfIUEr1lVOK4aHaYIraicmszuLgHODPwBmC6-hYhmfW0OXtODT0F7gbPj6ojNpXryJ1kxS_CjDaMQBg/s1600-h/finaloutput%25255B7%25255D.jpg&quot;&gt;&lt;img title=&quot;finaloutput&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;finaloutput&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOPfGNuZvGkmfW1oqS5Xs25cc7NMywKA9NBQLHUjjw_MRqivBmFD3NvTJKkwbqOM0xpat_jdNwiMpUcqJ4pDQDgCnoXziwpGyravr-KOWRA88UcoScDlq4SHbNBqCEFuSFo0MYPA//?imgmax=800&quot; width=&quot;637&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 7:- Once all the above step is processed by us the final step is to run the package for this just click on RUN icon or hit F5. If everything is working fine the we will get following&amp;nbsp; result with all the green right check images.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLV0EaJuScrKUO0XkP3hThypDHsFso6ILXHDlNNdyXQPX7mqnEf_wwPTrh27RBlrQg-7AXxNfruc86H8PZVGwFtc3Bnmtzh2uYEM2Nnp919nz4O1AYmsAsgFKfMe9C3ESrZG90fw/s1600-h/finaloutputREsult%25255B6%25255D.jpg&quot;&gt;&lt;img title=&quot;finaloutputREsult&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;finaloutputREsult&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI_1hBd4nDBuj3S4YHiA8PbyGoNUbdGRhF-2G2LEF1VlweDFNsirrN4OtCezbGdsIo3WUDp2uEI7hDGzbrsBQjugFGCDhikmafHIAnRNCfYl-HXHb4-HP7d-zyFxZTcfr7Tp1U5A//?imgmax=800&quot; width=&quot;644&quot; height=&quot;429&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;If you see above image we did union of all the 3 files and saved output in a single file. &lt;/p&gt; &lt;p&gt;Now, for learning purpose and to make the post simplest I use only same type source you can use different type of source and destination as per your need.&lt;/p&gt; &lt;p&gt;A part from this &lt;strong&gt;UNION ALL&lt;/strong&gt; &lt;strong&gt;doesn’t remove duplicate so if there are duplicates in the files it will&lt;/strong&gt; not remove.&lt;/p&gt; &lt;p&gt;I hope this article will help you somewhere.&amp;nbsp; Please provide your inputs.&lt;/p&gt; &lt;p&gt;Enjoy !!!&lt;/p&gt; &lt;p&gt;RJ!!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/5374618194931311089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/5374618194931311089'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/10/step-by-step-ssisunion-all-tip-119.html' title='Step by Step SSIS–Union ALL Tip # 119'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyV84HFLJVLuIaBeLW9biefeCCUDneWVaioOuTJAIHkvig0AS6vo-Z9M-E2-nbw8u8GEWtuQl_iz-J6jXU3BQjd6QeWfsxUf6zKkTIpWHHd-ZGlTxvq5rGZlIgrk1Mh2QHmfPtIw/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-8208753062616636263</id><published>2015-10-02T02:27:00.000-07:00</published><updated>2015-10-02T08:45:58.847-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Aggregate"/><category scheme="http://www.blogger.com/atom/ns#" term="Aggregate Transformation"/><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="GROUP BY"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Condition Split"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Conversion tool"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Package deployment"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Sort"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by Step ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by step SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><title type='text'>Step by Step SSIS–Aggregate Transformation TIP #118</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Dear Friends,&lt;/p&gt; &lt;p&gt;In the series of &lt;a href=&quot;http://sqlraaga.blogspot.in/2015/08/zero-to-hero-in-ssis-sql-server.html&quot; target=&quot;_blank&quot;&gt;step by step SSIS&lt;/a&gt; tutorial this is another post. In this post we will see &lt;strong&gt;Aggregate&lt;/strong&gt; &lt;strong&gt;Transformation&lt;/strong&gt;. I am pretty much sure you are aware of aggregation. Although , Just wanted to share that &lt;strong&gt;aggregation&lt;/strong&gt; operation in generally &lt;strong&gt;memory expensive&lt;/strong&gt; operation. &lt;/p&gt; &lt;p&gt;So, whenever you want &lt;strong&gt;aggregation&lt;/strong&gt; &amp;amp; want to use &lt;strong&gt;group by function&lt;/strong&gt; then in such situation you can use &lt;strong&gt;Aggregation transformation&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;There are different group by option available like&lt;strong&gt; MIN, MAX , COUNT, SUM, AVERAGE etc.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Let’s understand how to use &lt;strong&gt;Aggregate transformation&lt;/strong&gt; step by step.&lt;/p&gt; &lt;p&gt;For current example we are using &lt;strong&gt;Adventureworks&lt;/strong&gt; database and we are using below query. Here we are fetching the product data with&lt;strong&gt; line total&lt;/strong&gt;,&lt;strong&gt;unit&lt;/strong&gt; &lt;strong&gt;price&lt;/strong&gt;&amp;nbsp; &amp;amp; other details.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc9SXqT5QApR2hYpqU8y9rgVuNCl_k1cFn_-GxbNVbaCdZwSSRzZM30v99AuDJYOzI0hHY78Xb9k1BhcZcONINw-vx9CM1wOtXXPUg8IL6mk6SOGmgNYYdM8QRrjFMNrO8Fuz5GQ/s1600-h/Data%25255B13%25255D.jpg&quot;&gt;&lt;img title=&quot;Data&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Data&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTnMS0K_WnMaO_qTLcQT-wsajI9hzvIXA2CoCXSG0sZdlIilSxU_QfbcJ7Zf48stjA30mLn_lHh6-3f2cC3ZV6kJwtS_Q9xXV4aldsf_E_TYFKRBgOMdbleW8shp7twlqM83ODkA//?imgmax=800&quot; width=&quot;500&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;if you see the records in the table you will find that there are multiple records for&lt;strong&gt; same product with different line total&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;Our objective is to &lt;strong&gt;aggregate or do sum of Line total according&lt;/strong&gt; to Line Number and export the result in a csv.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 1:-&lt;/strong&gt; So , Now start with package creation add a new package in solution and &lt;strong&gt;drag drop source Assistant&lt;/strong&gt; and &lt;strong&gt;configure&lt;/strong&gt; the database connection as we did earlier in the tutorials&lt;/p&gt; &lt;p&gt;Step 1.1 – &lt;strong&gt;Drag drop&amp;nbsp; Data flow task&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix6jPIg7p6Lkw_eCBfgCCp8SVaRx4cDufRloUWR1ahjFbuQt3QheFVLF6vD0vTwk5fRqBxgyslxujLQZC-4a0_VHFzhET-3EaFFXq2E1O_rBHahcEDFB9mPnRAuVbwVwPqz6gQOw/s1600-h/Step%2525201%25255B6%25255D.jpg&quot;&gt;&lt;img title=&quot;Step 1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step 1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAJHg66aqrI00a9Ohb63nnVTLZtEXZGedudgrpPMYJY2_XkZtI20imNhfYPlcbYz41wJiiB0Wz549Rl2R9I41NfNPRp2C-W8Czr8E0P0Wz-8GsjVJafVBnd7Rru_1Yo-ZXTdvgyA//?imgmax=800&quot; width=&quot;644&quot; height=&quot;294&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 1.2 – double click &lt;strong&gt;data flow task&lt;/strong&gt;&amp;nbsp; and drag drop &lt;strong&gt;source assistance control&lt;/strong&gt; &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9_fwn2flMITXp6Oze4xmClnmZTuvu3kSJsD5DFeIA7N5heErDAXbmNLniWH5I6lABZQXnmxg-n7HG8jO4HB9jN_VvtKj2DIMW8x6mgLQoDADYYpGIXmskPzhv4vpJWpLayFxf-A/s1600-h/Step%2525201.1%25255B5%25255D.jpg&quot;&gt;&lt;img title=&quot;Step 1.1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step 1.1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgykZqsuMvdtG3bNh1MwZR9fYaVDsXpWVPUIFXdsBg7SoxWnchb3ZAs4g0nuijliCEbe7rDeJQPs5BEBpyFrh-xmvipm0PP3-33F0vcS-K4kWdC864buXw3zlXkx5i8YWJdkuTS3A//?imgmax=800&quot; width=&quot;644&quot; height=&quot;324&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 1.3 – &lt;strong&gt;Configure source assistance&lt;/strong&gt; &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhIEDC3NqRy73WfpYrkEo6VG4x6pcld3bZFQGUSTqxgct0UaA0rU8W71zNNprIQmt5RncAGCrULCbqXB_LOqnzff9XdIuDYzScs7w4fqBX8YJ_alTtC-W9rhhbOoQAyfCpcpX6Sw/s1600-h/Step%2525201.2%25255B5%25255D.jpg&quot;&gt;&lt;img title=&quot;Step 1.2&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step 1.2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIY-WiCNR-a-9wSONYiCeSI7K2I5qrPKp9TYAxI9FCeZ7Qf-BDm1zkN9_cy_8MoLXZkPfiGoC0cqhM6kOKoCEuLoCe0jOLJ8wzSYLWOAOaFAE4S3B2OA8cDWUmint_CUDXlWrZwg//?imgmax=800&quot; width=&quot;609&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 2: Once the source assistance is configured with SQL SERVER connection string and specific query we will drag drop &lt;strong&gt;Aggregate Transformation&lt;/strong&gt; control as shown in below figure&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOk8bkrpwSiBGUPvVB-LgD4HTNS8lG8GMME4vqapniKIj799ScWxVjBObxKFm679M7RdB0_Vv_Fqwwe8Eq699MebN6ubQXJsJ6m72DkGYexlR9L3BvFHZ4DqaSV1cn3O-C5DRk1A/s1600-h/Step2%25255B5%25255D.jpg&quot;&gt;&lt;img title=&quot;Step2&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg39zbZK1ywhUIFssjUp27bJsz_XNvv7bR5SdfAvHxCdS6JmJ9zF0Y1aXGuj88unLu4vhtcP4OXVMBkyJmF6ZngV05wpyWQiLOcqBIcTWqCsBjVf7-GQ1_HWLfH-HVcfD1bOUSF8w//?imgmax=800&quot; width=&quot;644&quot; height=&quot;285&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 3:- Now configure this &lt;strong&gt;aggregate control&lt;/strong&gt;. So Just right click &lt;strong&gt;aggregate control&lt;/strong&gt; and select Edit option. Now as we require Sum of LineTotal so we have selected SUM in operation column’s drop down and rest other has drop down option group by.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ5A2hc1zJLYHzKx7EqPqS71I1Z2aYSzp9D_7pCd7uVObJytqq-5tLYk1YaAoFy6Lj4stnzI6c8huEQgrq1xcgmwI1yCOH1E3PiIktI-LRwTYlFvnia1qQkC2zIeGusNCf8EA46g/s1600-h/Step3%25255B9%25255D.jpg&quot;&gt;&lt;img title=&quot;Step3&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step3&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKrzR-VJg56aqCUTzFo6fuYXws7Q2fLFXcoDZ5xczTJ-ZHDKCSdqRzcWWTI8I6Lgsankl0zRqq9MNMHqAJgXjxJY53UQKdeHvC0PjTTs_x_qGgQwKcPKUsGeYTP948m-p9boozpQ//?imgmax=800&quot; width=&quot;576&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 4:- &lt;/p&gt; &lt;p&gt;Now, drag drop flat file destination and configure it.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXJm7FnWccOD3rbX3yet8Vx7SmAEXB4c6TWnsNYY3bC6J1EzKjPEHUXFoQr5qcmR0-O1XhKNiOHqMvAA-QUU6Lo2ZWF8pVu9ZQ_Dy_Ae-KM-yB6FpXQ8hqH4kmYT0GepJPTJzJ7w/s1600-h/Step4%25255B9%25255D.jpg&quot;&gt;&lt;img title=&quot;Step4&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step4&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZAzEvmFS9iPzj_CIzZc90YEyfBoQxcZ9eU7JLF_j8T9MVUOXCeP-o73DGj-67kcf1yFM5hYOdZmcEMFB0yo8z_WMi44oX5CnCfWWpXqBvhlZupebKd6qon2BmOaGF9ehrI-HBAQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;403&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now &lt;strong&gt;configure&lt;/strong&gt; &lt;strong&gt;flat file&amp;nbsp; with&lt;/strong&gt; mapping as shown in below figures &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf_MFdFCiqLuAa6MA6mMmQRWfVu2SUhWjZYajwZdaUuzkMYcZdgWowm7PSSrybCjUI3Ij9ga-YST8xW-rjE5IupJBlkP8JwIsKA603F1ovL3r9DOVcLLp798weFq60z9fiUF4RvA/s1600-h/Step%2525204.1%25255B5%25255D.jpg&quot;&gt;&lt;img title=&quot;Step 4.1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step 4.1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3hVOXjuvANa00E1yibC0vhRraP5P2_qn3AOn_K4PBIotPYua0oGjnOOZYZCxFJi8IjU72RKEHJET9GQXRyL70BUZm6yNQs8izfzAnxOth-2KZOQ9vRv100EihP0KqGT2s-pAE-g//?imgmax=800&quot; width=&quot;558&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtOZgpgnIpl8StSrt-jJJUD0WLZ_v6TQDrto6vXV57I_0tnejlRRYl6sVEWsdK1N-Jw1fj9AteIHHw_ndDOnxj0Pzk76VlRwmM3kikUOuQ676Jx3dGBw7UDp7Ey4-X-9F9EWUJpA/s1600-h/Step%2525204.2%25255B5%25255D.jpg&quot;&gt;&lt;img title=&quot;Step 4.2&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step 4.2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTBCMtTPGI_HJII94Gk4gvhDu0oJnHKfjoYiKq7SqQrb-VF6jnNW-Gd1w0iLoFNh87yv-9cK69V_mFV8F3e8nJNaeT6UovHUrb75LLuDzW_-aSl4hdA4m7Dv0GvCsIqZiuJbPa_g//?imgmax=800&quot; width=&quot;600&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 5: Now run it you will get desire result as shown in below figure &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBMkk-U49dgk7x-wF8JduVhCuVn5dxNzQZMVK9OmOkcQVljP24BXGOb2gmNmb9QQaPMZoEMqf0ZJvzzx1_41PY69PBpl4zv6aiqcETrMK4tJ7s5Nvj35fSH3qXOGr-pqDyFTNvzQ/s1600-h/Result%25255B5%25255D.jpg&quot;&gt;&lt;img title=&quot;Result&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Result&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgejJmHn0Ystq49NQccv4KgFTvV-PyFe4E53yfNatGsYj0UOzFqilzTsSJtzX3fzD6bjgsfoPTkzwYwPgC2y_NB98BzQap5BzPcvxDRxB8MaAmWd8SSELXWpemCQ1_Svj69A40y0A//?imgmax=800&quot; width=&quot;644&quot; height=&quot;467&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;If you see in the result &lt;strong&gt;we got 757 rows after processing 121,317&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Now see the result in actual as shown in below file &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9poeZe23n8rKtzzy7vX7ahu1Iun0FVT6wItrdq1rsSMFzAOpLrUghSGm-95idnEU1jSzAhszKYcHjvlYTJ7ii8xOUiIJPp6cUWCfvGL_lX45TdzE9NM6PPhHZzjnnrutQLOHs1w/s1600-h/File%25255B5%25255D.jpg&quot;&gt;&lt;img title=&quot;File&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;File&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLTz7A5hFXk9Ps3X3vTsTONk2hOmcvp9oxvhOE02TEYfphMQXw3_j-T87K3Lvv-lhg_UlHCcoZOBneupwB2bUjOxiG7AO58h21eB0rW5IBIbV6QB4XOPiBQ4LMOVqY0MZOqZUgDg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;369&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I hope this example might help you to understand &lt;strong&gt;Aggregate transformation&lt;/strong&gt;. Please provide your inputs.&lt;/p&gt; &lt;p&gt;Enjoy !!&lt;/p&gt; &lt;p&gt;RJ!!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/8208753062616636263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/8208753062616636263'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/10/step-by-step-ssisaggregate.html' title='Step by Step SSIS–Aggregate Transformation TIP #118'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTnMS0K_WnMaO_qTLcQT-wsajI9hzvIXA2CoCXSG0sZdlIilSxU_QfbcJ7Zf48stjA30mLn_lHh6-3f2cC3ZV6kJwtS_Q9xXV4aldsf_E_TYFKRBgOMdbleW8shp7twlqM83ODkA/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-8356866103739698428</id><published>2015-09-21T01:53:00.000-07:00</published><updated>2015-09-21T04:49:48.602-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Conditional split Transformation"/><category scheme="http://www.blogger.com/atom/ns#" term="Deploy SSIS Package"/><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Condition Split"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Sort"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by Step ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by step SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips  Tricks"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><title type='text'>Step by Step SSIS - Conditional Split Transformation TIP #117</title><content type='html'>&lt;p&gt;In the series of &lt;a href=&quot;http://sqlraaga.blogspot.in/2015/08/zero-to-hero-in-ssis-sql-server.html&quot; target=&quot;_blank&quot;&gt;Zero to Hero in SSIS&lt;/a&gt; this is our next post. In this post we will see &lt;strong&gt;Conditional Split transformation&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;I am pretty much sure that by the name you got some impression what it would be.&lt;/p&gt; &lt;p&gt;So, a &lt;strong&gt;Conditional Split Transformation&lt;/strong&gt; is a way by which you can conditionally split an input into multiple output.&lt;/p&gt; &lt;p&gt;Suppose, You are a food supplier and you cook both veg &amp;amp; non veg food. Now according to orders by client you need to move those order requests to particular kitchen to prepare those orders.&lt;/p&gt; &lt;p&gt;Let’s understand it by following step by step execution example.&lt;/p&gt; &lt;p&gt;In this example , I am using AdventureWorks database as a source database connection. We are fetching products along with categories. We need Bikes products in different file and rest other product in different file. You can see products with categories shown below in this image &lt;strong&gt;Accessories&lt;/strong&gt; , &lt;strong&gt;bikes&lt;/strong&gt; are the categories.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR0M73SMJzvnH_rf8_eUqT3Yd5R4LExZjeNFWwBVn0m7QnXIo3slWICzRyHnXcoSsW1znn49adS8cbC8Ova285JQVVrwqggHtJjNEGl3Y6O-V-TLd5uJXwzjFdJV63W9De3Cqvrw/s1600-h/Query1%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Query1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Query1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi58etg7GndGcILJh2kSG8qDaB5UKdBfacrsCOIeN0b5BX1I_iyVyX1Q7krlDE9-X-EcVdJNCdTQbXcIs_yllgIbN66xrgWTF-4WGrzvGdsR1tJzJ4dJ6OQ6MU6C4puhSWt5xdqmw//?imgmax=800&quot; width=&quot;634&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 1:- Create a&amp;nbsp; new package and drag drop data flow task control and double click it. You will get a new screen which &lt;strong&gt;data flow task&lt;/strong&gt;. Now drag drop &lt;strong&gt;Source Assistance&lt;/strong&gt;. from SSIS controls tool bar.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxrbsQWtv6-y0gl2kQk8TQAAioH0LWoGsiYRRuJwemy0m8_Ou7_625PPMGxgMJFcURo3kGvYarAXzhzJmcx_kn2n7qiUa5Yxl2K4dcM4-giyoz-QYFOCOn4BFgrfn6IyWwR6DI7w/s1600-h/Step1%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Step1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNQgF-FZNU2z08sxzKMiJOHPEuEs_-9QgDhwKpXDikIRAnlolfF6ja8AoQ2aPyeX3uPCm8tNf7IDdrVgXwMlu7Jva-xeTq9WzZI0w5z5KqBqwxUoGHyDOyEJBXzHnTJAeScgFbGw//?imgmax=800&quot; width=&quot;644&quot; height=&quot;285&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now as usual we have to configure the database connection string and set the database to adventureworks.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYly0vYIb5V6CEeKp1H_LLEbDRyLG2bDvr6dRn0vvczUlOVl1KIlHIkkHVJyQ-T_9sLL4YXMwpSg4R6Xfv3L8wAWQ-vIvJycFvzyGifTqARedoA5I33BAs27qrJrM-It8ZEpx-3Q/s1600-h/step2%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;step2&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;step2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhQJin_qizbazZ1WMQEJH0g3mg2pEzNDX1ev8iffRNi-BIWaKIFgMwd6DVqad_mWQsth2aRDbC4qUGTsVtK8rfjO1P8XfDzlcPP8nw6hM_knRF3dFnL39vx7yQrCfAex-BbD3dgg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;310&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 2:- Once the database is configured right click on control and choose &lt;strong&gt;edit property&lt;/strong&gt;. You will get below screen where you need to specify the query which we shown earlier in figure.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizk1VHu4Jy_R4PlqgIw6iKxq7YQZN5tZoyxRaM0qDwlO8YTKnHH-Kh1wpwWrYLNA0N-hMqqCNb0m-m3VbmYxmzLYTYeL4xXgi695eCE9XmrvGYx6vKTCU01SMon5cc4PG8m1f_NQ/s1600-h/step3%25255B7%25255D.jpg&quot;&gt;&lt;img title=&quot;step3&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;step3&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT8bgo0hGOznOs3BBufZ2kONvf-R_qiHUIVvvYuv2EWu3d3n5x9ZN80UXJH2O7rjA6FTlWzLt_tmgVNFN902zCgPX4Ee4us7t1Nt9Yf8AqGHte6R8fZ-TX7aHTy1P0Jbr0zzqfKQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;481&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Once you done with above steps you need to configure columns as well so, click on Columns and configure it.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3NRtvyaH5QMxdXS-9djahLql-J7AGxF-e1riqTSez_1W71vC3FlCE884CgLjHN0IK6Hc7x0NXipbekblRHK6vNrD7FxfI9CSi1huq6IKrOR5JkyWpGI6VbdeK6i6aVktxT-7Rkw/s1600-h/step4%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;step4&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;step4&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXhEL9FXNfK4_WBo9gq6AhWOo9d_kl_utfpK8DvrqxhAJevQXdvtDlC16GhMAwu4IOd9NCM7KmgdNXijZCqK7HNa340ZDy-KkMPGUpWsEPa7VAfVtE4gF6o_NLjn9aNms56K0lOA//?imgmax=800&quot; width=&quot;639&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 3:- Now drag drop conditional split and connect input arrow to it as shown in figure&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinQQ0wJ0OM07dXwT6NqUgxzNqfPfImQUX2a5Z0lkSlRqW0LLYS4jGqaumpqZbm2mhpqJ0NV3TGt85ssGqEr4YcUMrn6lCVUtG51SGy2mzLYZfI7ekc6l_KbAw1rkQ8oBN8zt-5EA/s1600-h/step5%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;step5&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;step5&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSDpOvFPBCysJEqYVDsYnMY7vZ-8mvOnJzNe4Prhd2MyvLC7rKoUG3RCI4mno74EFc9IORDT7Zni-bW1hvq7BUncMgn0hR5IXoPRktZkAeuafjNK_1vGDpgVJpCKV89uWlwdhT0Q//?imgmax=800&quot; width=&quot;644&quot; height=&quot;338&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 4:- Now choose edit option by right clicking the &lt;strong&gt;conditional split and configure it&lt;/strong&gt;.&amp;nbsp; When you click you will get screen like below. You will find different condition operator. One important point to remember here you need to drag drop column name to condition textbox.&amp;nbsp; As our aim is to have product with Bikes category in a different file and other categories in different file.So we use following condition as shown in below figure.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL_4u7LgjPCsEMJFz96rXtZ4d0Xvcmtr1b6ctkxUDbtP3qvuBQiRP5IMJbZeYfwotxh4xVd1PoXLP9yZhw3cY30ugUKKLePRgMyFhv8swsOqqxYMoUTN0TqfWOWRY6BHFoBE5kSQ/s1600-h/step6%25255B7%25255D.jpg&quot;&gt;&lt;img title=&quot;step6&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;step6&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOZWL-0szlOWmwJK631rQjLorymKOD0CEIU-Vzr1Nuvu3YL6PUMvA08ip76npTD4cEs0xAoJ9L_VQ2c6ppCFBEXVSlcgmK3-Oi0b5JgMEMniKTKcDWDSk79QyFwHa914qdQv4K9w//?imgmax=800&quot; width=&quot;498&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 5:-Now drag drop a flat file destination and assign the output of the above conditional split to File destination. You will get following screen. As you see we are assigning Bike condition output to this file which means all the products which belongs to bikes categories should be available in this.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJnN7u9E30Qxeskvzf69ds1v8BH3Sd-CWXMk7lq44HIF0LxI0dMIGocIN-vSQtJtfABQ7vtoQi3_4zdM7nm3ClVyApl6v2J_eMEPTJQ3F_dKQqLMjQPyi63aEX6ak5uOmA76hEBg/s1600-h/Step7%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Step7&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step7&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmy4ZAT0zf6jP9RAYBaM1Is29cIGAC_r8dSI4XnLcZjz3tHwYFwGdHiprXqLz2qJfto3j6rPBg3BIz-DFG5icLdCboKlC5HsnePCCCnaLS6k09h3cH-3GpIVQrzRqJjiIGfwIaQQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;374&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 6: Now Configure the flat file destination by choosing the edit option.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd02_pJ4kGrcJOo_jj3yvmmTOnRBGsGWbDQFv_x3skx9z1nEbXHTT6EYP8Xa94W0Cd5b6fqp8m7DvHYvQlEDapYiDKfMYCcO0pK5m-3vzwlOYfuSFHK_2sMzHlaeF6XyRYkdYSyQ/s1600-h/step10%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;step10&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;step10&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBzSaVyv2TFgU2A_sIo4WYi_AToFl7m3fj6MfNP968WFEGMImIP_pPXMH0S7mo6OkkjUfCejBnKSsCT8gEssgUsEYY42FGefh8VDxs41q393F1H7NXSTI1_Q1uDfn_PMksHdZjJw//?imgmax=800&quot; width=&quot;570&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQv3ArWoU17PCWaTl2mQNLiZKGcw4RHyOoERTEG_lNptIU0fUzYBkxQj1A6JCH3mOggO0MvhHhJmcwu-5vijhcpem3Uvi_mKq8QFN16TZvvPjVBWRFsWReGzu-tFnue-sP8I81aw/s1600-h/Step9%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Step9&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step9&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiylTgvgkyQbJHbpF9oXCkfy3jOldjqbE0MU_yS7RXQeFI8wlAIewPTCl_08wZZHju1Pj69pJH6JIgdFnumDNgqeWr7G22PZZYZIjMlum0-VPBSdYVsD5aj39uU6pauE-e43ACgFw//?imgmax=800&quot; width=&quot;596&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 7:- In similar way we have to capture the output which not belongs to Bikes category as shown in below figure&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJiHRCD6pjZU4RVRzxJF3aIMDvROl4zgDD7_NT3aUegL_2LsLTfYLmS20w_XDJtvQpjcKYqRr1FJ23fC_UX6LAzwR9ggtAFH8kWM4BBIukGJ7PUccp7pA43f1lfwQs0DnZMNFKqg/s1600-h/step8%25255B4%25255D.jpg&quot;&gt;&lt;img title=&quot;step8&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;step8&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhekr_AKf55EO0vl5fdc8iw4EfuZeafne2HgUZo71kc54bzr06Ja-wzUauyh5KmlO1kPbh77Smjvzcnqcs7Oz1DTG_Rv7Q52HxqGuY9ydXwFmSn5IDyMsFL-ZF4G7aU67g6p0OEig//?imgmax=800&quot; width=&quot;560&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 8: In nutshell we will get following screen&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEiubEFwx1f1e15dDIH5zMycVV315MuhQp08t-Hz63kPaJhiXF-K8OeK_ZNZHV3GU6wMneo-tTgGqlVmBtBUqZwBjevgwjAHEO-hcseccY7XIsxpPtWSYTUpuCBjA9Dh9CBSB4Lg/s1600-h/step11%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;step11&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;step11&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicvumBFRT53DhKvZqvleS7dx2OgMyjTz9QtKD_iRN4GGsRhjlzngAChPP3NnA8O-cOT_B1NIazEFvPSEEy-pCGBp71e0Yfq95i1cfYDESFuJpKeozYGO4cBowcypdSYfbvWmfmJw//?imgmax=800&quot; width=&quot;644&quot; height=&quot;477&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;We almost done here. Now to check whether this conditional split is working or not. To check this hit F5 or run the package. So, if you see below everything working fine. We got 32 rows in bike category and 73 rows in other categories.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheZILIjEp9iooMzLTAcLhyphenhyphen4JrDwhiosKnHsbcEMp8oGpJNpo5uZSYKDgtHENhko4NmPFfmgRh833t3JX6a2MUfS8EwyrYuKANgWyvXCX7CISJiZ2mEfIOdn6-nC_umdUhhOD8u3Q/s1600-h/Step12%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Step12&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step12&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDxnIi7U1MheSMZm5On0mqgTdEyl0Bxg1ViJJ6zvEX9nYgiZAjTE0PlRT5IR7yZa8v42gQesZb4gjbDPibN0xvJMcMgVCdlu-mreVS6wqQ6Di4H6v5o18V6k0m_ed5L8RtmRObtQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;441&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;To cross check result we will see the file output as well&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw6Xl3CGloTTwkjsfSBg-FPaBkmJ-9nwMurQppuz3rTnNmCzp2tzJsNZkBjUNu81cpDyU3je-Q3y2_rNohF6gyfd1UskF-syFhiJlBtIsLtSNEsDIgnEQNtKPyp-jiUzPJGdamTg/s1600-h/BikeCategories%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;BikeCategories&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;BikeCategories&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiABOSndgTcHdmXrASgujpLJnGFMX_BW6ju1p26J3ibr20D1zAW3rMcTIRJoqXWNRiuc-VymI3kNi75YubywVNJN7wiTkzKs_LNq_AL5T_pJG1dr0N70FVdjFsTCMRzcx3HeVt4Zw//?imgmax=800&quot; width=&quot;644&quot; height=&quot;294&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So , If you&amp;nbsp; go through all the above steps we have achieved &lt;strong&gt;Conditional split example&lt;/strong&gt;. &lt;/p&gt; &lt;p&gt;I hope this post might help you to understand &lt;strong&gt;conditional split.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;In next step we will go for next step in SSIS. &lt;/p&gt; &lt;p&gt;Enjoy !!!&lt;/p&gt; &lt;p&gt;RJ!!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/8356866103739698428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/8356866103739698428'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/09/step-by-step-ssis-conditional-split.html' title='Step by Step SSIS - Conditional Split Transformation TIP #117'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi58etg7GndGcILJh2kSG8qDaB5UKdBfacrsCOIeN0b5BX1I_iyVyX1Q7krlDE9-X-EcVdJNCdTQbXcIs_yllgIbN66xrgWTF-4WGrzvGdsR1tJzJ4dJ6OQ6MU6C4puhSWt5xdqmw/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-7472622924422770254</id><published>2015-09-13T10:12:00.000-07:00</published><updated>2015-09-13T20:52:32.861-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Export Excel"/><category scheme="http://www.blogger.com/atom/ns#" term="export file"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Conversion tool"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Package deployment"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Sort"/><title type='text'>Step by Step SSIS learning What Data Conversion use in SSIS ? TIP#116</title><content type='html'>&lt;p&gt;Dear Friends,&lt;/p&gt; &lt;p&gt;In the series of &lt;a href=&quot;http://sqlraaga.blogspot.in/2015/08/zero-to-hero-in-ssis-sql-server.html&quot; target=&quot;_blank&quot;&gt;step by step learning of SSIS&lt;/a&gt; this is part #6 in which we are going to learn a new control&lt;strong&gt; Data Conversion.&lt;/strong&gt;&amp;nbsp; I am sure by the name it clear that this control will be use when we require data type conversion of input columns then we need this control. This is exactly same like&lt;strong&gt; CONVERT&amp;nbsp; or CAST&lt;/strong&gt;&amp;nbsp; in our programming.&lt;/p&gt; &lt;p&gt;Although, Here it would be important to share SSIS also have data type which are similar to other programming or database’s data types&lt;/p&gt; &lt;p&gt;Like &lt;strong&gt;DT_NUMERIC&lt;/strong&gt; is equivalent to numeric data type, &lt;strong&gt;DT_I2&lt;/strong&gt; is equivalent to smallint, &lt;strong&gt;DT_str &lt;/strong&gt;is equivalent to VARCHAR and so on.&lt;/p&gt; &lt;p&gt;I am sure you will find this control fairly simple so without wasting much time lets start step by step. &lt;/p&gt; &lt;p&gt;For a change I am using excel data source here.&lt;/p&gt; &lt;p&gt;Suppose, we have an &lt;strong&gt;excel of sales order&lt;/strong&gt; which have columns like &lt;strong&gt;sales order, subtotal,Tax amount, and freight&lt;/strong&gt;. &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhin82-H3KyMv9tnVBVP_mq_czNP_JyvHpOcLrkdgNIGLJzjlVuxOBx6uY8UioOJSybAIWvNElZ6lqBRe8lnvXoRhumG7Q1dBwlksJRnilbE8gg3AVMufJc33CfeUC9r2Y89k6l2g/s1600-h/SaleOrderExcel4.jpg&quot;&gt;&lt;img title=&quot;SaleOrderExcel&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;SaleOrderExcel&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6uxnJyCURFyxBgx0LUpYsnaavabCNGou-fa3-L-9XJ5lwtl5qQ8fj4Nw0hQ7UZ3uIlQLzSqFrvxbIeKp6vopJQDt2aKO6tDWA7XcQiGHlyPDaN6WPl3fqgSf3hQmVBHKX9hgmMQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;460&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Here sales order is varchar, while SubTotal , Tax amount &amp;amp; Freight are numeric with decimal 4 places. We want to convert the numeric field in integer and want result in a flat file. so let’s start.&lt;/p&gt; &lt;p&gt;Step1 :- Drag drop a &lt;strong&gt;Data flow Task control&lt;/strong&gt; and double click it. Now add an excel data source from SSIS tool bar as shown in below figure.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSHJfBUSs1hvhGgJqoZBPqjSEjLGDkSEricYSabn5GzyBSwvYVcgaNpDB_UAKIvUPY_MKHyPDj8cbP1590u18WkwaVg5ltTvy3-EGbQUOGDHbWL3CGCndR9IFOQ_wXPgyZEZpVBQ/s1600-h/ExcelSource31.jpg&quot;&gt;&lt;img title=&quot;ExcelSource&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;ExcelSource&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1cix3QR6IO9WqqxIRFDN8qOmQjXUsTut4LkKhehuj0izl56vAuuBN2GPLNN2CxdjcaLCzwUM6Vr4sQo5C_vL3mZomFUBuWj7hJmvpvMzPOk_DdzGdSC1zO2AnEff_rfcXImHokQ//?imgmax=800&quot; width=&quot;595&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 2:- Now next step is to configure this excel source. so to do this just right click and use EDIT option. You will get a screen where you need to provide the file which we want to access. &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbapgUNNdvAzE-ey-iQvLyautcI5arpoyt5c-Oc3e0WQPVafNorbV5PB3bzfRgAHTsvMUhtAts4OUZ5tKilJPzcQOzhyphenhyphenIxE3mtPjU5raikTxvJUVDZBa7B7CSx2frqKjSFXwbhog/s1600-h/ExcelSourceStep27.jpg&quot;&gt;&lt;img title=&quot;ExcelSourceStep2&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;ExcelSourceStep2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9dem6WYz_b0GN1L0dCBr289s17_SOBwr1fwq_5O30IO8StO0F0RbfJeMjcgr5FfMVQIlDV83aYT9FndmZ01emagTg_uXPdvIQFkaauYyiPQCuj2hmkytSrOwocGf_vHErDjoQMg//?imgmax=800&quot; width=&quot;633&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Once the connection with excel is established the &lt;strong&gt;&lt;em&gt;Next very important step is to configure sheet as highlighted in below figure.&lt;/em&gt;&lt;/strong&gt; remember you need to configure this sheet because an excel may have number of sheets available so you need to assign proper sheet whose data you want to process.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6IVggm0-p421qlxn6eY33KbVnYL2y_ez8cSkl0Y8lU33jdJ6ntkZUvYldie89KXlYM5HWL_U9nDyj4-y1rNGI5zXXwBnJ6qH8vm6bsc2mEMhkjINHdn6HDNkZrr5bzadUsemr-w/s1600-h/ExcelSource33.jpg&quot;&gt;&lt;img title=&quot;ExcelSource3&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;ExcelSource3&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEk7-4hSroalZfJJeLvN7Rt4dnXJque4EkEhsPZj76Y1_91cIrCWIiUBNMwIubcojYXFJYWl3Mf9sNJdKcE8jRRC1CRj2AWYejLndWdkYRHMDoeqDLlbx7DDtn8ArDOfSP9WgvQA//?imgmax=800&quot; width=&quot;643&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 3: Once the sheet is configured you can choose the columns as well which you want to process or want in destination by click column’s option in as shown in below figure&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5NpizoD-sfbad9i6CE0ZiZ6HPYpzayVVscJHxjE5yXP6uCqvq_t9zZGWG5g04vqGsPflIGdZ6jXhOykXTkmtYvraBJJ3Rl96PVHNabjJ4k5pgdVZYG66-dZ3wCaYHxl7kwJ3DLA/s1600-h/ExcelSourceColumn3.jpg&quot;&gt;&lt;img title=&quot;ExcelSourceColumn&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;ExcelSourceColumn&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg34HyJYRs0YsFgrVnYxxzg-_dEI45GzkUJkfjncwE1NbY-F-5Gug9oMMMHhoo51KHEEe6lFCD_eXCE1bji_nLYL4dWgWg6f4do5L5TV8U_th_QxfCKUlE-vvBaoRYUmXOAk3kgyg//?imgmax=800&quot; width=&quot;606&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 4:- Now drag drop the data conversion control from SSIS toolbar &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4XHpz7zg1kTe-aC4FG5rYzbyLNLETDJnpOCGq0ifxrfdfql2xn80G_GqEGr2XtLPnK2fzgZ7mytZX8gJ5whLsEIRVuo-r0ulT4pA65umoLvl3kD8DKIelnjgmmjcy1TTwqd7emQ/s1600-h/dataConvrsionControl3.jpg&quot;&gt;&lt;img title=&quot;dataConvrsionControl&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;dataConvrsionControl&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB5Bh1GuQWoos-S_TA3n6cgp9-W9rqa37cA_H56_Tgpwef15BVBkGIevFk3tgM8i7RFAph8WjiV0s_qwS8aHMgo2zUSD9-QreFkEHVOAg-aX6KhaerLe2R-jrBCcYh8-lGwPVavg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;268&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 5:- Now , open context menu and click edit button to configure data conversion. Now remember here we have to change data from numeric to integer (As discussed earlier our aim). so just change the desire data type which is &lt;strong&gt;integer (DT_I4) &lt;/strong&gt;of all the three numeric data type. As shown in below figure. Also , point to remember here if when you do data type conversion you need to careful about Aliasing also. You will see &lt;strong&gt;copy of as a prefix on column.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1MCY3aPck9MLcLl29gkA9xgBbQKy-5IuB1vZMhrpp6wucIpCZwtU1eLun4O_ZD1xPDDttRYAYB3vN163pzrxtFYMAJKEejXgH4Q59OKe4DWQrb3gAd6XPF7yWgAlB_-WQ1ED97w/s1600-h/Convesion7.jpg&quot;&gt;&lt;img title=&quot;Convesion&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Convesion&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5JHye365kwUS4I3Tw5587Oy5PTBP9Mj1owVonGWmPe8l8r1_j-ntnPvT8ZjM27MgYlJcv6I99uYHmEqaCiQKYbM1Uffyyj47__4ahnzQa-y41E7mkh-HlknXr_a3UcUf7JLcDoQ//?imgmax=800&quot; width=&quot;558&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 6:- Now, we need this output in flat file so adding a file destination control from SSIS toolbox and configuring it by clicking Edit button as shown in below figure.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4X9luzTqD3efYdeG49qY49QQw_LTJCm0Pq3M0G5pt0W3AzuTaVgGxJwBFYj0MnvJKH5Ix__juycy4hAQ_qro5A-dYhHbdd17yf1ME2BU_ID2BVSMJkyfvVvpNmHnUshsNWW08Yg/s1600-h/FlatFile3.jpg&quot;&gt;&lt;img title=&quot;FlatFile&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;FlatFile&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXmU_lDFHsO36iLNKjZCHjLZiYF4lFTs5GiaQmhv-svPjEhWqgTBgLpkQeBlGVVwItJOaN-SOAOz1MYmgpOZethks3wfGxxDucI6lKPsc6NOOL-q-yfdXDN3fldURk094cNIMB4w//?imgmax=800&quot; width=&quot;644&quot; height=&quot;362&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 7:- In next step we have to configure the file location and columns which we require in the flat file. And delete unnecessary columns which are not required.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_ipphn_9c9cGTWRQPRVX7PGrojR1RzLpqN-e91FtbtcbGxZx2BpLvkhD9EdAOb8tjh2IJKcssr7-uPvoQeAi7S_zIOGmSmqWx3GH_2MsnHyqitn1QEb6f6QOGAWH8pEUP7J57Kg/s1600-h/deleteAccesscolumns3.jpg&quot;&gt;&lt;img title=&quot;deleteAccesscolumns&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;deleteAccesscolumns&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitoOt3S7J__fnJzXPa7XSxjUOiolvz9CsteOVbFZZgCmcv7TF8_e1kZgaX4wlE5JHMCZ9nN13MLpzMKWXrXlh_KGsyjIs2N844XhV60N_hZFLLZ-94_bAVIr-qKkxPLZo9ZU7hfA//?imgmax=800&quot; width=&quot;536&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAQVZc6kTALmA4pdK_hi61i3pVSNpT4YhU7fu_bQj-PYeJ6Myq7ZlhMH782QrP-839lepkCYK2GwPqgBJI1OF9xjan87da70-fM-bksL4opXnEAof3vt9kNHG6bsGRjnf6Yk2qRQ/s1600-h/dataConvesionmapping3.jpg&quot;&gt;&lt;img title=&quot;dataConvesionmapping&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;dataConvesionmapping&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA7-jjWNpkgUfW30b7i3vLOI1LM1IX_uVMTuNBeqoZZ23Qysg9zo6g0HcE3MR3X1wcfr302xgqs9e0iRDZINN0NgaFkhyphenhyphentdP8BjV9wbiqp3t2aqQDGaDi53bo2pr6r098TL3birQ//?imgmax=800&quot; width=&quot;601&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 8 : Once the above step is done, we are good to go to run this package. So,hold your breath for few second and hit F5 &lt;img class=&quot;wlEmoticon wlEmoticon-smile&quot; style=&quot;border-top-style: none; border-bottom-style: none; border-right-style: none; border-left-style: none&quot; alt=&quot;Smile&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbAfV_PBGsP9PlKRJyqVF7myhgNXTBpedfdZ7bGK2xu79OvUKu9IoTkmiXsIWnwJD81zN9BnhVb6Tt-x_tUQPoigUMhZIcXYmSqpAaAvP7lsNdH6e3k1mhu3isqcWWTxdzXPr5lg//?imgmax=800&quot;&gt; .&lt;/p&gt; &lt;p&gt;You will get find below screen. Which shows that all the provided rows are inserted in file.&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVmTdUs7FjtsBvX6SgfsV5YpqbDryadC5m48kSccfhioTC1KMd6hAPiv1dynjEM1B9Pn62UIi69PWLKPll5qmXav4jBu2_hYs9MK6wcND46xfbucWYpqrJQXfFCNqQJW_JH0UrbA/s1600-h/result3.jpg&quot;&gt;&lt;img title=&quot;result&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;result&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxdw2kzlTbCGGU0qLhJr_K2DlTDRFyRoU5yYLuRawk6fWE-Bpotn8lQ5QTskDOnq_WzzHWo8LHuTs28UUfMi8V-8injrhhw83CM64sysjqZEf01e9UEd4lD2IopLQHM4XLPWSo5A//?imgmax=800&quot; width=&quot;457&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 9 : To cross check whether file has integer columns or not lets open it.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUxh6BtE7ZxRG-FDh5iJzAiKrNkVdJb1fm_wNNpERGOudQtseIwYQJh8PjkogRq0aXHHf_yQLOdM4QOlUdAN_7jGZCLiVyxBHbje0jVLQ3ZWO0iSRXX6dpr9ivcCT-QqSYmOTAbQ/s1600-h/CSVREsult3.jpg&quot;&gt;&lt;img title=&quot;CSVREsult&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;CSVREsult&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWnihe_k7Texpmx7tQh0sPe5le0qZUHKEu9bTibetVLkrkkXReRdvPxuOhCU5SZpMCCqLQ7dS3YiDnYI-lh_MKsfseXvf9c9DoEcxZ-MjLcz1ea5iGB-RUxOK_H51fZr8L7mStzQ//?imgmax=800&quot; width=&quot;351&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So, if you see above screen we did it successfully. So we achieved our goal in this post and used &lt;strong&gt;DATA conversion&lt;/strong&gt; control successfully.&lt;/p&gt; &lt;p&gt;I hope you feel this post useful.&lt;/p&gt; &lt;p&gt;Thanks for reading this post. &lt;/p&gt; &lt;p&gt;Enjoy !!!&lt;/p&gt; &lt;p&gt;RJ &lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/7472622924422770254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/7472622924422770254'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/09/step-by-step-ssis-learning-what-data.html' title='Step by Step SSIS learning What Data Conversion use in SSIS ? TIP#116'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6uxnJyCURFyxBgx0LUpYsnaavabCNGou-fa3-L-9XJ5lwtl5qQ8fj4Nw0hQ7UZ3uIlQLzSqFrvxbIeKp6vopJQDt2aKO6tDWA7XcQiGHlyPDaN6WPl3fqgSf3hQmVBHKX9hgmMQ/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-314842775480612391</id><published>2015-09-12T11:29:00.000-07:00</published><updated>2015-09-12T11:50:12.199-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Sort Control"/><category scheme="http://www.blogger.com/atom/ns#" term="Sort Data"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Integreation Services"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Package deployment"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Sort"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips  Tricks"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><title type='text'>How to use SORT control in SSIS ? TIP #115</title><content type='html'>&lt;p&gt;Dear Friends,&lt;/p&gt; &lt;p&gt;In the &lt;a href=&quot;http://sqlraaga.blogspot.in/2015/08/zero-to-hero-in-ssis-sql-server.html&quot; target=&quot;_blank&quot;&gt;series of&lt;/a&gt; &lt;a href=&quot;http://sqlraaga.blogspot.in/2015/09/how-to-deploy-ssis-package-step-by-step.html&quot; target=&quot;_blank&quot;&gt;Learn SSIS step by step&lt;/a&gt; this is the 5th post. Now from this post we are going to use each transformation control one by one.&lt;/p&gt; &lt;p&gt;So, lets start with simplest one transformation control which is&lt;strong&gt; “Sort”. &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;By the name it is clear data it will &lt;strong&gt;sort&lt;/strong&gt; the data which is provided to it and give sorted output as a result. Lets understand this by below step by step example. (Here I am not writing step to start visual studio and create a new project, I am pretty much sure you are aware of this now.)&lt;/p&gt; &lt;p&gt;Before going further let me tell you want we are going to do&amp;nbsp; here. We will have a input result (which will be a text file) and then sort it and save in another file. &lt;/p&gt; &lt;p&gt;Step 1:-I renamed package to SortPackage if you want you can rename your package as well. Now &lt;strong&gt;drag drop a Data Flow task&lt;/strong&gt; as shown below and double click DATA flow task&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidewiBe-BsF2HaVENkNsBOaNoRJFnumBjGJidly4qWISzoH1faf56coZDNw2-0tNNdmogNbw3wUJuQnNiQCbqc_uplXsAVpu0IkAFl89zSo9dFghu2DJ3yoReNBZTd9AwpT44Cgw/s1600-h/Step1%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Step1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRufabaC8LDLTKQMzkE5GvxOvolCh1ikZREOCVHmt4nF66t6UV3HYDREuL1jWKbJrDE5eu3y0x0Mo7KpzQyMi_FcW0NiUblxTdSMoXBgGgEuDq3TVTJbrkXsfxl_GPg1ntg3VuiA//?imgmax=800&quot; width=&quot;644&quot; height=&quot;432&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 2:- When you click it you will get a data flow screen where you can &lt;strong&gt;drag drop FLAT file source&lt;/strong&gt;. You can choose &lt;strong&gt;source assistance&lt;/strong&gt; as well. Now configure this flat file source. Means give the path of the file which you want to have as a input source. I am taking a text file which contain fruits name in different order. as shown in below figure&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5hJ5q_pPls6WbB6uRagrDS7dEQ6Uil3Wv9r9zDSLsjJMe6bWEVNkS3_-KRX0L1vUrRpwKiMAm6uD4Wi7AUW_XkOv81biwJn7um1RPg4BOOKY8PI26sPG0N6EsGmJajQBRJzj1mw/s1600-h/Step3%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Step3&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step3&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSVtowxktxiabXO3tRlk83IUexM4X-c9_35THIzXtVtB34GR1nL6vfISy_eyPVZTzDkMk9w5JuKwY8iU2tsMhgv-wh4QHmvbTmvk8JC6dBBpXLtp1keQ-BIiIbDPCIBGraMnqEAg//?imgmax=800&quot; width=&quot;431&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Right click flat file source click on EDIT option and follow the screens&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS5DTDhC_KOpJ1G6jZPuz0EvEzbeTzTXY8358TPmUqxdmT8DeTkWxLrbMws4v_C413ik5qdA-KlvFn6rhTo2kvfyObV9ceXTfTlFGWWyVwrPcsxE8I53F6L8Xz7WSTpvcJT4KJEg/s1600-h/Step4%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Step4&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step4&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4gfEOwAtuYMH-r6MHMih0chUevKNXTUiOiq1WgYXfePwiIRDTFdmuoxb_Q6enrKSbC6QaEO5jS2FTdPB8tHOfju07eSP0rAbBBUW5UL8_vr0qfrFTjbl1H9k_mEVAU0hYYCka3g//?imgmax=800&quot; width=&quot;517&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 3:- Now once the &lt;strong&gt;file is configure&lt;/strong&gt;. We have to &lt;strong&gt;drag drop SORT control from SSIS tool box&lt;/strong&gt; as shown in below figure. &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIDkf-ThwMC69ikTf7XT8x7kAm2opYtisQe0kHE2yKT3_HF6206LbRGuvIs2zGFL-vwbPi5YRZgrQ18D77IT9Qwixf81D7Dzc1vnd1q1JMpNYQXkpcv0xfp7Gmslty1bsdJxr0jQ/s1600-h/Step5%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Step5&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step5&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-jQVCRLHa6FpzP41F5RAj9z7rtI5QDPPtoY6mw5R6Qxgl49b-qXK-H21sBt9wqTIWTjzhOlgfQQiiGr16CgLhU7MAXbRoFQnkuLMZ9t9z5M0d_LcuJzSqC75mhT9T_kh2vP3rRw//?imgmax=800&quot; width=&quot;644&quot; height=&quot;345&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I also added the output of flat file source to sort control. As shown in above figure. Now configure it. Click on Sort control and you will get following screen. As show in below screen you can sort the data on any column and in any direction like Ascending or descending.&lt;/p&gt; &lt;p&gt;Right there is only one input column which is name so we are sorting name in Ascending order as shown below.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBWIioSXvaOwOsr-oz94XTyeADXVgWi9akr4I1je_ERFdxWi5lPy-jbic1dpKx6_a60PixvX40koRBfwJSXggiSe22u2JFUetmxbqgfCcdQZjpsBRPsU5DTmYy7hwppuFTxKdS1g/s1600-h/Step6%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Step6&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step6&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk-d-X2ju0EmoI_I1GLGT0wcHnSYOrBotCzFwLFbdBVmf0LvK75OBNnq17NDxHOloAXW-tk3pqfvK2UYWQE9tMqF9CNnWbxWWarUVc2VTi7_vImgOefVVvQFEnwBv_oMQJC3cBVw//?imgmax=800&quot; width=&quot;530&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 4:- Now once this configuration is done we will save the data in new file with new name which will be sortedFruits. Now to achieve this &lt;strong&gt;drag drop the destination control. So I took same float file destination as shown in below figure&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifJxWpr3zB9E3E9hlYUJWC1f3m8m9foREBnRtBDX5Xdla8T9noQpShVkMeA91bBjcQx8dQrqo06jSkFCIw2rgozpz_PUtB_-ZPamcoCHuEvfgm7Iu-sHuZ_YGJRpKbeKLu5VOFig/s1600-h/Step7%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Step7&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step7&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiReOg5JTKmHFeEdnWMb5se950kJ3RtF9kbgxFuuJTb8JaFwFSYBJEhbRD0_ds-vRY1We86muGQUHNT-SSmAQ_Iblep46OkrSV2X514Xy2scdgvQaKaXeXRXcwJ0BrgSFe7-HDRow//?imgmax=800&quot; width=&quot;644&quot; height=&quot;242&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 5:- Now configure this file destination. Which means where we need to save this file and what are the columns which we required. so In current case there is only one column which is Name (Fruit name) and I am saving this file at same place with sortFruits name. so lets configure it by clicking right click on flat file destination and click on edit button&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXkiWBMJQfvbD_Saka1p3Us08-oBbD2WINO5fvBN9QNHjH9nNhb-5aTB9SyvE_NTwnFHrQziWEtBsIpqNeXfLgKxMOIeNIYJv9UCmP4QOuXdX9tMqQB6bwDO5En5mGxCFfZAyp4A/s1600-h/step8%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;step8&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;step8&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheBHB-B3NIXlx3czojeIUfwTtGSNAf112koqjsGLjrzTJ7mox7PKEmDd0OxGu27jd-FszIoKPjOWQcEEToyihGBgTXjG5Fnko8QD4G1JTEdC6ktqWBD7K4gnn02LncQfZc_HnTjw//?imgmax=800&quot; width=&quot;614&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 6:- Once this is configured we need to run this package by pressing F5.When you run hit F5 and everything going right then in execution screen at each step you will find green right check image as shown in below screen&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw3lVSiEbZlPgjXLHwc1iv7SKqhEkCIZnmYEKINxZZvtlknzwqgOQkh1hs-spPvRnQYH9k3PVsRZa0AjGwAWWQhTYSWCqfFwfdQPRGUXWX2fMMaPLCSDVgTD-sYkvGyp_ZWaYp7g/s1600-h/Step1.JPG9%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Step1.JPG9&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Step1.JPG9&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIM3WkdlCh7KdDa53SwsbJU55akhaBR-6JWjJcJ_uPXJqp6jfpmMc9VyXnzZO4QCGfUKGGkkxUU3PK3QXrXbCb8faBmgfvm5aTS9gTYVl2r-bMF2YP4iOP2B_nK_XLv4MUzs9_QA//?imgmax=800&quot; width=&quot;644&quot; height=&quot;482&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 7: Now to cross check we will first see whether that file is created or not. If created then whether we have sorted data or not. So lets open the flat files.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV2KfoC1x72TPEqN9hTA8n2AXY65QQxSXoEt0u7002K_90CI3qfLD1sZt7Hkgj44iA33Yfq2EiHr7JQwvnsKF5pRejeVzg-PoKVDfSkAJWqSdn9g5-NRTn7sdtUKmvp1kYZI_ryQ/s1600-h/result%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;result&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;result&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-M2LYZezCjFnBgPbdOG55WD9juJ3p1vCq2a2O82juzORyuCiwSbBCjd_P-k8ICZTfBawOdw2s_B5TWx3pqIMYOwVgPALZ9dDM04ISvIrNOyp0lzkqoeKQIGiRjNPgVwgo95Pdyw//?imgmax=800&quot; width=&quot;588&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So, if you see at provided destination location a file is created and the data inside this file is sorted file.&lt;/p&gt; &lt;p&gt;I hope you like this first transformation control. till then Enjoy!!!&lt;/p&gt; &lt;p&gt;Thanks !!&lt;/p&gt; &lt;p&gt;RJ!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/314842775480612391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/314842775480612391'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/09/how-to-use-sort-control-in-ssis-tip-115.html' title='How to use SORT control in SSIS ? TIP #115'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRufabaC8LDLTKQMzkE5GvxOvolCh1ikZREOCVHmt4nF66t6UV3HYDREuL1jWKbJrDE5eu3y0x0Mo7KpzQyMi_FcW0NiUblxTdSMoXBgGgEuDq3TVTJbrkXsfxl_GPg1ntg3VuiA/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-532089656131382489</id><published>2015-09-05T00:55:00.000-07:00</published><updated>2015-09-05T02:56:01.816-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Deploy SSIS Package"/><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Packages"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Integreation Services"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS Package deployment"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by Step ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by step SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><title type='text'>How to deploy SSIS Package ? Step by Step SSIS TIP #114</title><content type='html'>&lt;p&gt;Dear Friends, &lt;br&gt;In last &lt;a href=&quot;http://sqlraaga.blogspot.in/2015/08/how-to-create-first-basic-package-with.html&quot; target=&quot;_blank&quot;&gt;post&lt;/a&gt; we have successfully created our fist basic package. So, Now the next thing is how to deploy this package.&lt;/p&gt; &lt;p&gt;We have created this package for someone else or our client so we need to run this package on his /her machine.&lt;/p&gt; &lt;p&gt;For this we need to know &lt;strong&gt;how to deploy&lt;/strong&gt;. Lets start this step by step&amp;nbsp; &lt;/p&gt; &lt;p&gt;Step 1:- Open the existing solution and right click on the solution you will get following options as shown in figure. You need to click on &lt;strong&gt;“Convert to&lt;/strong&gt; &lt;strong&gt;Package Deployment Model” &lt;/strong&gt;&amp;nbsp; as highlighted below&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGMykK52WmbquwRHH3veVutgcjw3QBnLFLEG1Z-SvK-QzRXAXR_GRo2fWrVgYFW6IDmyjiSwjRCQrwREvZ8VgCzDWuzmYaBPSTH2M9cj5__979T6QsQ1tVxr49XGDuk13wIRg7eg/s1600-h/convert_To_Package%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;convert_To_Package&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;convert_To_Package&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGwlxQiKpb18VXObfgjMChs2eVxUsv1RLN1OSiV2_TH_lOFYPmkvP7x5T-ahV27KyNukSGrZKRMN_RfhYphy_0Acn504fwBFW7bXdo6NdW8mhYtJ97qLQhPOBJry8QYB9sCphAYw//?imgmax=800&quot; width=&quot;592&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 2:- Once you click it you might get popup for confirmation just click OK.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhNJ0HG8PEou8HLNk1jFXok-Lo2rSyLC3qdyqpu52MiYTecNrpA8UJEBKC2AsdkTeYVgp1xIIcEmNvc3jw1-Wrj2QI-caTnFoBnVN1o1GLbx1hXMsdGdacj3ul9Dttohm30cqqNg/s1600-h/Package_model_cofirmation%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Package_model_cofirmation&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Package_model_cofirmation&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhddR9xoxn7duKhwM6ZQq1hKDigt9jnlcobkKQgPT4MLwKLqLtpx92kcWo63LH0VY_p-U9cxgCcnYdi0ScpX3JVQWaDvCaeogqgndJnPaBjvXqJdgvM-gWNPkjL67chRCNibgqsUQ//?imgmax=800&quot; width=&quot;536&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 3: Now click on Properties you will get following screen in which you need to select the &lt;strong&gt;deployment option.&lt;/strong&gt; And need to select &lt;strong&gt;true value &lt;/strong&gt;for &lt;strong&gt;CreateDeploymentUtility&lt;/strong&gt; as highlighted below in figure. Once You make this option true&amp;nbsp; press OK or Apply Button.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhyphenhyphenjXCXS4W6KA2pF82kon2Ut4LkGci-YF87SsC7CaNmtBppOQAbJAfX1P2qrzY0cZfJQgnyfWSOXzEN2KPyh-AbgH3hFS9gDTtF_TqYG0OpUXa3BcByBC9Sjffpa9UI1RsHbgS1w/s1600-h/Properties%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Properties&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Properties&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWhGtjMfq7Z-V43n8tKXYvC1aP0STqOryCn4rGgax1j7HyNFR2mB-B_JtfyK1-OTrBu2Fopjz7wNwpVkA2ajlY4gfsK3J9SF9uB2g4YYLXNj5mMxv3HClrH69RdaHjsS2-ag_DpQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;375&quot;&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Step 4:- Once you done with this again right click on the solution and again click on &lt;strong&gt;Covert to Package deployment model.&lt;/strong&gt;&amp;nbsp; Now this time you will get Wizard screen as shown below. Click on Next button &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3oEeP8quCYGAKKvmbfDSkv65-dcOy9CPy5SvZzrR1lO7wsOJXMSeEBWEmWhXRLt47JU8zaGu1R5B2q5DnEdHjBoDqMUy5PDtQynAOpHMpPYaq0f-lxi3kUkZFTpjBeB7azBGUeQ/s1600-h/Convert_Wizard_1%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Convert_Wizard_1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Convert_Wizard_1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkuCagjSsGYRcYLHSqkYJEKrNFGgc5RaeVUxN4Z_Bii56I83J3SB0RgH6siOfZu1ocke85GcixAAGiIXtENir4-D2FU1hCVaZEuieS8He6Ya1YNFGJFwR2KLh5cz0hJy-f1zR3_Q//?imgmax=800&quot; width=&quot;517&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;Step 5:- You will get below screen which is package selection screen. (Suppose you have multiple packages in a solution so for which package you want to create deployment you need to check / Uncheck according to your need.) Once you selected the Package click on Next button.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwe1oqeCdFv6e_kyuzRjbIwYw0z4GMBQGm5ofyU3tptKQVobKn96SGis_dKlza8qse3qDTdESzFeG-qMr7YOJlXUmwC9bkxPUo4CElD3TF6kCHu8Pb0mYEiepxe37YnpDxtWf9-Q/s1600-h/Wizard2%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Wizard2&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Wizard2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYDmzLLGPMDUV2EFD0AJu0rH_-TZR5DSAiJl-w0OZaTsSLX0U8t5kvM5ZmDgYoCaKroNlEDhK47dX7bp5Tf49CdCuom4nMKgRdWWlng89So0b5ujrOv7dqsYZWdvp1zvDe-kg6nA//?imgmax=800&quot; width=&quot;518&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 6:- When you click next button you will get next option which is specific project properties as shown below in screen. In this we have an important option which is &lt;strong&gt;Protection level&lt;/strong&gt;. It is use to set the level of showing sensitive data in package. for example a package may contain sql server connection string in which we have username and password and username and password are very important and sensitive information. Here ,with protection level we have option to encrypt this sensitive data or make package password protected. This will be an interesting topic which we will discuss separately in near future in separate post. for current time being just leave the default option as is and click on next button. &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghVLkLK_C-gSvUV203kpPHxjC8Yo5G2rcTFq0gCunNx4pcjkWQ9XjjPVxm0fCJUcWLEe1YsXpT4nO8n7Iqrh2Y8nE92OaPvLFcFAr_JWfN46vL3zxf3pCSNDyvNLS9QKABy7aYMw/s1600-h/wizard3%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;wizard3&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;wizard3&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUjNUt4DDL0N6C3xiEBqKGLZCK5kYbhvVZo-JhhWhTk98zqM2AiGWGEVRo7-g-cEHN8TIa-m3KonwHbGcNvOGBGllWVh3F8b1nyTkBbPAev8lx90OaIi1qrnL6eprUAhcvbsJ2Qg//?imgmax=800&quot; width=&quot;528&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 7:- When you click on next button you will get following screen. This is the screen where you can call another package which this deployment. We will discuss it later for current deployment process we don’t want to call any other package.&amp;nbsp; Just click on next button.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ2Uz7Hn2fnKCQBlXSGRcmCQSMPCCQWjwHzCoqyJoGlCsaDU0KTXqk41ylJWB8q9BX3vPtSbl5w6BcEg40RZp5Wpn2px0w5Lj6XfBmJx9lRhOaW0B3hPBL1F_oXtsilkf320xQVw/s1600-h/wizard4%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;wizard4&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;wizard4&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTCKYUZ724gfPQX38tk387mZmZWOqqy_afzlLjqw18IQpGdgwZLxw7YtxEVJvkJCUoIO-TpyDvIkgacuh-FtgN2C5ws8XAOsFmb9Ig4G8pbguYG0mSPwSAMrR-vnTZ_-8pcKXurg//?imgmax=800&quot; width=&quot;520&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 8:- When you click on next button you will get following screen which says about configurations. We can create a configuration file which is just a simple XML file. If you are a .NET developer just assume it web.config file where we can keep connection string or other configurable item.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmWyQHhgbSpup4ijWlIM1b6FDomO67oTFid0qfTJTHdTq-4TuvaRYWDjH_6nWRM5F3_60Mwen5OCNTss1HCf2iqlyxWVkqhHXhj90RFx4m0ULOE8LanzgFLhpi9-gDUuPtNyr8Pg/s1600-h/wizard5%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;wizard5&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;wizard5&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0rbA2eevhORP3CPVwCq5V4gwdzXuO-O-MvT9TMxrf-8IFqQ-y0bwfJVlNzT9r8AsjLRkMqrdkEkeCHfcjFlzew0ysNlDXUTEnLxzQIiLflEUSjr2qxQSR59KEfEnFfah2SeVVXQ//?imgmax=800&quot; width=&quot;521&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 9:- We can create parameters which can be use to pass the values in packages. In current solution we have not configured even parameters so don’t think to much about this currently. We will discuss it separately in coming post.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitcjhBpnwL7tQ0_ySk86eJ1a-xyEdaAfcoPj0fZ6MdBk7boovlRtB_PiQ-sZpVJAuXpfcfqLRnpLe0udMC3Db0Bf91-QOHU5EREs1_7UbiHbXMf-bMOAG51rwxXjbX2Da-tVRnQQ/s1600-h/wizard6%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;wizard6&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;wizard6&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc7V6Ux2fYVq8zGjuqaLPzNXoEmxl_UZtdTCbj1YwMh5hu-Xrbtf9k2mGzHUZG-e07LeBsxoQAdUML2f4eTcW6TqEy_dpyVmUc0c9lvzcPJI_Bt34GA6Iz1bysfzv-AOToLKYgBw//?imgmax=800&quot; width=&quot;520&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 10:- Now directly jump to Perform Conversion and skip review step. and click next you will get following screen of popup. Press OK and then try to rebuild the solution.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcj2PX5MY4c7XCSTSJcMZMM6VtpUpWIm6OgMgb7SylRJTTqbUhVjnl2UJ_tnPY32uVqLAJ0Sio0JVbuwDXYBPZaSTjmRKItmMeIVoKp9F7yuJvHsiCPKUCxNcQtdRvYaRArs6gvg/s1600-h/wizard10%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;wizard10&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;wizard10&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrgMMSG8FI8cyLE87tUjD4OpdAOV0DdA8ufvGWAfyIPdtDiWO_orQjUm5jQsV3bVevd8j1pgJiAubDvmu296zGvXcATzHjpSXfnz28GUvmqXJU_VI9y6p0JcdSZEOsq0awP2WUmg//?imgmax=800&quot; width=&quot;519&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 11:- We did&amp;nbsp; a build/rebuild to cross check package is correct. Now open the deployment folder in bin folder (You can find the address in step 3’s screen) . When you open the folder you will get two files one is Your package file with DTSX extension and another one which is called manifest file as shown in the figure below. Below ExportSQLToFlatFile is our &lt;strong&gt;manifest file&amp;nbsp; and Package is our actual DTSX package file. (if we have config file then you will find config file as well)&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXG52-8dg9rLGCioqY_b5npUTbJrNHXZAzAAxds8CPgq_cWSWq_3MrsKLzyV0qGGQUoCf-HtnuDRyadlKUKFOE27ncSKow7D521Aw0KPEnwZrEyz2kJE4aYT9Bwl3QcPNSQjfOkQ/s1600-h/Package_Manifest_Location%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Package_Manifest_Location&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Package_Manifest_Location&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMN4qF0GfnusG_cAZT5EEx_5CSu8YAaFdxBVDrKH863SlIs6zrwKO-pKTJRNPJ9MKtYUXa9uYkZNvnaBNpAcDKvZIZihod1o-pve7asjKNhYayhpFmbFTqT71VcGCjoxVCz1trGQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;152&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 12:- Now, we successfully completed our first part of deployment which is basically creating a package deployment file which is a manifest file. We can copy these files on any server where we need to deploy the package. When you click on Manifest file which is ExportSQLToFlatFile you will get following screen&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo0sI9ibBSIgN6v_k7vDFOgJdFpWtJcZzMNEtxksuoRlcLWUlNNgkTefpPgUsH0aDXUbTGALk6bJOLCjHgXlDJr8ddarkE_k2JEzn6i_SID6HmwL17xn_Ua48yAaeX1racUF6i8Q/s1600-h/Actual_Deployment_1%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Actual_Deployment_1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Actual_Deployment_1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDe-Jh-BU7jk2dys8-Sc8Om1I5qPGP3UEM-7lWxQi1cOqxcb4jZbDG9OYpRN883JV8-2LLgBlKgajt1jlnzmIif4NmDb7urQGQboqgHitgITFyTLybAK0T9w3crt1rJ29I46vkFg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;399&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 13: Click on Next button when you get above screen you will get following screen which shows 2 options of package deployment &lt;/p&gt; &lt;p&gt;1) File System deployment 2)&amp;nbsp; SQL Server deployment&lt;/p&gt; &lt;p&gt;Now for current demo we are using file system deployment and clicking next button.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimkvNIdBrX9ak0sI2YZ1dj98yCILdBp6gnRPySM80CrNQR3_fWmneJ5M90nT0jzUbRwKqLRAL3UAwr1ZNp82EEFRiemwJGueNaYzBCfTx5s-IXapQb07Mx4ybVmfN_WtIpQxFhMQ/s1600-h/Actual_Deployment_2%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Actual_Deployment_2&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Actual_Deployment_2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitN0e4MmDhSUoQXBkUSbdjeE8uUiS-d6p11nSyowut8R0Z23QU85-LC9l_BxPfyPKSIPodVwOkmV9-k1sSSLjxP9vsiPaKm9FYVAWjAlEHGaSTS1j6AISNJh0FKJsHiQplYrufxA//?imgmax=800&quot; width=&quot;526&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 14:- When we click next button we get the screen which ask for folder where package will be deploy by default it is SQL SERVER’s DTS package folder so let it be currently and click Next button &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgckWLOZ7PCYm9NwriMKP7TrA3eQHaBSR-nK-vGorPL0UwzBA8r5lz3IueCa0j6HOTHHRigjZLihTlCjnWHQv0R6PE2NlL39JddubQ5GreIUE4z0huzWOfsBLK6J6FixFs42mfttg/s1600-h/Actual_Deployment_3%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Actual_Deployment_3&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Actual_Deployment_3&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSnXnK5yM8RxroeQpubsQR0iK4A0BFfESbGGLlNAbIspZTmpElXI-9eU2t1C5f4poIZifbFa2FXT_ys64vMohFlRss7m-e-Up-0Jwxrn1XxmEnARAPztrpKtmHTBtMmdxDj6-k1A//?imgmax=800&quot; width=&quot;526&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 15:- After clicking next button , we will get following screen. Which is a confirmation screen for deployment.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCSoa9H-4CgC0q7LFwGhtWkF1Bx7LZIaOeTRbnTJyRCQzbZoYeCTzP9l94K2USCm0OlSEeQQN5VXP-AnhUnG_seiQ4m37DtLegE4fajtFXki_Gf37ZspN981QXUMZkQ-Ylga056w/s1600-h/Actual_Deployment_4%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Actual_Deployment_4&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Actual_Deployment_4&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRTdLP29PmBmqcuN0AW0Dy-U46g_f0qOjP6eRCr4GnY3lbJ3HWe67Kn7echsmt37Em-kflSzSEjml3Jnp6dHqHD3JkofTcAzoOsEG5V0t0p9noOiGAEq6FxcoRNqN-cTm_jso1mA//?imgmax=800&quot; width=&quot;529&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 16:- Now the last step click the finish button and we are good to go.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTNmE_d7S6QtIwcfZANa_7ANHYVohrlkCUhDknsLp4aj_v_ouJ_CSi-ufaCCk2fdh_H3vOdCxyozVvGuCbfJ6XeCxd1UCKaOIP7m84RZRRYDJR3NqcCbsIPqq1WP8RP_YtYSwhYg/s1600-h/Actual_Deployment_5%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Actual_Deployment_5&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Actual_Deployment_5&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC1dj5s5HEzWxsarTHccUUk_iL59ZfVil3obizmmrPdHrWaWpX9beULoh-LlwCLyAXHJ6Hzu07RCr3yfPMgIKEtqfZo4r-DoBeinnUdQcBG1fB-5uzfSLkD5h8LSpkQ5MyazL3sQ//?imgmax=800&quot; width=&quot;524&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So all the above steps are for creating a deployment for package and then deploy in SQL SERVER. Now , I am sure your next question will be what now ?&lt;/p&gt; &lt;p&gt;So, now we call this Package in SQL SERVER Job and configure job which execute this package time to time.&lt;/p&gt; &lt;p&gt;We, will discuss it more in detail coming post.&lt;/p&gt; &lt;p&gt;I hope you will like this post. please do post your inputs.&lt;/p&gt; &lt;p&gt;Thanks&lt;/p&gt; &lt;p&gt;Raj &lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/532089656131382489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/532089656131382489'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/09/how-to-deploy-ssis-package-step-by-step.html' title='How to deploy SSIS Package ? Step by Step SSIS TIP #114'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGwlxQiKpb18VXObfgjMChs2eVxUsv1RLN1OSiV2_TH_lOFYPmkvP7x5T-ahV27KyNukSGrZKRMN_RfhYphy_0Acn504fwBFW7bXdo6NdW8mhYtJ97qLQhPOBJry8QYB9sCphAYw/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-1301481800308767314</id><published>2015-08-29T02:58:00.000-07:00</published><updated>2015-08-29T03:15:30.141-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Packages"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Integreation Services"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by Step ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Step by step SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips  Tricks"/><title type='text'>How to create first basic package with SSIS ? tip #113</title><content type='html'>&lt;p&gt;Dear friends,&lt;/p&gt; &lt;p&gt;In last &lt;a href=&quot;http://sqlraaga.blogspot.in/2015/08/wwh-of-ssis-zero-to-hero-in-ssis-series.html&quot; target=&quot;_blank&quot;&gt;post #112&lt;/a&gt; we understood &lt;strong&gt;WWH (What ,Why &amp;amp; How ) of SSIS. Now&lt;/strong&gt; , lets move now real quick in practical session where we will try to create a basic simple package.&lt;/p&gt; &lt;p&gt;The example which we are creating is well known &lt;strong&gt;Export data from SQL SERVER to a flat file.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 1:-&lt;/strong&gt;&amp;nbsp; Open &lt;strong&gt;SQL SERVER Data Tool from&lt;/strong&gt; start menu&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzluADfOLpi7xf7PLrbdpjN6GEsmPPlz0uXcSCrTjFqGpRYFuTN3SL5nDNHXRWQVJyJIhBWYj4XrRmE0eKlKmsQengind37hqqYMcwPL2ZFpkJbWL_Py9AyhSRnZGgTqEnQqOsFg/s1600-h/Sql_server_data_tool3.jpg&quot;&gt;&lt;img title=&quot;Sql_server_data_tool&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Sql_server_data_tool&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicO3F5wITzsLgoCYYTakaGjAeOZZACz30ka8GFZKO9MTS5Ua4pkmMUsRAmTi3jZqrYBzBI8M5CW9eGCa-e2Qqf9Jzxn2kaP4xcxgSDNFq0_wTcOQzkoPZDDqbyTfdFMd6j09QV0g//?imgmax=800&quot; width=&quot;329&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 2:- Once it is open create a new project by clicking new project option. You have to select proper template as highlighted in below figure and give a name to project. As shown in below figure&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiNMhMA7nRGeinxahiRWszG0xjIr5sSOaSl2QsUUC7VlHCTz9YMzaNLBlGsTEMqu1kIouJAVrEwA6gdBe8gf4dJTMW6IQn5-5KylNUS8Tgc7Y2sVYCcjhQ0JKFjrXsCDG7HdYLvQ/s1600-h/SSISCreate_Project_Indiandotnet3.jpg&quot;&gt;&lt;img title=&quot;SSISCreate_Project_Indiandotnet&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;SSISCreate_Project_Indiandotnet&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhex7RpdTDe3fX-MYkng3nUoWj0FBsNsjJ9EbK-UDQ_ue97zaUo7RwH0NjmqXerM4W7J5J4rhAhRUD1B0mO9TUNgdzd1DA2qF1m9Xo-91hC2zh3I3ETmd4egF9XPO2YUVkIwX3LCQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;397&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 3:- Now drag drop &lt;strong&gt;data flow task control&lt;/strong&gt; from &lt;strong&gt;SSIS toolbox. You can give customize message by click control’s &lt;/strong&gt;text. I prefer this habit so down the line if&amp;nbsp; after few month or years if you need to do some maintenance or logic change you don’t need to think a lot for why this control is for. &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6dxfweM6NQbD2hY8I3OASvLaJ96evnnQclKjaJZiceDrM_VnOlc8cj_uvOSSAld0VEyc-S5XmtH7cUGAO2VgJW4cgYHHCcJhFxDenZeAVtbzdSMB0hnbC7oFL-J8idP_4KOeydA/s1600-h/DataFlowControl_indiandotnet_13.jpg&quot;&gt;&lt;img title=&quot;DataFlowControl_indiandotnet_1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;DataFlowControl_indiandotnet_1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS0OfLwQCFAzZeQZSco2GKtKLOQYx1RASi-wzouVsY7U5NbFGrzXXgNQSUU4QAOTmYP-OR9c1F4fpCI60_PfG3gcZXE2QeL92h-Hh3UTvddHeyg9gl_05W4xUorUAi3i0TrwSJ4Q//?imgmax=800&quot; width=&quot;644&quot; height=&quot;156&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 4:- &lt;/strong&gt;Now double click on &lt;strong&gt;Data flow control&lt;/strong&gt; or click on data flow tab.&lt;strong&gt; &lt;/strong&gt;Now on this area you have to drag drop &lt;strong&gt;source assistance. When you drag drop it you will get a pop as shown below.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxzbN0VS5WcYZCasZ2F8WCq61ELujRfv6EC8UfhwGAQB0ysRPYuxPed8GF2edwszTV1H-9NxHe1OnChubDAq67FO9E6X5yEJG6kGWYuw62_bXMcK-LVHKMmJ6JGfCZpIHHIZpGzg/s1600-h/Source_Assistance%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Source_Assistance&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Source_Assistance&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEAgfF-Zo2mG1KEXm2Tz6Ev4fC_NPLaaV6W4uK-mXrraq3ih7Pq6RMi7sYLsdlLEOX-0qe1LmjH8L61-WPK8qj7wn-horZQJJzRCMpXl6PsObVIptEU3FyAMe8MhfYaPTylLgmtQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;322&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The screen source assistance is the way by which we can select the data source on which we need to perform operation.&amp;nbsp; As you are seeing in the image there are different data sources&lt;/p&gt; &lt;p&gt;Like SQL SERVER, Excel, Flat file, Oracle.&lt;/p&gt; &lt;p&gt;Although, you can select other sources also from SSIS toolbox as shown in below screen (As you are seeing there are various individual sources exists in toolbox itself so either use source assistance or drag drop individual source.It is worthless to explain here that excel source for excel file, flat file source for flat file and so on.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmh41Etb8Adh3Tpu1gBcp01ymtpNLkjSK0xdL5H6YxThXAS6ME-HSMV8Sp1b8oJ7LU7BcmT1JdpbQxIwKDXgAQxGZn6TeKYINHjf-IWVTShMSO-I19BfNB1tVLRMEmNogm2VGZlg/s1600-h/OtherSource%25255B9%25255D.jpg&quot;&gt;&lt;img title=&quot;OtherSource&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;OtherSource&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj57ZdgqNzB8U4wMj0R1s0Ml3ueirzpEMS9QD-J58JDYbjTSsBNmDR1TJ5dRvKFBxDvkrC4yF3xPxuwq51NkJnjo7KHzqh5XdWZta7kjr86HWjvcWYNvjNYx_LQGu7R5RT_BdfXQQ//?imgmax=800&quot; width=&quot;187&quot; height=&quot;234&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;In this example we are &lt;strong&gt;selecting SQL SERVER&lt;/strong&gt;. When you select Source Type then you have to configure connection Manager.For this we have to select “NEW” in connection manager panel and click OK button.&lt;/p&gt; &lt;p&gt;You will get below screen where you can give all the information related to&amp;nbsp; SQL SERVER by which our package can connect with that data source. below I am using my SQL SERVER installed on my machine and using AdventureWorks database as shown in below image.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTa-ZaLdulDLNbWqNo_TDu3ulu6eIhI8lYmfheULEPXa4O8RrnukNZr-Gh6jkU-eeYzqUKBaL8hJFmyxjWJViFFHYz6JohjhW8uXcAfWz59O6XySUhehuMlViGFLXNIupiqvayDw/s1600-h/SQL_Server_Connection%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;SQL_Server_Connection&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;SQL_Server_Connection&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHuaMRqImTTJ_lM_85pJAPNinuSjRn3MvXD0dx-7nGaW9wKu7Yduur_OMWMIDednJwksFSiInmKxjlLFBNLGLKrvOmBLSlbDWKSFWkkQZOzfpRsOzyfWNhYBJxb9FHHapg7EepDQ//?imgmax=800&quot; width=&quot;459&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Now once connection is setup. Now we have to export a particular table data in a flat file. but you are wondering which table or data which we are going to export.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 5:- &lt;/strong&gt;Now to select data which whether it is entire table, or stored procedure output , or view output or just simple SQL query. for this we need to double click on OLEDB data source and then we will get following screen.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2gPUHKdqP2Fp0kG2mbJLrd3wPtgsXc-DFaLLCMLvdXvlhTWQTHtqNa7LTF31A2PU4zn_MujJGqjN2KWn48ff6wUdWHeyxw3OSifZnSJLsPzZcHhxeSCKujT8MP56YFfm5Scuq8Q/s1600-h/OLEB_Data_Source%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;OLEB_Data_Source&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;OLEB_Data_Source&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz6R5pPiOaPfxadtnL01pFrRrgIynswRa4gn8OyS4JU8a8MNSVvixNi1nO5RU7TwAR4Q06hzfRWtNVA6ilwwgPkDp6H2Zder-CfhnmqX2NECWu3lJ-CtLJVbfntzDptmCfxqRHsQ//?imgmax=800&quot; width=&quot;553&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now ,here we can choose data access mode either table or view, or SQL command ,SQL command with variable. To make this first example easy we are choosing table or view and selecting “&lt;strong&gt;Product&lt;/strong&gt; table “ in below &lt;strong&gt;drop down for Name of the table or the view.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Step 6:- Now once you have selected table or view you can select specific columns which we need to export in flat file. For this we have to select columns option available on left side. when you click it you will get below screen.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUWjh07tVmp1-ONL5vqFbr0vInzC2eVeM7bWP3kR2NMoJCiDJ0alB5n8AG13D_BYVtxEgoIECRvLrQEcqlLx0h04cOH-rI21w4ydNsomFKlf7ZzBleExvVZlG_ZBAXLgHhQP6mUQ/s1600-h/Check_Uncheck_columns%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Check_Uncheck_columns&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Check_Uncheck_columns&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLbPwahgDpHjRozPxWPNSrnoESfegVgqHqYGfePYP6wNh4HDLVovfdNGLtF_EQcBeNBLV8tVIwmeBg_NohAwzlaJfpNvL7XGTbmTLlwhqDb27FEVt78qo4zAUaeYtoSro9-WIU1A//?imgmax=800&quot; width=&quot;603&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;As shown in above figure you can check uncheck the columns which you need to export in flat file. we can rename the column name as well (as I did standard Cost to MRP). If you see below image &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZQAKdtuWVvLy_nQFVizoaHrqaDj3NsUVheMGsN6HHak7Ld4J55cLZ5Kn5JAWodHqvFfTY42dy5qGd0Rp4-eGNZ7yqzeYe0FFb6YYgn6EzvtlhNcKZOmTJlz2cDq3VMPRyD0flpg/s1600-h/SELECTED_Columns%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;SELECTED_Columns&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;SELECTED_Columns&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlqnjeGsl2tJrG1IJJFqkn7kl7EVxTlbItGR_cZDF4sx7REVwW5Z7TFb_tDIbqMhhNlMfHhmfnASA93vaKp46iuuwuZTo6gA9oFEpHezM0pjT_78HVBPQTLrUQ7xJZIndL0Hrkkg//?imgmax=800&quot; width=&quot;595&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Here I am not explaining errorout option in detail in general sense just think it is configuration step if something failed.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 8:-&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Now, we have source which we need to export in flat file, for this we may require a destination file in which we can store the data. So, Now we drag drop destination control which will be a flat file destination control as shown in below figure.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit-YjjSNYvox8w1YDQIjAP4IbTCjAD4Hz4hg25ChE8sROTi3d2eyhCmuhUAIGgnLeBFoxhoWDBQH3QTbPpL79rlUx2ZLFsKmXM1pP2aRV5WWLUI8xKwHiiN72DdisPj4_f1eoOMw/s1600-h/FileDestination%25255B7%25255D.jpg&quot;&gt;&lt;img title=&quot;FileDestination&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;FileDestination&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqgnJd2r5ifOCVvJjcwn44xi5zFi15t32KA5yjmWRuC2ter5nlWD5Yfe-PKRrhHTEI8mgf-K8b4fBYwtIuJJRaARQ539bJXFfDUnd2jRQ-TKyhYovqYEbnX2TvM8tpD8R6EwcpGg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;299&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 9:-&amp;nbsp; &lt;/strong&gt;Now in above image you are seeing there are 2 arrows which is just flow direction means where the data needs to flow. Obviously in our case the data needs to flow from oledb source to &lt;strong&gt;flat file destination. So what we&amp;nbsp; need to do drag the blue arrow and release it on flat file destination as shown below.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibHWMoUhfu-wo5ZvqkBmGT5YkOqqM7c8HRE8PaLuqpMloSn-mK7LJ9EFHC_KuCu9c8WgggWiW254Qaz2Prc6BUxbkAWOp4j7DsaS4ADTaj-xIaRtNgE7wmBwGgK2_23E6ly11KRA/s1600-h/DataFlow_arrow%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;DataFlow_arrow&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;DataFlow_arrow&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEuBLUWxALFRZaiDZ5VuO3Tgnj72h6nuNuQllD3v7FgNqqQBTZipgVQ5iKkaG_fk9hsH52MMTCtYiYMD6w8VOapuMWF7WcO4mTaqE7H53O0mGGFd4kkIiwuL6nc77uGDJi0VcnVA//?imgmax=800&quot; width=&quot;580&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Step 10 :- I don’t know whether you noticed or not but let me tell you here. If you see above figure data is flowing from oledb source to flat file destination which is good but on same time there is cross image in red color which means there is some error in the control. So guess what is the error ?&lt;/p&gt; &lt;p&gt;I think you picked right the destination is not configured. So to do this we need to double click the flat file destination. &lt;/p&gt; &lt;p&gt;Step 11: When you double click you will get below screen. In which you need to configure the file location and file format like whether you want a delimiter file, fixed length file and many other option as shown in below figure. In our example we are using delimiter file option.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaw29Gbu_X7-Cjlt2sKoIb7OS6m4Y02RA4XMHuHiOKfDzqtpxIThfEG95a1EYhyamQIzWj_GW12cXdvwgJRyhhrepN6DhdZ1syz3b8zTycWQxzb1nZNz7jrm8d5tlZy_UHSBrEnA/s1600-h/flatFileOption%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;flatFileOption&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;flatFileOption&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLlKqk_VUygejOVBoko1F90qZq5bKv7kM0_2xFFXasQXRm239gC4XHYsVHR8Wzhz5u1EeTW_NANm1j7YmCW-MPoCor455yyZMz5jwPPo49YH4lYNDKfwI8hTrkRJ6I_O_NCc7eRQ//?imgmax=800&quot; width=&quot;562&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 12:- When you hit OK you will get following screen where you need to configure as shown in below figure. You need to give file location with file path. if you want different delimiter the you can choose that also. &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglGCJxDplBLs81q_NjhlpdxnW73VLQ92fg35Ov4gJnqakkwQPADKCh1TCH4Va-5v8Eh2oIhLO_1AH49qxL6yQHkHjg8ie09htSNroBefdPo5LP9Io8Lj6sOxEIKbJUPfwY7d1DCg/s1600-h/FlatFile_Detail%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;FlatFile_Detail&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;FlatFile_Detail&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY5utkbZ7R6CunRcI4B5H1tuVKZjmyfMqQcdaIm14xMBoXP79BzPKtGV_6RpStU-Uuy9yKu6U0zyTA8NRMUWqzydQj0TGTrBR_ycozEWXZwrewIwOmiIVmWSTl3X2VYoy_KwW_bA//?imgmax=800&quot; width=&quot;546&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 12:- Now press OK you will get flat file destination editor in which you can select mapping option and just check it for your query whether all the selected columns from source are aligning or not.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinev8MbwLXgmA-EnOQWrtoN8RENpeFCM9Hgp671mQlZ1Nglq7bXNA7KtkDrmE6Peb0PHzYQbCo_R7sZXuGCRGkavhduCeS7uWvceSyQJp4Fa_ALpmIEiEAm1xnmaZHWITnbBil7w/s1600-h/Mapping%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Mapping&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Mapping&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBqt6bUwCawaxSrk6NbZ8LXLocnVKAkOOlf-8BL3CPLBP7r6zxouYk2riQAkvIU8UvPshzcZo0RQjAuDkV-XKPsr5PK6F1PFZhV5htjVBsCvSvS6hnL51iYQImt86s9YdisQwAlQ//?imgmax=800&quot; width=&quot;601&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 12:- Once we done with this you will see the cross image in red disappear. If you are still seeing this it means there is something going wrong with configuration.&lt;/p&gt; &lt;p&gt;Now if everything is good then we can run our first own created package by pressing F5 or with Start option in IDE. &lt;/p&gt; &lt;p&gt;Step 13:-&amp;nbsp; If everything is correct you will get right check in green apart from this you might be interested how many rows transfer from source to destination so that information also can be found. see below image for detail.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgsKxq-uRXXrZ-a9hJHbF9i0vJelp97j9HhlGvsPSjUqTjewKpJgBVNrBXBO6X9PaXSpjHohX8zPjdnaYmRZRKlDK091m45dxkwkQ77Zy8truH4dc9DRxLjhwfKPI4ksL2ikYIbQ/s1600-h/RunPackage%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;RunPackage&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;RunPackage&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW1O8GETHXAHelQEjd7DN9g-81VsDbNRqw5qFVuqiOAPjcULyNLjP3Ut72ejzPjWm-rQqNChwnhF2k7JgtDU68nj9YtkLEixROBbpNCGTlNLSvsH6vklMvWm51PRDcg_zT3jzEMQ//?imgmax=800&quot; width=&quot;621&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;In our case we moved 504 rows. Now lets cross check at the destination location as well whether the file is created or not with these 504 rows.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3s-et8NsKsdy3NuQE9FbKCDanBWAAYRAXFKAiW1OJaf0gX55I71Zyr-CtR2c2uZLGalP-CWm_Nsq6VvxNmli5xoZVrUwVUPhitRE8Ii2sKQM3eXdMIHvQXw2Abr5ErmEe4BnmUA/s1600-h/resultFlatFile%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;resultFlatFile&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;resultFlatFile&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk8PpXtminVnwfutRLEbq35yXY_rrHtwJWWrvR9b_FwOonB-GoTJ_1To17SCTDyvpM5P0WtQpQa-BCFZFrR7zxXZO4qNWlKWWJ1r69YkYZFdUVENpXzghyphenhyphena4Y0BdKIOzhvQXqYJg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;229&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;WOW , we did it . We created our first simplest package which is export data from SQL to flat file.&lt;/p&gt; &lt;p&gt;I hope you enjoyed the learning. In next step we will do something more advance. mean while I request you all to do same practice and try to use excel instead of flat file. &lt;/p&gt; &lt;p&gt;Please do write your inputs. Let me know whether you are enjoying this series or not.&lt;/p&gt; &lt;p&gt;Enjoy !!!&lt;/p&gt; &lt;p&gt;RJ!!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/1301481800308767314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/1301481800308767314'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/08/how-to-create-first-basic-package-with.html' title='How to create first basic package with SSIS ? tip #113'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicO3F5wITzsLgoCYYTakaGjAeOZZACz30ka8GFZKO9MTS5Ua4pkmMUsRAmTi3jZqrYBzBI8M5CW9eGCa-e2Qqf9Jzxn2kaP4xcxgSDNFq0_wTcOQzkoPZDDqbyTfdFMd6j09QV0g/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-465513267034784729</id><published>2015-08-24T20:07:00.000-07:00</published><updated>2015-08-24T20:55:54.006-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql Server Integreation Service"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips  Tricks"/><title type='text'>WWH of SSIS Zero to Hero in SSIS series (How to Use SSIS ?) TIP #112</title><content type='html'>&lt;p&gt;Hello Friends,&lt;/p&gt; &lt;p&gt;Welcome, back to Zero to Hero in SSIS series&lt;a href=&quot;http://sqlraaga.blogspot.in/2015/08/zero-to-hero-in-ssis-sql-server.html&quot; target=&quot;_blank&quot;&gt;(Post #110).&lt;/a&gt; In last &lt;a href=&quot;http://sqlraaga.blogspot.in/2015/08/wwh-in-ssis-zero-to-hero-in-ssis-series.html&quot; target=&quot;_blank&quot;&gt;post #111&lt;/a&gt; ,We gone through the &lt;strong&gt;WW (What &amp;amp; Why part) of SSIS&lt;/strong&gt; in this post we will try to understand&lt;strong&gt; How to start SSIS ? How to use SSIS tool ?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;You can start SSIS with &lt;strong&gt;SQL Server Data Tools&lt;/strong&gt;&amp;nbsp; which you&amp;nbsp; can find in &lt;strong&gt;Microsoft SQL SERVER 2012&lt;/strong&gt; folder in start menu. &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIFw3rihM32qac987PZYjgxTy1t3hEQMZd5Ys_Nma7YZuynvhz4WUFsfSmlZjWwRyAhLWP8_6iYZLWJOiw_qooXneXauCrn5JidFHcm4kOPjxzLMpZu2TphM2lmvwFOQo2z44RjA/s1600-h/SSIS_With_SQL_SERVER_20123.jpg&quot;&gt;&lt;img title=&quot;SSIS_With_SQL_SERVER_2012&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;SSIS_With_SQL_SERVER_2012&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMtDhHnRpZ5dRWhwP1df5EyYQSPaVJwMiISMQyYp8sdG4AGho4unw6OhyPlazuY01IuDT45__kcw77M6xKTPlomWXR7YBt32Vra0FamVsV7gl0NED8Y2dIqI16OZMJsLcE2oH8pw//?imgmax=800&quot; width=&quot;397&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Here only the name is different but you will find same Visual Studio IDE when you click on this SQL SERVER data tools icon.&lt;/p&gt; &lt;p&gt;In the IDE when you click on &lt;strong&gt;New Project option&lt;/strong&gt; from &lt;strong&gt;File Menu&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7wXgAqlhP7JYK2LuuhIGK8fVXX3hjWkpiJIWOWPeyKduzlF7NKyiLovlSzO_5w_0-7L3awrLaM-sk3NCZbmh6IBzt3Qv99sLjC5eovzN6H7dBZsKVS-TtJAZpfcJj_tuSyPaHhg/s1600-h/New_project_option3.jpg&quot;&gt;&lt;img title=&quot;New_project_option&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;New_project_option&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoyehSeccxOpj17F8fY4XaRdCjFrW8pA3dsjm_UvEpq6xT-hq-rv4xAly95vnOuwKStvmFnKXtCc7AAjvwJBUW34WM2pmSkwZY7iWnTsx0_Y937L5MvdBUCLkFZzNboOfbkuQcCw//?imgmax=800&quot; width=&quot;644&quot; height=&quot;263&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;You will get below screen in which you need to select &lt;strong&gt;Business Intelligence template&lt;/strong&gt;&amp;nbsp; and then select &lt;strong&gt;Integration Services. &lt;/strong&gt;You will get two option&lt;strong&gt; “Integration Service Project” &amp;amp; Integration Service Import Project wizard&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj7lLnws1TaOMP0tzJn6ZrRnERXM2t1t2xQe-bZvRE6ngWbvM4j6zX8udSR-M80S2dgCY4TIrdTSNM9yQtesoUN4kU9Mn8WmXKjaDzDv20fNbZ27ywwDZglz43svyahlCUgKrK_g/s1600-h/Ssis_templates3.jpg&quot;&gt;&lt;img title=&quot;Ssis_templates&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Ssis_templates&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3uNeqZH_GTR6yXD5awn7bvlNt594mqcFS4mNHVPVo1XE3CD0bsiGzLEOvf3OUlk9zysXP4LfcnEtJmUyTXRJ31HDBa0FZnz0c0moOiJfCNXmYHu_keVUngH4haXESEP6C8D95NQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;394&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now, We can select any template and proceed further. In general we select &lt;strong&gt;“Integration Service Project”&lt;/strong&gt; . Here I am going to share some basic components when you try to create&amp;nbsp; SSIS Project.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;Don’t bother if you don’t understand the definition of explanation given below. I know theoretically it might be hard but practically it is much much easier.&amp;nbsp; &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV4Ya3WaQeQfMulTWjoNr_XoUohrAlzRVIeuFnyo-xJBDY6FWxu9T-i_rNLRSgbX8K1dB1w6kDlGFV2uLJ_dvs2ckvyPeww6lw4zq0Gq3rlUXT4rnh_JoOQX1VHptxqBeJRa0V_Q/s1600-h/Basic_Concept%25255B4%25255D.jpg&quot;&gt;&lt;img title=&quot;Basic_Concept&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Basic_Concept&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUtaJyobSRM-_y4zLZ8lvIVDwSVfsfgYsg4uscpyd3AyICzSdUJHCxBz9ugOqbQAB3zQp_Ipdi0XkwaNN_p8rxM4_rBzEHtUmji-Mixu851OBUVT80z4f8I6jK2bIyayq_HGtwHQ//?imgmax=800&quot; width=&quot;550&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1) Control Flow :-&amp;nbsp; Control Flow&lt;/strong&gt;&amp;nbsp; is one of the most important component. Think this as as a container which helps in workflow. If you see below image &lt;strong&gt;Control Flow is first tab&lt;/strong&gt;. It might contain tasks or container. It is helpful in sequencing of task (where task can for loop, send mail, xml process,etc.)&amp;nbsp; Below is container tools which we can use.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiduZzfYP13XUQf_DUh0V1uEmuWvRi3tfOb_WVswmYTm5jIdeRrvTynoUOqyrD2sMfMya9EKe5XhiTX-PcvcyIofP8Gbb7WrEOnqfHL8t4RG2XsGPkLXru-rwIzLq6e8CaCoa9rqw/s1600-h/ContainerTool%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;ContainerTool&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;ContainerTool&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX01ZhmOFSMpGsfZzVvQ6GHy8hAqKg7vHEu9fJ4pybCkps6-p0qW892XCF9zkUN90kPlrJOqKtMi1fUcB5nx8X7534htRyiHV8OtFubQ9CK814TEwqMdIGsFJz2_jOXbqkkOb09w//?imgmax=800&quot; width=&quot;279&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2) Data Flow Task :- &lt;/strong&gt;Another most important component is &lt;strong&gt;Data Flow Task.&amp;nbsp; As &lt;/strong&gt;the name state it is a task in which data flow. Isn’t it simple ?&amp;nbsp; A data flow is part of Control Flow Task. All the major operation can be accomplished with the help of data flow task controls. When you use DFT(Data flow task) you will get various option like &lt;strong&gt;Data Sources&lt;/strong&gt; (from where we need to fetch data) ,&lt;strong&gt;Transformation controls&lt;/strong&gt;( Operation control like aggregation, split etc.) by which we can customize the data and last but not the least &lt;strong&gt;Destination &lt;/strong&gt;in which format we need the data back like SQL Server, MYSQL, ORACLE etc. (We will discuss each DFT controls in detail in coming posts). Below is DFT tools which we will use later on.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOuR-SNv3Dv1R01kvak5x1P8f27ks7ufOL7aAS2g0dBXomywwKABsul6TpJW4kitJfhOyYHoygw-tgb2ybGY4vNan6ipe2K3BRM-W1xaqjUfdXiWFSpdiT9aU1TH5yXWzmEMyBzg/s1600-h/DFT_tools%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;DFT_tools&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;DFT_tools&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm1i2udE7N3IMtKXabUt8wJaDZtEXJl7lDiLehxVVjvODR5rCUQUiwiybCyOCgqGfY10yIAdCUhRuLgVhcGxQ3M7rXkBLYXAzeON9px2X1X_8ySfiCboumYHeDW6ViCrXKqHL6gg//?imgmax=800&quot; width=&quot;233&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;3) Parameters:- &lt;/strong&gt;I am sure you are aware of this parameters. Parameters are variables which help you in execution of your business logic (it might be possible you might require or not require.). Parameter has different scope and according to our need we will use and define the scope. not to worry about this as well right now. We will discuss and see practical use in coming posts. Below is the screen from which we can add parameters if required.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFszlJg0gJ5LVcACWYwjWrYcjmzX4sMHWmTSpW266KhS4WhjQwR6j41OkdNBVE9O9R92k6EnsZDqksr_MZI6srImrT3eTmwc_O2xDzAFAI2iAi0DAhYqY3wd1m6Zrkw263VeY2gg/s1600-h/Parameter_Add_screen%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Parameter_Add_screen&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Parameter_Add_screen&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8dlNPGEntQH2asx9hRjcmiu-OdgLJpc9yCkkhZdNf4EGC9Pi3grqKnq2nR0uwniZhu_6MaGxJPSiNme6Y9LQefJNF9qIV1bZASYVhHIm3yZyDZQhJrFdh8DL-LaSc0ZX9VuueVg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;171&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;4) Event Handlers:- &lt;/strong&gt;Event handler is the easy way to have control over your SSIS events. We can have different events like onError, onPostExectution etc. which give us liberty to improve the reliability ,monitoring&amp;nbsp; and auditing of a package closely. We will surely going to do demo for this. &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir7ECSAehyceKK8XZrvELrKQEjtzuABaQphjnW7vPtDSgQUM9xxkS-gI2jAC349N6LqZ2kNvJBqssaThkyizSbTea6aX5rJuGuUeZLayPQq8a68wbCUl0r-1LLNF_yvecqMfP8qQ/s1600-h/Event_Handler%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Event_Handler&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Event_Handler&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb9NOrJ9kUtQPKWcOKDhjGlBJ2_hNzxf38hQSFzl8yPrV4Il0qiWuKMCK31AraSyArZX794X2Ut0woFprXOIr0Hl8Ds5wwHqZbbG6Q-gzOY5IlJSV-PSq_AnekfGzDHeWlUxigUg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;225&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;5) Package :- &lt;/strong&gt;The final output of all the above core component is a &lt;strong&gt;Package. &lt;/strong&gt;In other word Package is combination of various Control flow, Data flow tasks , parameters to achieve a ETL task. Earlier the extension of package was DTS and with latest version it is DTSX. If someone ask you what you do with SSIS tool you can simply say we create Packages in which we use different control flow &amp;amp; task flow control and once it is completed we deploy the Package. The important point here is we create a Package and then execute it by deploying.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN6E14p67ilBaAwFPQRJJLzV68rErxJWwDhYvXFjIPeNI0QhVDzFt0STw187r99tyFFOHWd1Ydk_-Vp5JAleUqXW2FFZLR61dI6daNTCFQI0z6IgB_PgvgOC2mZ2pfDI6KaAfmCw/s1600-h/DTSX_Package%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;DTSX_Package&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;DTSX_Package&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBVNXeo6tcRvmksewDJh16076GfnfhT1_n2s8qEPXBgI2Jf1fTG0ZM0BcDKZRQqIfEuFpA-E9aMokFh2eFco7E-VyMdBknsk9zoHN1BEqq16wVsxY_oOoYQpiL8H-vyd9vRL1fuw//?imgmax=800&quot; width=&quot;436&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Now in broader way if we envision it. Below picture might help you to understand it.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv-XnMaQMHUPjpP039qUklnwdSZNH9aRLarNq3HZ56gwHg_Gjtmtwn58shwnz5ZYdFwQCd749isZ5Ruxq0umqa29zOxy63gQUeqxi-3DwRFti78Nz-VmZgFlY0x6DtEBLRlQ9Hag/s1600-h/Package%25255B6%25255D.jpg&quot;&gt;&lt;img title=&quot;Package&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Package&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpLoSbQyF_Apz0nZ9J-Op89wK8IuTKtOT8Mhu0k7tSazZD12QmZfYN1PIiwj83CZ0_g37DtgXVWUFOa60o9UWi7gkS94ToB2sFtUPKQJLJYy-WA2-mRr42evIp-vrKFw8E_zc5FA//?imgmax=800&quot; width=&quot;644&quot; height=&quot;340&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;In Next post we will go one step ahead.&lt;/p&gt; &lt;p&gt;Please do provide your inputs what you are thinking so far ?&lt;/p&gt; &lt;p&gt;Enjoy !!!&lt;/p&gt; &lt;p&gt;RJ!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/465513267034784729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/465513267034784729'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/08/wwh-of-ssis-zero-to-hero-in-ssis-series.html' title='WWH of SSIS Zero to Hero in SSIS series (How to Use SSIS ?) TIP #112'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMtDhHnRpZ5dRWhwP1df5EyYQSPaVJwMiISMQyYp8sdG4AGho4unw6OhyPlazuY01IuDT45__kcw77M6xKTPlomWXR7YBt32Vra0FamVsV7gl0NED8Y2dIqI16OZMJsLcE2oH8pw/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-5030942417750789448</id><published>2015-08-22T02:20:00.000-07:00</published><updated>2015-08-22T17:59:18.769-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Integreation Services"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips  Tricks"/><title type='text'>WWH in SSIS ? Zero to Hero in SSIS series TIP#111</title><content type='html'>&lt;p&gt;Dear Friends,&lt;/p&gt; &lt;p&gt;As shared in last post &lt;a href=&quot;http://sqlraaga.blogspot.in/2015/08/zero-to-hero-in-ssis-sql-server.html&quot; target=&quot;_blank&quot;&gt;Post #110&lt;/a&gt;, We are starting &lt;strong&gt;SSIS tutorial&lt;/strong&gt; &lt;strong&gt;series ( A Step by Step&amp;nbsp; SSIS learning tutorial) &lt;/strong&gt;from today. &lt;/p&gt; &lt;p&gt;Before starting anything we might have some questions like &lt;strong&gt;What is SSIS ? Why SSIS ? &amp;amp; How to use SSIS&lt;/strong&gt; ?&lt;/p&gt; &lt;p&gt;In general term I called this &lt;strong&gt;“WWH” What, why&amp;nbsp; How ?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;So, the straight forward answer is &lt;strong&gt;SSIS is SQL SERVER Integration Service (a Microsoft tool). It&lt;/strong&gt; generally comes with SQL Server license. Although It is not always mandatory to have this &lt;strong&gt;SSIS tool with SQL Server license,&lt;/strong&gt; You can install it &lt;strong&gt;standalone as well&lt;/strong&gt;.&lt;strong&gt; SSIS is a ETL (Extract Transform&lt;/strong&gt; &lt;strong&gt;loading&lt;/strong&gt;) tool. We can can use &lt;strong&gt;SSIS with IDE&lt;/strong&gt; which&lt;strong&gt; provided by Microsoft&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;Now, I understand this is too straight forward and we are not able to digest easily. Let me explain it with an example.&lt;/p&gt; &lt;p&gt;I am leaving in &lt;strong&gt;Indore &lt;/strong&gt;a&lt;strong&gt; city reside in Madhaya pradesh a state in the heart&amp;nbsp; of India&lt;/strong&gt;. Suppose the&lt;strong&gt; Chief Minister of MP&lt;/strong&gt; allocated some funds to Municipal corporation of&amp;nbsp; each cities like Indore, Ujjain, Bhopal etc. to do whatever best they can do with money and make their city a better place.&lt;/p&gt; &lt;p&gt;After few years The Chief Minister realized and thought let’s ask each cities how they utilized the money.&lt;strong&gt; What are the different areas on&lt;/strong&gt; which they have work with the provided money. &lt;/p&gt; &lt;p&gt;The chief minister wants consolidate reports (which we generally called MIS reports) as well as some detailed reports. &lt;/p&gt; &lt;p&gt;Now, suppose different municipal corporations using different ways to restore data like Indore municipal corporation using &lt;strong&gt;Microsoft SQL SERVER&lt;/strong&gt;, Bhopal municipal&amp;nbsp; corporation using &lt;strong&gt;ORACLE&lt;/strong&gt;, Ujjain’s municipal corporation using&amp;nbsp; &lt;strong&gt;MYSQL&lt;/strong&gt;, Devas municipal corporation using &lt;strong&gt;flat file system&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;So there might be different &lt;strong&gt;heterogeneous systems&lt;/strong&gt; used to maintain the data and data would be on different verticals like Transportation (Road &amp;amp; Bridges), Water harvesting (River&amp;nbsp; &amp;amp; tanks) ,Agriculture , lighting etc.&lt;/p&gt; &lt;p&gt;To grab this entire data &amp;amp; consolidate them in one single database and providing the reports to Chief minister so that he can analyze which city doing progress , which city consuming money , how much work done in different vertical so that , he can take further decisions.&lt;/p&gt; &lt;p&gt;I hope you understand&amp;nbsp; a big problem here which is &lt;strong&gt;gathering data from different heterogonous resource &amp;amp; compile&lt;/strong&gt; them and provide a unique data base on which reports will create is a big task which can be easily done by an &lt;strong&gt;ETL (Extract Transform Loading) tool&lt;/strong&gt; which is &lt;strong&gt;SQL SERVER Integration Service Tool.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Here Extract means extract or &lt;strong&gt;fetch data from different resource or data source whether it is SQL SERVER, ORACLE, MYSQL&lt;/strong&gt; , Flat file or any other source&lt;/p&gt; &lt;p&gt;Transform means &lt;strong&gt;converting the data in to required single format&lt;/strong&gt; &lt;/p&gt; &lt;p&gt;Load means &lt;strong&gt;prepare the data and provide final output.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Below is the image which illustrate same thing which we discussed earlier in this post.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAaUQMwR8R45qbFiLYTe_KG077llvkmQsofLzrpBLT-2HlJqkzW5h6qXzgS0Gu_oGwLPpkhSvZAtLfQA0mJcVSkmxiCzbvbh2KNwbnC6Kzu4elmyMP7_tDT-a0OZ9Auh6RrXRWsA/s1600-h/ETL_First_image_By_Indiandotnet3.jpg&quot;&gt;&lt;img title=&quot;ETL_First_image_By_Indiandotnet&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;ETL_First_image_By_Indiandotnet&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDee2shotFh8EXf90M9Ovhx2iJ4zewGlw8oqe2hR8glwgIm1XsoFa9ibUjX1E8euegRgQlleQLCgZSh0hHJT7SG9XkmuY2V3wn1pxpxaaUSP6gHdUMSkEXo1cPIlw5n48MDqUiBg//?imgmax=800&quot; width=&quot;471&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So , I hope you understand the &lt;strong&gt;SSIS (ETL) role here&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;Remember here SSIS use here to provide the data only rest work will be done by &lt;strong&gt;SSAS (SQL Server Analysis Services) and SSRS (SQL SERVER Reporting Services)&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;In this post we got 2 answers &lt;strong&gt;1) What is SSIS ?&amp;nbsp; 2) Why is SSIS?&lt;/strong&gt; we will see&lt;strong&gt; How to use SSIS&lt;/strong&gt; in next post.&lt;/p&gt; &lt;p&gt;Till than&lt;/p&gt; &lt;p&gt;Enjoy !!!&lt;/p&gt; &lt;p&gt;RJ !!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/5030942417750789448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/5030942417750789448'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/08/wwh-in-ssis-zero-to-hero-in-ssis-series.html' title='WWH in SSIS ? Zero to Hero in SSIS series TIP#111'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDee2shotFh8EXf90M9Ovhx2iJ4zewGlw8oqe2hR8glwgIm1XsoFa9ibUjX1E8euegRgQlleQLCgZSh0hHJT7SG9XkmuY2V3wn1pxpxaaUSP6gHdUMSkEXo1cPIlw5n48MDqUiBg/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-2506192199697487797</id><published>2015-08-17T21:12:00.000-07:00</published><updated>2015-08-17T21:15:39.407-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql Server Integreation Service"/><category scheme="http://www.blogger.com/atom/ns#" term="SSIS"/><title type='text'>Zero to hero in SSIS (SQL SERVER Integration Services) TIP #110</title><content type='html'>&lt;p&gt;Recently, Many friends of mine are interested in learning SSIS so , I thought to write some blogs which might help them.&lt;/p&gt; &lt;p&gt;I selected following area on which I will write blog on SSIS. It would be great if you also share your inputs.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 1: WWH of SSIS &amp;amp; Architecture of SSIS ? (What , Why, How )&amp;nbsp; &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Once you understand What, Why, How you are curious to know how to create a basic program /package in SSIS. I am sure you might have used this basic SSIS package but you might not aware (Import/Export) in SQL Sever.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 2:- How to create my first basic package using SSIS ?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;With step 2 you will be more comfortable and confident that you can create package. Once your first package is created the next step which I think&amp;nbsp; is deployment. How to deploy in real world and use it.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 3:- How to deploy SSIS package and different way of deploying ?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 4:-&amp;nbsp; How to create basic data flow task package ?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; With data flow task we will try to understand below common controls as well&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.a – Data Conversion&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.b -&amp;nbsp; Conditional Split&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.c – Derived column&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.d – Lookup&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.e – Merge &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.f – Merge Join&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.g- Multi cast&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.h – Row Count&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.I – Sort&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.j – Union all&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.K – Others (remaining)&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 5:-&amp;nbsp; Understand For Loop Container &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 6: Understand for each Loop container &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 7: Sequence&amp;nbsp; container &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 8:-&amp;nbsp; Bulk Insert Task&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 9:- Script Task &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 10:- Web service Task &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 11: XML&amp;nbsp; Task &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 12:- File System Task &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 13:- Execute Process task &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 14:- WWH variables? How to define application variable ?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 15:-&amp;nbsp; Performance improvement of SSIS Package &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 16:- Interview questions related to SSIS&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;I hope with above blog steps those my friends will be benefited.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;I appreciate your inputs as well what else we can include in this series .&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Enjoy !!!&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;RJ !!!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/strong&gt;&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/2506192199697487797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/2506192199697487797'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/08/zero-to-hero-in-ssis-sql-server.html' title='Zero to hero in SSIS (SQL SERVER Integration Services) TIP #110'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-4317114108752298287</id><published>2015-08-12T21:59:00.000-07:00</published><updated>2015-08-12T22:05:20.253-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dynamic queries"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL"/><category scheme="http://www.blogger.com/atom/ns#" term="sp_executeSQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Feature"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Instance"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Security"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips  Tricks"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><title type='text'>How easy or difficult to write dynamic SQL ? TIP#110</title><content type='html'>&lt;p&gt;This is one of the challenge for most of the developer to write dynamic SQL. Generally we follow the approach of string concatenation. &lt;/p&gt; &lt;p&gt;This seems very easy but we need to cast the&amp;nbsp; parameters in VARCHAR and sometimes we stuck in single code. &lt;/p&gt; &lt;p&gt;I am sure this happened with all of us.&amp;nbsp; &lt;/p&gt; &lt;p&gt;Let’s understand first a straight forward way which we (most of&amp;nbsp; us) are&amp;nbsp; using.&lt;/p&gt; &lt;p&gt;In example I am using person table of Adventureworks database and it is just a simple query&amp;nbsp; which provide person row according to primary key.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE6uPHKYjDjUbGerZaQZXoqLvC3msz9ukHCwRCPvsoUcvLaZnzGD3DBFcb1fRvhSfOIOFCMes3eOo4fPoVSTqBsqSz53qEVhCEdtM7i36qM8XW-sEieVRHFp6DQkXMxOkQvirUIw/s1600-h/Dynamic_Exec%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Dynamic_Exec&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Dynamic_Exec&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFllFX2BcYovKn83coYierkk16o9UrKd5G6tfy9cWlO4nAuHfy9QJfNsnmpfAcIpl2fXRBkVGRASQVeDxLeYMJSrpl7cdoMHbFPw3b90ebEfGXP2glgBM1BMqajpLvQkyUcq_7RQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;229&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now the above query is OK but it can be write in much better way with one of the SQL server in build stored procedure which is sp_executeSQL. This is one of the best way which have certain advantage which will discuss in next tip. Now see how we can write above query in much better way &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlbW8ffIM8345xFBRtw6lxugpc3XXiEyXfOHR9k_RzRj3O_SdryCj7RDyBPwKMTItq1UVycXEhAatS4eM8lTvCyvHVPRaxr6YqoQfFe4D-aIN91BS_M5kcbDpLzluGsTu4cagGUg/s1600-h/sp_execute_SQL%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;sp_execute_SQL&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;sp_execute_SQL&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHkBgU2BjzehfZzExaAlwnK_SadbrjEureeIGbdALtYtIaIbSuNGsttNKANZezr5RC67TEDKAiA9PprbxaPvFMo6Lh7RnZRL-G7feJ_cdVD8CYPpvxE4t-YyapZVVoiNaQkpK-wQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;192&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;DECLARE @BusinessEntityID&amp;nbsp;&amp;nbsp; INT &lt;br&gt;DECLARE @DynamicSQL NVARCHAR(200) &lt;br&gt;DECLARE @Parameters NVARCHAR(100)&lt;/p&gt; &lt;p&gt;SET @BusinessEntityID = 1 &lt;br&gt;SET @Parameters =N&#39;@ParameterBusinessEntityID INT&#39;&lt;/p&gt; &lt;p&gt;SET @DynamicSQL = N&#39;SELECT * FROM [Person].[Person] WHERE BusinessEntityId = @ParameterBusinessEntityID &#39; &lt;br&gt;EXECUTE sp_executesql @DynamicSQL, @Parameters,&amp;nbsp; @ParameterBusinessEntityID &lt;a href=&quot;mailto:=@BusinessEntityID&quot;&gt;=@BusinessEntityID&lt;/a&gt; &lt;br&gt;&lt;/p&gt; &lt;p&gt;If you see above query, you will find we are not using any type conversion the statement is clear.&lt;/p&gt; &lt;p&gt;This is one of the best way to write dynamic query which is not only increase your statement’s readability but also increase performance of your query with certain amount.&lt;/p&gt; &lt;p&gt;Which we will discuss in next tip.&lt;/p&gt; &lt;p&gt;I hope now you are eager to use this and replace all your old fashion dynamic queries.&lt;/p&gt; &lt;p&gt;Please do post your feedback.&lt;/p&gt; &lt;p&gt;Enjoy !!!&lt;/p&gt; &lt;p&gt;RJ !!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/4317114108752298287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/4317114108752298287'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/08/how-easy-or-difficult-to-write-dynamic.html' title='How easy or difficult to write dynamic SQL ? TIP#110'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFllFX2BcYovKn83coYierkk16o9UrKd5G6tfy9cWlO4nAuHfy9QJfNsnmpfAcIpl2fXRBkVGRASQVeDxLeYMJSrpl7cdoMHbFPw3b90ebEfGXP2glgBM1BMqajpLvQkyUcq_7RQ/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-8618735868826039009</id><published>2015-08-09T20:53:00.000-07:00</published><updated>2015-08-09T20:56:37.742-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IS NULL"/><category scheme="http://www.blogger.com/atom/ns#" term="ISNULL"/><category scheme="http://www.blogger.com/atom/ns#" term="NULL"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Feature"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Instance"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><title type='text'>An interesting setting for NULL but don’t use it for future TIP #109</title><content type='html'>&lt;p&gt;As we discussed earlier in &lt;a href=&quot;http://sqlraaga.blogspot.in/2015/07/it-is-ok-its-null-only-tip-103.html&quot; target=&quot;_blank&quot;&gt;TIP#103&lt;/a&gt; for NULL in which I shared that we have to take extra care for NULL.&lt;/p&gt; &lt;p&gt;Now in this tip I would like to share one of the interesting setting for NULL. Although it is just for knowledge but don’t use it because it is deprecated in future version and by default you this setting is always on.&lt;/p&gt; &lt;p&gt;Still you are thinking for which setting I am talking about.&lt;/p&gt; &lt;p&gt;So , I am talking about &lt;strong&gt;“CONCAT_NULL_YIELDS_NULL”&lt;/strong&gt;&amp;nbsp; . Let’s understand it by following example . By Default &lt;strong&gt;CONCAT_NULL_YIELDS_NULL is ON which means if anything added to NULL will be null as discussed earlier in our tip #103&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE5oWISvAxvBRc2LuSJIFcP05JWCliKORXFlSiJi4iRZmUCLHplxV7OAs8DlSgJ-bz3nfpri2i0HOXcz1FOv2pfCOgg5q4tWmZGKpicBJEb0Oe2zCKUfGCQUtDfsV1PpC96XphBA/s1600-h/SET_CONCAT_NULL_ON_INDIANDOTNET%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;SET_CONCAT_NULL_ON_INDIANDOTNET&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;SET_CONCAT_NULL_ON_INDIANDOTNET&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQOcFEb_pKLyy48Z-YIYJXsRsVNsVgsrJv7M0zEON3c7H3M-mKGNrjfTCnwCdj3c9nnglkdyrOCaEoqJrw60KyHbLEmuuW3fi-fGSjkwRnQd3txMDrrYzqf2oYVUc9JvktlYXXlQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;380&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now, see what happens when we do it &lt;strong&gt;OFF.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjkV17jnk7nUM8X2YQGE7NYpBFa_EakUD9tbhbD6HszVmh7ZCHDiNzX2l2JF6iZCRLVK0W1Xth0vVySRZoo4bo-8br2wK6FX32ku36FFZ7KW_WfolREVb3r6jBykMy9MMg7h6G7w/s1600-h/SET_CONCAT_NULL_OFF_INDIANDOTNET%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;SET_CONCAT_NULL_OFF_INDIANDOTNET&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;SET_CONCAT_NULL_OFF_INDIANDOTNET&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNexA0z0BgrBe0D51g0GDxX8iTgmmyRdyVLjGak85CEhwq384SQBE7kziIFheYup2PPjhU5VZo-SGkNYcRaV_TG4Tk_Y5iNgWxBiQf7cjsd_NRHWc9HLi-nmSNV7pkFDQyTNkDNg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;359&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So, We clearly saw in above image&amp;nbsp; when we set the CONCATE_NULL_YIELDS_NULL property to OFF it dissolved the &lt;strong&gt;NULL property.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;My take on this property is that we should avoid it don’t try to make it OFF explicitly because if we do this then we explicitly breaking some hidden business rules.&lt;/p&gt; &lt;p&gt;I hope you will like this post.&lt;/p&gt; &lt;p&gt;Enjoy !!!&lt;/p&gt; &lt;p&gt;RJ !!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/8618735868826039009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/8618735868826039009'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/08/an-interesting-setting-for-null-but.html' title='An interesting setting for NULL but don’t use it for future TIP #109'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQOcFEb_pKLyy48Z-YIYJXsRsVNsVgsrJv7M0zEON3c7H3M-mKGNrjfTCnwCdj3c9nnglkdyrOCaEoqJrw60KyHbLEmuuW3fi-fGSjkwRnQd3txMDrrYzqf2oYVUc9JvktlYXXlQ/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-7603433162504496049</id><published>2015-08-08T04:58:00.000-07:00</published><updated>2015-08-08T05:05:12.610-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ALTER TABLE TYPE"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Feature"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="Table Value parameter"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><category scheme="http://www.blogger.com/atom/ns#" term="TVP"/><title type='text'>A big issue when try to Alter user define table type structure TIP #108</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I hope all of you aware of&amp;nbsp; User define table type (a table value parameter) which we discussed earlier in &lt;a href=&quot;http://sqlraaga.blogspot.in/2014/10/what-is-tvp-table-value-parameter-how.html&quot; target=&quot;_blank&quot;&gt;TIP #57&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Now recently one interesting incident happened. We are using a user define table type in few stored procedure and due to some business requirement change we need to change /update data type of a particular column from TINYINT to SMALLINT.&lt;/p&gt; &lt;p&gt;Now this change was seems very simple you just need to change a column’s data type&amp;nbsp; but when you are going to do this, you will find this is not pretty straight forward (if the User define table type is referred in different tables).&lt;/p&gt; &lt;p&gt;If you go through standard steps you need to follow below steps (for&amp;nbsp; a column data type change)&lt;/p&gt; &lt;p&gt;1) Create a new User define table&amp;nbsp; type&lt;/p&gt; &lt;p&gt;2) Replaced old User define table&amp;nbsp; type with new user define table type in each stored procedures&lt;/p&gt; &lt;p&gt;3) Remove old User define table type.&lt;/p&gt; &lt;p&gt;And , I would like to say a big thanks&amp;nbsp; &lt;a href=&quot;http://stackoverflow.com/users/91658/norlando&quot; target=&quot;_blank&quot;&gt;Mr.Norlado&lt;/a&gt;&amp;nbsp; who post an alternative on &lt;a href=&quot;http://stackoverflow.com/questions/11410722/altering-user-defined-table-types-in-sql-server&quot; target=&quot;_blank&quot;&gt;stackoverflow&lt;/a&gt;&lt;/p&gt; &lt;p&gt;below is the alternative steps&lt;/p&gt; &lt;p&gt;1) Rename the existing table type with following command &lt;/p&gt; &lt;p&gt;&lt;strong&gt;EXEC sys.sp_rename &#39;dbo.StudentTableType&#39;, &#39;zStudentTableType&#39;;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;2) Create Table type with your&amp;nbsp; changes which you want &lt;/p&gt; &lt;p&gt;&lt;br&gt;&lt;strong&gt;&lt;br&gt;CREATE TYPE dbo.StudentTableType AS TABLE( &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StudentId INT NOT NULL, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name VARCHAR(255) NOT NULL, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ClassId SMALLINT -- changed from tinyInt to smallint &lt;br&gt;);&lt;/strong&gt; &lt;br&gt;&lt;strong&gt;3. Update the reference in sql entities &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;br&gt;&lt;strong&gt;DECLARE @Name NVARCHAR(776);&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;DECLARE REF_CURSOR CURSOR FOR &lt;br&gt;SELECT referencing_schema_name + &#39;.&#39; + referencing_entity_name &lt;br&gt;FROM sys.dm_sql_referencing_entities(&#39;dbo.StudentTableType&#39;, &#39;TYPE&#39;);&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;OPEN REF_CURSOR;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;FETCH NEXT FROM REF_CURSOR INTO @Name; &lt;br&gt;WHILE (@@FETCH_STATUS = 0) &lt;br&gt;BEGIN &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC sys.sp_refreshsqlmodule @name = @Name; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FETCH NEXT FROM REF_CURSOR INTO @Name; &lt;br&gt;END;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;CLOSE REF_CURSOR; &lt;br&gt;DEALLOCATE REF_CURSOR;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;4. Now drop the renamed table type &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;DROP TYPE dbo.zStudentTableType;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This 4 steps helped me a lot.&lt;/p&gt; &lt;p&gt;I hope this may help you as well.&lt;/p&gt; &lt;p&gt;Enjoy!!!&lt;/p&gt; &lt;p&gt;RJ!!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/7603433162504496049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/7603433162504496049'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/08/a-big-issue-when-try-to-alter-user.html' title='A big issue when try to Alter user define table type structure TIP #108'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-4723012402212994679</id><published>2015-08-04T18:29:00.000-07:00</published><updated>2015-08-04T18:33:21.046-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Aliasing"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Feature"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips  Tricks"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><title type='text'>An interesting way of aliasing TIP#107</title><content type='html'>&lt;p&gt;I recently gone through something and found a unique way of aliasing. I thought it must be share so other techies also aware of it (or might be you already aware of it).&lt;/p&gt; &lt;p&gt;See below example&lt;/p&gt; &lt;p&gt;&lt;strong&gt;SELECT * &lt;br&gt;FROM (VALUES (&#39;Rajat&#39;,30), &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&#39;Sandeep&#39;,40), &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&#39;Sunil&#39;,35), &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&#39;Shreya&#39;,50), &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&#39;Virendra&#39;,45)) AS T(Name,Runs)&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRLmnFmg-HQvPAcXPUp2bpI3SLL0ytVgu5D_M6fNBtwZhcpx59Erbp3KUaXJxos8-gRYadeVixUalmZKYZuw09I8_Iex91yuVzxNJo5fpvfcYJ4ZB3kA1sz6-QkbHcD7H6M7EuXg/s1600-h/aliasing%25255B4%25255D.jpg&quot;&gt;&lt;img title=&quot;aliasing&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px&quot; border=&quot;0&quot; alt=&quot;aliasing&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9PvTE7vmOX8e3d7zyxnQOy2_cGTfOudaGq8aMBswIw4dW6-IaLTgWImck8M3byqRW5poZ3MhoyhtyW0WF7z9yBFvjLL06g055sNDBA1D50lmZpvEjvCPzoEc7gohIGZAD3ULSUg//?imgmax=800&quot; width=&quot;244&quot; height=&quot;86&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now when you it&amp;nbsp; you will get following result&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitJxsHurD6W-GK0tx5mgA37MqRq1GvBzpiRGq5J7aZhfFiNQCgusqf4lteC6yf1fita1go4sm6gYQl6GNp7pMpNgpuF7u_zPRMKreuQ3UgPQrRfcHcHqTjyZDzXKZ5m4-V5cZQXw/s1600-h/Aliasing_result%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Aliasing_result&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Aliasing_result&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizhLjBXMlPBzUOohhchN4LgpQTEA95OCfE4Is1KuEZVMBIizl7N1GJQzv21KYA9Jp0G7U-iLbJEWwomTzVtzYqDDknmi4gQhXnbnQapm_mOqADO9pInmLVlLyPH8w-rQKkUgQ4yg//?imgmax=800&quot; width=&quot;379&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I hope you may like this tips. &lt;/p&gt; &lt;p&gt;Enjoy!!!&lt;/p&gt; &lt;p&gt;RJ!!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/4723012402212994679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/4723012402212994679'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/08/an-interesting-way-of-aliasing-tip107.html' title='An interesting way of aliasing TIP#107'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9PvTE7vmOX8e3d7zyxnQOy2_cGTfOudaGq8aMBswIw4dW6-IaLTgWImck8M3byqRW5poZ3MhoyhtyW0WF7z9yBFvjLL06g055sNDBA1D50lmZpvEjvCPzoEc7gohIGZAD3ULSUg/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-5786795770537647508</id><published>2015-07-26T00:27:00.000-07:00</published><updated>2015-07-26T23:08:48.704-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PMB"/><category scheme="http://www.blogger.com/atom/ns#" term="Policy Based Managment"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Feature"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><title type='text'>A simple way for consistency TIP #106</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Whenever we develop application of maintain application we define sets of rules or policies&amp;nbsp; like naming convention , data type, database &amp;amp; SQL SERVER properties (like which property should be unable or disable)&amp;nbsp; but the problem is to cross check or to enforce these properties is very tedious.&lt;/p&gt; &lt;p&gt;To enforce the policies SQL SERVER provided a great feature which is &lt;strong&gt;Policy Based Management.&lt;/strong&gt;&amp;nbsp; This is the feature which helps you to not only write the policies or rules but also enforce and cross check whether those rules or policies is followed in your environment or not.&lt;/p&gt; &lt;p&gt;Although these feature is mainly for A DBA but I think it is good for a everyone who love SQL Server.&lt;/p&gt; &lt;p&gt;Now let me share an example which will help us to better understand &lt;strong&gt;Policy Based Management.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;So to begin with&amp;nbsp; firstly we have to open the &lt;strong&gt;Policy Based Management’s interface. Which we can get in Management folder in SQL SERVER’s object explore window. (You can see below yellow highlighted)&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8ebfQAElL45Et-atnUjHvpjx4cI0XhZCOY_QJMBhrlnOeY9afKTcLSOThpyu1rxhbpqssa7_klk_EIseQwUnfL1QKcliucejClCOxJctJf3cOAsVCnZbxCR_j0mJr0pgF1FSFYQ/s1600-h/13.jpg&quot;&gt;&lt;img title=&quot;1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvh5KfFeuQGtxu3jt2aGaupn3gxiPLC9WAkLqM6m2Sl2VIetCYqN6w2h4aUm0eEAdkCuJ6fidEyiGUP5Zzbw-z5qNoj7xiCN8C4UNdKLse2YUalOKseQZXnRUA6tM04zcsEf3Drg//?imgmax=800&quot; width=&quot;389&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So when you expand the&lt;strong&gt; Policy Management in Management feature&lt;/strong&gt;&amp;nbsp; You will see 3 different folders which are &lt;strong&gt;facets , condition and policies.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;So there are&amp;nbsp; around &lt;strong&gt;84 in build facets which is basically properties for different conditions.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Conditions are basically simple check applied using facets.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Policies are created on condition which will enforce once it created.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Below I am creating policy to check table who has row count =0 (Little bit odd) .You can try with stored procedure name not started with sp_ (will be good start as well).&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;So , Now create a simple condition by right click and choosing menu &lt;strong&gt;New condition&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLhhi4-xNJy_gi97xW8OEPN5m-gkG47fk6eeMSIPBZIO8RVphWtAsbrlF5Sl1SgHncC2_DTsP7s1zjttFfCfxURgBKqazqqskVGpzy1_GcbCRPKbuvCPoYTgZ5eN3jtjlJsLL52g/s1600-h/23.jpg&quot;&gt;&lt;img title=&quot;2&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRF55TY22n-KkTUqMhpI79ZW-vV5qdgK2t2yenyFQcfQ14LQ0cVmlWB9lXWOh614WH1d7IFi_-HB30TBej1_mPOxgal5Aj4Fc1S8vKTUhYXlUQalgRWrx3BNsmgRu_wUujDXtmMw//?imgmax=800&quot; width=&quot;644&quot; height=&quot;482&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;You will get following screen just add condition&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYYBpW16OFcKca_EsLS7q6J5YT5JbUVU3hcv2oAF4rL2OVcq9EqS37Gz2SLmGZ2S_WiFIYxzPITv8gJLA6Pu8lNg2HyI2ezyzqj7vLAjDXuBgfWZXXhBYd33jmJfgZOR77RVK_Jw/s1600-h/33.jpg&quot;&gt;&lt;img title=&quot;3&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;3&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_8Vnd9vNiPk-3AjFnW32Dh03HWa7vFqMR3zkEVE9XUs2asJPj_etmfiYi-TQV8vjTjpwunH6XmgszRTQ9PUJIvLTOsvP3X37e7srnzUzkzNwgcaG8x_NUETdq6Rv1Jz2mkXgMNA//?imgmax=800&quot; width=&quot;644&quot; height=&quot;470&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;We are creating a simple condition which will check the table which has R&lt;strong&gt;owCount is 0.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtEvp5n7h5wrAeXUBA4ZxbgSDYYMDEDYIjoiwqJmm364CQr8-scHCS6tWqJPedGXRP4VS_COvTKNLvynxHwF_Sx6W3J5xxywDfyapqNpetJt1lt7XxR6nFpHjQ4anT2-FFvM_PdQ/s1600-h/113.jpg&quot;&gt;&lt;img title=&quot;11&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;11&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigr1dSwGY_mboX_9r5Qrm5L31rLqb9exKt0HtFS2RViHHhpTejUn8gQhBmO-XsH-ZYlY3pKd9Buk3OJTrR9Qy3WRzVHvKa5x15QctkKUMqBv27pmFNBy1zaCWbKO4Q3tK5V-s3IA//?imgmax=800&quot; width=&quot;644&quot; height=&quot;479&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Once you created this condition you will get condition in conditions folder.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBaDTbeUnP_LeyM9JfEqk_qKoIa9TRl39C9L6Zno4Hrpi3mSJDuVUtwsSc0s9ggyxY4dlKgV_Ut2XU6BmILIgz_Eed1wl_MsGWRF0vURtMF1zRUTvRQ2HuCH8Oe-KEwASPYAnaRg/s1600-h/43.jpg&quot;&gt;&lt;img title=&quot;4&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;4&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNWx0Nm8K-677hbJv4n5RxS9vTAp2olssQOnVIUZMbE4M8q0QSIL8O4uxTtzcTHSkVAdI_LqWqF-Efgs62AB5ExzNpyxXSCE0zZFo4wkzX968zSOfNExAjsMcIRRu2F2htR7meCg//?imgmax=800&quot; width=&quot;644&quot; height=&quot;310&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now once condition is created we have to create policy. To create policy we have to right click on policy and select new policy.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwHA9qpUnO-HYpYlHoWl0xy73Ss7qtxWbZGVwDqpnesjqm_X9AuqA41YolYx99V-kizqd8sQU8oDi-_cFTQDhpOSUIeuhQDa4UWRZVinXjmMsuKyO5-g2AJZcMp6ZQU2H82I0KlQ/s1600-h/53.jpg&quot;&gt;&lt;img title=&quot;5&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;5&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu5z2PcCuRoP47MgDJVkhzYiWtxD99H5tYfA3VwcIds5gv2gpB3pRnGEnrGAKNBP7H4gMGooCpMB0m_nHjZF_bHYkS5oK8pHsZI33NjTWPh2eL2M_2Pb7bhDEHwNI0MRKrUOrIkA//?imgmax=800&quot; width=&quot;614&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;When you click the new policy you will get following screen&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTH1q_cySvgUAaTXWHOx-KmvlM-OAYBjazUX4TT8asiUytyeVZh7qe93NJcRnysarfKjiyF9QCz-_oVScuQ-rWARAaQLgWF157EQ9c89HrrFA9V6wIxDrouXWjmrlu2XlBIQE4_w/s1600-h/63.jpg&quot;&gt;&lt;img title=&quot;6&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;6&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1IohHXr-GuzkTmsfOwFI905mGkzkV7-Lh-gni4LqyFxVIdNXyFpZM7vjmd3G2qFPJ730uKcQKfBlT3qvggkytxgMuWxEyRv3AmpjF0pCezVW5v13QQCHak28g8-h7fNON8Nb9Ew//?imgmax=800&quot; width=&quot;560&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now we can add check Condition which we have created as shown in below figure. We can apply policy against target Like in below snap we want policy against every table for IndiandotnetDB&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4N4vS7IYzoFOiin0UAAKOUGXFxhRogYjnGvkfpHTmXeyKDb8Ui6-2HTfYvUTyW6ilH1bS3kdxHu_a2eZ-nhFpFqRBS2y2JoJA_kdpEZ_7OJSyU-Lx0_tfrFwqMTQpulYfbFTGBQ/s1600-h/NewPolicy3.jpg&quot;&gt;&lt;img title=&quot;NewPolicy&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;NewPolicy&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAgVKKSIjzhM80TxFHwvgq1B42QC1M3sLIbV77FXqcEED5T-X-RPrZu8y-JPsD5JSJh6iKertu9MtbjMhoAo20T8WPUhIlRfss2X2E-s8ddrP-S0y47sOZ7CdNcCuv6XVaf2LgIw//?imgmax=800&quot; width=&quot;560&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;We can set &lt;strong&gt;evaluation mode according to our need. &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Once you saved the policy we can run it any time. &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;We can evaluate policy by right click &lt;strong&gt;Evaluate &lt;/strong&gt;as shown in below figure&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUBi6ulkHaWUzf4eaNXtJjWauY4F4A6XXg0dPmWHTL8SL8nLUPBqRHoX0kmGCZeyidFDZtv32QrAJO-iu2k4ALM64WDfVPf62UUHVLYEUUE8qT5xNZ4bu4MHC6PSbgPQ_GM2KSIA/s1600-h/93.jpg&quot;&gt;&lt;img title=&quot;9&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;9&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUYx69CTh4SuGnK8_j0L6DC1-g3W7F7qhnrGJiJEfNiQeFapslw6HZ8aeQ4gTZe5edQbZ9kAU9lY_54MyqpaYjawwl7wqrQWthmvzD4nKEm1HrsW4MPOmiafUq4kl88Je1U6jqhw//?imgmax=800&quot; width=&quot;401&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;When we run the policy we will get following result&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl_K-_yjByH-vgtnC9cHHi1Qo1CDr8KgUAJHuz-EwHM_apxJRENz09kEambhzFMn5HehUPeYco3q9hHKaxeaoJ-SQRPL__Q-bak5hqiv4BYipJQGiACkNH02eiWqrNtJQVXrsijw/s1600-h/103.jpg&quot;&gt;&lt;img title=&quot;10&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;10&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisbT1Dz5X5u0DKqDluVzsdapzNEeK0-Jly_vXy2yf8IYr-QCRAt0PM3rfpWkLVzD1gktELJ5RnRLzgs0ZM92YC2cC6P8jovWBW89LjhyCAgMx33Y0PU8cd4ZaLkwp1XyrNkq5PIg//?imgmax=800&quot; width=&quot;520&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So , If you see above highlighted row which means a table contain&amp;nbsp; &lt;strong&gt;Row Count. &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I hope with above steps you understand a basic way to create Policy Base Management concept.&lt;/p&gt; &lt;p&gt;Policy based management is surely a great tool to manage&amp;nbsp; database.&lt;/p&gt; &lt;p&gt;Please feel free to give a chance whether you are DBA or not.&lt;/p&gt; &lt;p&gt;Enjoy PBM !!&lt;/p&gt; &lt;p&gt;Happy learning !!&lt;/p&gt; &lt;p&gt;RJ&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/5786795770537647508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/5786795770537647508'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/07/a-simple-way-for-consistency-tip-106.html' title='A simple way for consistency TIP #106'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvh5KfFeuQGtxu3jt2aGaupn3gxiPLC9WAkLqM6m2Sl2VIetCYqN6w2h4aUm0eEAdkCuJ6fidEyiGUP5Zzbw-z5qNoj7xiCN8C4UNdKLse2YUalOKseQZXnRUA6tM04zcsEf3Drg/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-5938912855785732509</id><published>2015-07-23T20:04:00.000-07:00</published><updated>2015-07-23T20:05:44.795-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL"/><category scheme="http://www.blogger.com/atom/ns#" term="REST"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Feature"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio 2015"/><title type='text'>Enjoy with new release of Visual Studio and SQL SERVER :)</title><content type='html'>&lt;p&gt;Dear All,&lt;/p&gt; &lt;p&gt;Although, I am bit late to share this information and might be possible most of you people aware of this.Recently Microsoft released Visual Studio 2015&lt;/p&gt; &lt;p&gt;and SQL SERVER 2016 CTP. Not needed to say that there are various awesome features in both build.&lt;/p&gt; &lt;p&gt;You can download latest Visual Studio 2015 from below link&lt;/p&gt; &lt;p&gt;&lt;a title=&quot;https://www.visualstudio.com/downloads/download-visual-studio-vs&quot; href=&quot;https://www.visualstudio.com/downloads/download-visual-studio-vs&quot;&gt;https://www.visualstudio.com/downloads/download-visual-studio-vs&lt;/a&gt;&lt;/p&gt; &lt;p&gt;and SQL SERVER 2016 CTP from below link &lt;/p&gt; &lt;p&gt;&lt;a title=&quot;https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2016&quot; href=&quot;https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2016&quot;&gt;https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2016&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;In future post you will be find tips &amp;amp; tricks related to SQL SERVER 2016 &amp;amp; Visual Studio 2015.&lt;/p&gt; &lt;p&gt;Enjoy Learning !!!&lt;/p&gt; &lt;p&gt;Thanks&lt;/p&gt; &lt;p&gt;RJ&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/5938912855785732509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/5938912855785732509'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/07/enjoy-with-new-release-of-visual-studio.html' title='Enjoy with new release of Visual Studio and SQL SERVER :)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-1351057005181669180</id><published>2015-07-18T06:19:00.000-07:00</published><updated>2015-07-18T06:29:59.040-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Merge statement"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Feature"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips  Tricks"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><title type='text'>Merge statement- A simple way for DML TIP#105</title><content type='html'>&lt;p&gt;When, I first saw this statement a Hindi proverb&amp;nbsp; come to my mind which is &lt;strong&gt;“1 teer 2 nishane” . &lt;/strong&gt;The meaning of this proverb means&lt;strong&gt; a single bow which hit two different aim in one shot.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;So let me explain &lt;strong&gt;“Merge”&lt;/strong&gt; statement in more detail. With the help of this Merge statement we can do insert ,update and delete with a single statement.&lt;/p&gt; &lt;p&gt;Let’s understand this by an example. Suppose we have two tables Source and Target as shown in below figure &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTkcftQzdz6nr0bWfJq_0FGWXvPE80ndZFp-QsSnXjuFUw9yP3KPksL6Ye9rR-q-2wfLGFshqYGkw2ihe4QExg6yz9E3wnAohImx4UubagX0zlxASkDQSCzPjKCwe1p2HfNtidZA/s1600-h/Source_And_Target_1%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Source_And_Target_1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Source_And_Target_1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiPCdUA7gvHikf0MXaxzgzlcg4FbxOSV97QvcCk0Kvmaq8BZRmW8aumahgqiAPhyphenhyphenOeNgMvRAjJAnSVqWdvBUmF_v-XvlrQ9-Rjmuwm7bauyJfigGu-aBgBh6pQgNqxzAnL3PFmUQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;135&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now these tables will have some data so lets write query to insert some pre pop data &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMMSF2rUcFsMufC_jlDj4RigcG0G99TOl3PemqNidVoX7xyq__jmVrbkZh7n_MZEVr-GqN8HH2oSrNe5chasbMaKmjIydfB_cwOfMgI9X9qtNXRDjPbXcXwyMqBEummYmXmonIdA/s1600-h/insert_data%25255B7%25255D.jpg&quot;&gt;&lt;img title=&quot;insert_data&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;insert_data&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisKSix49xLJOaNrR-Led_APPpIAcC6TRqBymQFBEcXQvj8a3iGkN_Ewhi3T1TJePExPrjFzkAHUSmb5WfvHjC3mI44F1Pzt6EyvqH3iBSAERcHYCx8CkqwZBIEqwklzM7xn9YjXQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;224&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now what we want follow things &lt;/p&gt; &lt;p&gt;1) if&amp;nbsp; employeeId of source and target tables are not matched and if employee name starts with “S” in the source table&amp;nbsp; then insert the value in target table.&amp;nbsp; (means insert Sunil &amp;amp; steve’s records from source to destination table)&lt;/p&gt; &lt;p&gt;2) If employeeId of source and target tables are matched then update the Employee name from source table to target table&amp;nbsp; (if any record matched then update the employee name which not the case with current data)&lt;/p&gt; &lt;p&gt;3) If employeeId of source and target tables are not matched and Employee name in target table starts with “S” then delete that row from target table. (So Sunidhi’s row will be deleted from target table)&lt;/p&gt; &lt;p&gt;Let’s write&lt;strong&gt; Merge Statement&lt;/strong&gt;&amp;nbsp; for all the 3 above work.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjedRzvVcQa-7P_U0iJ21pdWhKl6nXBEXccyGu7Oa19tJgDSxzEgeAG4Bk-M0EHkKarGndUMJbVz18HDIak4mtf76wdgrqo_lG-qFnHuhEbMczrDpnNxMqPHAtqSIgEmHMTY6qJLw/s1600-h/Indiandotnet_Merge%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Indiandotnet_Merge&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Indiandotnet_Merge&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYy_bbqDbcg891q7Pn0sfLaBRIgUE3ZRpJjM_hTJKqQE3j2X3FiP-iwo_h3lAw1gJrObjiDy74SFkhrh305z11XlVyktiF4KYREy7MYyqICl-WVz4vkskrzLbOzcJ_c9OA56ICaA//?imgmax=800&quot; width=&quot;644&quot; height=&quot;253&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now you observed that there is one more statements which is written explicitly apart from the condition which is &lt;strong&gt;OUTPUT&lt;/strong&gt; &lt;strong&gt;clause&lt;/strong&gt; which helps us to determine what operation is performed.&lt;/p&gt; &lt;p&gt;When you run this you will get following output &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6r2Q2n_UUOcBwQiIxr_T_F_gJqkYuZEiJ2dYX7BoPkdLgoojUyfDxXiNssbJBTQ7zWwcPLg_UWbxQW9Ub0hE8vGM4V-T5hgQ_a863Z9xl5hk_5ZDoxuW2rDE9ZxYExlBQ1ZujTQ/s1600-h/Operations_Merege%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Operations_Merege&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Operations_Merege&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzbhb94GdLDbAtwdXSQFcZDLCD3EtjNsSCXNzOEJxbyXl6lSeK4ktlaT99D2DqnnoFcpbituZ_GHv7dK4drEYFqKl73LfmewmH2rvHHqXB9ezCeZKsCxMx5euk26jFQTtI64vFMQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;170&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now see the actual data in both the table.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9FowVPMpsN7GOw7y7eYaUI1O892dxn3dH8lREoISG5yz-TEHnWANT3gqLB1cXMFlGTpnVrOXWDU0VbpcNMzrhzxhMv3saJx3JsUtpSC4d4GDJabIKmJYyS8wglwGK64nO1Tgk0Q/s1600-h/ActualData_Merege%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;ActualData_Merege&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;ActualData_Merege&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMCgNiI32g6QgLihGR-sFGRboaxf4vDypidCGDDr5tk0vzi7E6zdnPKPxVAmmp-1lvvJGH9MxMSHKf9w8MCVI59WvbnebwGOBnsm2WcQZv1TazuIgXUJzas2VdBlDOqO0zaNUKhg//?imgmax=800&quot; width=&quot;585&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;So, a simple merge statement is doing all 3 operations like update, insert ,delete.&lt;/p&gt; &lt;p&gt;I hope this tip will help you some where.&lt;/p&gt; &lt;p&gt;Enjoy !!&lt;/p&gt; &lt;p&gt;RJ!!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/1351057005181669180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/1351057005181669180'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/07/merge-statement-simple-way-for-dml.html' title='Merge statement- A simple way for DML TIP#105'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiPCdUA7gvHikf0MXaxzgzlcg4FbxOSV97QvcCk0Kvmaq8BZRmW8aumahgqiAPhyphenhyphenOeNgMvRAjJAnSVqWdvBUmF_v-XvlrQ9-Rjmuwm7bauyJfigGu-aBgBh6pQgNqxzAnL3PFmUQ/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-5787085929031396614</id><published>2015-07-09T11:09:00.000-07:00</published><updated>2015-07-09T11:24:38.530-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Aliasing"/><category scheme="http://www.blogger.com/atom/ns#" term="Column Aliasing"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Feature"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><category scheme="http://www.blogger.com/atom/ns#" term="Table Aliasing"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips  Tricks"/><category scheme="http://www.blogger.com/atom/ns#" term="trick"/><title type='text'>Proper Aliasing will help you somewhere TIP#104</title><content type='html'>&lt;p&gt;Recently, When we were delivering session &lt;strong&gt;on “SQL SERVER”&lt;/strong&gt; one of the persons asked why we require Aliasing so I thought this might be question in everyone’s mind.&lt;/p&gt; &lt;p&gt;So lets start with couple of well know statements then we will see the actual problem where we need it explicitly.&lt;/p&gt; &lt;p&gt;There are two type of &lt;strong&gt;aliasing&lt;/strong&gt; we can do a &lt;strong&gt;column aliasing &amp;amp; table aliasing&lt;/strong&gt;. &lt;/p&gt; &lt;p&gt;Aliasing might help you in readability of stored procedure or function. It helps when you retrieving any calculated or derived column which need in your application so lets starts with some example.&lt;/p&gt; &lt;p&gt;if you see below example we are calculating a column but it does not have column name so fetch this specific value is very difficult so we require column Aliasing here&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUS8-1PTFvi4PJ8GOKKTYrjw99pIxPjRuS2FxKuFHoX-Xbu8EXBKvmpqhk_8a0lfRAVF90mVc68DvnxymZh7fFJyf0HJ7kaD1dxSVYT6oK4eLInf4TQ-DMiCqgSYl8y0Myggyu-w/s1600-h/Calculated_Column3.jpg&quot;&gt;&lt;img title=&quot;Calculated_Column&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Calculated_Column&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8w9A0ZWyWb3_GSBiFfKy5b5aUvPiTL4nduOjGL63E2JKrjLis_SSUE2XTUHpGBiYiJL4a8N6r4vlX0SKqZogss-NQJloz0qVk1E3jRvU21sELjA9zPhizDfY1f-cn6R5GlA9W2w//?imgmax=800&quot; width=&quot;644&quot; height=&quot;131&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So as you saw above figure the calculated column is with name “No column name” we can not retrieve it easily so we require aliasing &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdDO03XY7nTaJh7RMCjE4VSy3JbxBOZgtaAiOYyckceGYF8KkSymS7T7JZhgoiJYTksKs67eaKTQbf3tj33-owg9m3hRgDIh84Sx7qkKGb7Fyv848ff-FZLog6Lq00K1ZrjdyqGw/s1600-h/Total_Price3.jpg&quot;&gt;&lt;img title=&quot;Total_Price&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Total_Price&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHzWezn5p9I9FwgY0M_kKgiowDD6pcyPDHQGZp9yUkH_blzj6WXfFnA7rkAq1fFK-p-aHqjYLVzu-oif3uHwtJqTUX5Ddkq_AURloSTGEk_5AQhcLwJ0Jz_TWtd3bNfKqKf6LQRw//?imgmax=800&quot; width=&quot;644&quot; height=&quot;95&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now ,lets talk about the table aliasing. So table aliasing help you in readability and it is helpful when you require self join or same table is required in join.&lt;/p&gt; &lt;p&gt;Lets see in below example we did a self join and we required aliasing&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmMXv8e5jSkCJD9GYelulKGldtGYGnA19w0SPtytjroMDHEOmOCf78R1lWC3CXZF4wyHkmjdxqlxiuMNMUsiBoi3lnqz6CNoz1_BHF2EXC1m1H3PK12x9Sn1KUAU00XClPbYb6Sg/s1600-h/SelfJoin%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;SelfJoin&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;SelfJoin&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaTqFo1hWLd8bYvyu2p89ns-YfGrvJ9OL72tgL3ztuOFAaDhKqLh0s0Jb1juxZrRDPWJ5n6pvbAlATDn3oiyDSXKvwu7RgOb7cU3qcDpHZ_MZGvDOMjmIieGHhu-ABJH6vd6SdAw//?imgmax=800&quot; width=&quot;644&quot; height=&quot;268&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The aliasing will be helpful when same table join is required multiple times.&lt;/p&gt; &lt;p&gt;I hope this tip might helpful to someone.&lt;/p&gt; &lt;p&gt;I would appreciate if you provide you inputs as well where we can utilize aliasing.&lt;/p&gt; &lt;p&gt;Enjoy!!!&lt;/p&gt; &lt;p&gt;Th&lt;/p&gt; &lt;p&gt;RJ!!!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/5787085929031396614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/5787085929031396614'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/07/proper-aliasing-will-help-you-somewhere.html' title='Proper Aliasing will help you somewhere TIP#104'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8w9A0ZWyWb3_GSBiFfKy5b5aUvPiTL4nduOjGL63E2JKrjLis_SSUE2XTUHpGBiYiJL4a8N6r4vlX0SKqZogss-NQJloz0qVk1E3jRvU21sELjA9zPhizDfY1f-cn6R5GlA9W2w/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-3623277912289899470</id><published>2015-07-06T20:37:00.000-07:00</published><updated>2015-07-06T20:42:35.854-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IN Clause"/><category scheme="http://www.blogger.com/atom/ns#" term="IS NULL"/><category scheme="http://www.blogger.com/atom/ns#" term="ISNULL"/><category scheme="http://www.blogger.com/atom/ns#" term="NULL"/><category scheme="http://www.blogger.com/atom/ns#" term="Rajat"/><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Feature"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><title type='text'>It is OK its NULL only TIP #103</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;We always take NULL very lightly. Like if we are designing database then whether it is necessary or not we allow the data field to accept null.We think it will not affect anything.&lt;/p&gt; &lt;p&gt;Actually , at some point this is not always true.&lt;/p&gt; &lt;p&gt;According to &lt;a href=&quot;https://technet.microsoft.com/en-us/library/ms191504%28v=sql.105%29.aspx?f=255&amp;amp;MSPPError=-2147217396&quot; target=&quot;_blank&quot;&gt;Microsoft&lt;/a&gt; &lt;strong&gt;NULL&lt;/strong&gt; is an Unknown value. It is not EMPTY &amp;amp; ZERO. It is just unknown. &lt;/p&gt; &lt;p&gt;Now according to my experience NULL is very sensitive and should be handle with care. &lt;/p&gt; &lt;p&gt;While we are designing the database and in a particular table if a field can not be null according to business rule then please don’t allow NULL in that field for data consistency.&lt;/p&gt; &lt;p&gt;For example if we have a StudentEnrollment table and in the StudentEnrollment table&amp;nbsp; we have reference of StudentId which is primary key of StudentId and that can not be NULL then please don’t make the field null able.&lt;/p&gt; &lt;p&gt;Let me share some more interesting facts&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1) Two null value not equal :-&lt;/strong&gt;&amp;nbsp; Let me explain it with an example&lt;/p&gt; &lt;p&gt;Suppose I have tblStudentSource table&amp;nbsp; which has different columns and a course column which have some null values&amp;nbsp; as shown below &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUo9OCcs2-0F0iLc6Jl82fA2jwXPE0_SdmLWz2G-qEcbrEJp7SFuVLwIoVjiPNDDHtGf5IBfWs-e0tuzY8ATepyVMr_kVrH6dIIEXPPKokuInBv5cJFwOMWgivgUz2XMj5xA45tw/s1600-h/Indiandotnet_Student_Source_Table%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Indiandotnet_Student_Source_Table&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Indiandotnet_Student_Source_Table&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuneFhJsOJrnmcABTEKfUcHDJCYyKl4fK5Z0X21fDkxKNbhev51ofp0-QuikDvm0fYtbvXv9JOcl44Q7vexD6dWQh5AzBbIVGNouWLIuN6a-EKtQpdx3PyNw4aZlQEvDaBEiK_rQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;282&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now see below snap where we are comparing the null value course column. You will find in below snap that there is no result while we have null value in course &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis_16612Ql3WNFibpg9DknaP2P428paGthNC50YI5_9b4R3arze08bjicJPDeDpUxLuHPD6v6KUBeKmyjwltkgXWhRDQGWW79Ft5XW1bSX8pnwstXtW3w_-13XwQuHKG9jVgt80A/s1600-h/NULL_IS_NOT_EQUAL_TO_NULL%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;NULL_IS_NOT_EQUAL_TO_NULL&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;NULL_IS_NOT_EQUAL_TO_NULL&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLf9AZw0M-hIJ-63A-SoWYFlec4PQ9bfihW8qO9oXfJOP4fpbLfxFHsQg0Tc3ElolCQlqz5Uuv_HBAjjyD63RAUEu3e8pl6_eDZtb6MOpdfjZQkmwx6dDx6gK3p9RJfnHUxJb5xw//?imgmax=800&quot; width=&quot;644&quot; height=&quot;194&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2)&amp;nbsp; Use IS NULL or IS NOT NULL&amp;nbsp; to handle null able column:-&lt;/strong&gt;&amp;nbsp; If a column is null and you want to show all the columns which are null then instead of comparing NULL value with column as shown in above figure use IS NULL as shown in below figure &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaVINJuYCW5tW4f6CA8t65UzhoAe_5pKzjAVkkKx0LXTqMQBgHITj6b_z-5MCsiyR9Um6DB9Xqt_KhOYqSrrIyjf0VHeS4E25uxvzXVg_gACLIvm4oWwOV1Vvo9OgeLDKH1nh0UA/s1600-h/IS_NULL%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;IS_NULL&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;IS_NULL&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIx24XRB39x74FSGESiUvC2orsGH5EudP1TxHwPDU90JWkrZkDDGvhLrLFDUm6LOdI6PkHHfWzKdVP8gw0vVaH0oQF1Zd6KgAxIUBOhxR2eLIHAIVVMU3opnSeCSXsQit6CAqcvA//?imgmax=800&quot; width=&quot;644&quot; height=&quot;214&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;In similar way if we want result which not have null course then we can write below query &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhukv4ubxG7wkUFnRkysG292LasRPTP6R-x73xo1JOfjw3fl3eN-wsyIzyXutI8nucZ6h5z5xZVuxEIDOxuJGdQ2nVqtEhBWEunCOrnODXXSSN-C9s6ZGlRShyJPB8JUj_y7NlG3g/s1600-h/IS_NOT_NULL%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;IS_NOT_NULL&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;IS_NOT_NULL&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4l8so6yrUrmvzY-_SOmYGDxUi21-0QqOw0WbObHGMmu7kJVyAry9-UKxH2r44Ghg7cBa7zeViuIJDyxjNMNTa3ZUqzbC2hJd29-vj5czYVtNC7JRBhUDF7BXxfKaWiSVbEPyenQ//?imgmax=800&quot; width=&quot;644&quot; height=&quot;205&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;3) Handle NULL carefully with IN clause &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Let me explain with an example so we have 2 tables which are tblStudentSource (as shown in above (image 1) and another table which is tblCourse as shown in below figure &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwgp_od-Y9X-vfyIr2n6On3Gr5DJUkTyfr6vpgrJdYiMuhFK18sZ3ErYuxhMGiZg8iSs4k91aIHN4MyKIir0pk34sTOw336FkPXEW6gsXiV9vCwf9DPeUwEAdqmLxSBfbH3V-oOg/s1600-h/tblCourse_Indiandotnet%25255B2%25255D.jpg&quot;&gt;&lt;img title=&quot;tblCourse_Indiandotnet&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;tblCourse_Indiandotnet&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimTSZg5b1vetPK2pbOgorIQuEQVbKk2KhMWf7rO38pu6IJqAKW6bsbXW1DcxXUrIsMWhMrKNXoIUE6h0L24lCo8BOfXiEM13LMZEDuKJziWYoi6Lwr5Vre99EPWC0Lo7djwfjqqQ//?imgmax=800&quot; width=&quot;238&quot; height=&quot;239&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now if you see we have course column in tblStudentSource table which has values similar to tblCourse’s course column and tblStudentSource’s course column contain some NULL values&lt;/p&gt; &lt;p&gt;Now suppose we wrote following statement and expecting that it will return all the course which are in tblCourse &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwZKlKKzRktbodDSiMkwK7ltex4EO1VHHszpt4z1qeMz8hn3eUZFkNgmef3_TLxBlGyZKfhtMLLIBPWFuGGgrHOQxV0a1BOtvx33LlNwkhYyrMVBWXIu7DgCx3_zBHsWXewfMBsA/s1600-h/NULL_Return_Nothing%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;NULL_Return_Nothing&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;NULL_Return_Nothing&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-1y0b1zVV4cqx4AiQpjgxc-2KpkDSm_vCljHTvm_vSGwVLpKRfqXHM5XEsTlU7IfcBYdhaI3mECWpUWBhqNBbsXdFcpfyrrNeZVQsEecHgxec45Q7uWzX2F9cfS6RjKh3jnhsOw//?imgmax=800&quot; width=&quot;644&quot; height=&quot;174&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Oh !! it is not returning any course. The reason behind it is NULL is not handled properly. Now to get desire result we have to write following statement &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0GiSPbBhic4w-UaoiFDenQn3bb1XG847cVNQT3e6JM90Uz-jNC3YELMBog8GiSgmu4FNcCzt1n2ShAgLeLfxFMWDQ5m8ArfAHPCbuJOceV-rtdKLJERYkQZBANOSafBpJxGUJZQ/s1600-h/ISNOTNULL_WITH_IN%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;ISNOTNULL_WITH_IN&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;ISNOTNULL_WITH_IN&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNSadf6t8OV7uTFqLUdVdsiTRCoCjU9eKMRDp449BcIszXHrBe_6bwYs6tqakXaZOzFeKcJjCzRPafM_atUaSHaGLjqKqV1kc_-2gwVYzQPmuy8VLVjKQ5pWvg61Hs7GPi_dXL2Q//?imgmax=800&quot; width=&quot;644&quot; height=&quot;173&quot;&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;So , be always careful when your column has null values.&lt;/p&gt; &lt;p&gt;I hope the above points might help you somewhere.&lt;/p&gt; &lt;p&gt;Enjoy !!!&lt;/p&gt; &lt;p&gt;Keep learning &amp;amp; Keep Sharing !!&lt;/p&gt; &lt;p&gt;Thanks&lt;/p&gt; &lt;p&gt;RJ&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/3623277912289899470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/3623277912289899470'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/07/it-is-ok-its-null-only-tip-103.html' title='It is OK its NULL only TIP #103'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuneFhJsOJrnmcABTEKfUcHDJCYyKl4fK5Z0X21fDkxKNbhev51ofp0-QuikDvm0fYtbvXv9JOcl44Q7vexD6dWQh5AzBbIVGNouWLIuN6a-EKtQpdx3PyNw4aZlQEvDaBEiK_rQ/s72-c/?imgmax=800" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-32616583.post-57768725056666036</id><published>2015-06-20T12:15:00.000-07:00</published><updated>2015-06-20T12:23:59.339-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Sql server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><title type='text'>A myth about view TIP #102</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I don’t know why every interviewer’s favorite question &lt;strong&gt;“Can we insert record using View ?”&lt;/strong&gt; If you say Yes/No the interviewer will roaming around like so&lt;strong&gt; Can you update record using View&lt;/strong&gt;?&amp;nbsp; or &lt;strong&gt;Can you delete record using view ?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;I&lt;/strong&gt;&amp;nbsp; hope everyone who is reading this article will be aware of what is view and how to create it ?&lt;/p&gt; &lt;p&gt;If not then need not to worry&lt;/p&gt; &lt;p&gt;“View can be see as a virtual table based on SQL SERVER result or in other world it is a layer above actual data tables” Or we can say when you want to hide actual table then you create a view wrapper”&lt;/p&gt; &lt;p&gt;You can easily create a View with following syntax &lt;/p&gt; &lt;p&gt;“CREATE VIEW &lt;/p&gt; &lt;p&gt;AS &lt;/p&gt; &lt;p&gt;QUERY “&lt;/p&gt; &lt;p&gt;Let’s understand this by an example. &lt;/p&gt; &lt;p&gt;Suppose in I have a database with name “IndiandotnetDB” which has a&amp;nbsp; table “tblStudentSource”&lt;/p&gt; &lt;p&gt;Now I created a&amp;nbsp; view just for fetching records from tblStudentSource&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;CREATE VIEW StudentSourceView &lt;br&gt;AS &lt;br&gt;SELECT StudentId, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstName, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LastName, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Course, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Detail &lt;br&gt;FROM tblStudentSource&lt;/strong&gt; &lt;br&gt;Go&lt;/p&gt; &lt;p&gt;Now you can fetch records directly from&amp;nbsp; View as shown in below&lt;/p&gt; &lt;p&gt;SELECT * FROM StudentSourceView &lt;/p&gt; &lt;p&gt;You will get all the records from tblStudentSourceView &lt;/p&gt; &lt;p&gt;Now the Question &lt;strong&gt;“ Can you Insert record from View ?“&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;So the answer is specific condition you can.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;In our scenario we will write following command and execute so the record will be added &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3GCLCVoIVN0QMPNIyxQg2N2jEJO0NTGPkOd_feIdzd9Y9uJV198IHoDZ6zjlP9tMv-AcX-x7X4qgwp6MphMw_lvo8d2gKiiYWtwMj6qZUs5JtYHUxwrX-oiZOvFa8xaljGY2TKw/s1600-h/Indiandotnet_View_1%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Indiandotnet_View_1&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Indiandotnet_View_1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieX_vzMq6YtGxh6rbBrfxAS5a5kh2P37h3YUPwdiml9tOENRDx5s-6x1mpYaMzrf2t-V62XIA4DAEEMMaSt-uZCb2sivI-5K7xenptx2ako0RTooaRHfFeYtlCbjHHo32wdi31gA//?imgmax=800&quot; width=&quot;644&quot; height=&quot;449&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So you are clear that we can Insert records from View.&lt;/p&gt; &lt;p&gt;In similar fashion we can update the records as shown below figure&lt;/p&gt; &lt;p&gt;We will following SQL statement as showing in figure in which we are going to update record no 2004 as shown in above figure&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgofUzeUJZPVhg4b02rLVICGDKXAdLmmqnewtXoBxlg4k3VIOFEKmZ2gyQl-2nj5H2r1D8zWAxuj6oNvprje4mreNSCeuXg-fjOLUfvTPOW61IdjR_WBQZiEPTMh4YTqSt9GJXQw/s1600-h/Indiandotnet_View_2%25255B3%25255D.jpg&quot;&gt;&lt;img title=&quot;Indiandotnet_View_2&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Indiandotnet_View_2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3-xpAimaVLCrGQ0GsvTnioy7QneTMwb0_r-lt4QGsTYxmcF8pY8vy36Vbg_ueD9Cbhj31OMSRBQ4lrp1BR9TO7X8ceXIlFF2smMF4W1hcw0WRLDogthXK_x5JAoTPvSTvjD1fiA//?imgmax=800&quot; width=&quot;540&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;As shown record 2004’s FirstValue is updated to value “Updated”&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Now in similar way we can delete the record using View.&lt;/p&gt; &lt;p&gt;Although there are certain other factor due to which “Insert/update/delete” is possible.&lt;/p&gt; &lt;p&gt;like we have only simple schema.&lt;/p&gt; &lt;p&gt;I will describe this later with more detail like&amp;nbsp; scenario where&amp;nbsp; we can not Insert/Uppdate/delete using view.&lt;/p&gt; &lt;p&gt;Till than Enjoy !!!&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Thanks&lt;/p&gt; &lt;p&gt;RJ &lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;Be the best&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/57768725056666036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32616583/posts/default/57768725056666036'/><link rel='alternate' type='text/html' href='http://rajatjaiswal.blogspot.com/2015/06/a-myth-about-view-tip-102.html' title='A myth about view TIP #102'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieX_vzMq6YtGxh6rbBrfxAS5a5kh2P37h3YUPwdiml9tOENRDx5s-6x1mpYaMzrf2t-V62XIA4DAEEMMaSt-uZCb2sivI-5K7xenptx2ako0RTooaRHfFeYtlCbjHHo32wdi31gA/s72-c/?imgmax=800" height="72" width="72"/></entry></feed>