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

<channel>
	<title>Amar Galla&#039;s Weblog &#187; SQL Server</title>
	<atom:link href="http://amargalla.com/category/Blog/sql-server/feed" rel="self" type="application/rss+xml" />
	<link>http://amargalla.com</link>
	<description>Business, Life and SharePoint</description>
	<lastBuildDate>Fri, 29 Jul 2011 12:49:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Unable to connect to SQL Server 2008</title>
		<link>http://amargalla.com/Blog/sql-server/168-unable-to-connect-to-sql-server-2008</link>
		<comments>http://amargalla.com/Blog/sql-server/168-unable-to-connect-to-sql-server-2008#comments</comments>
		<pubDate>Sat, 05 Jun 2010 06:06:00 +0000</pubDate>
		<dc:creator>Amar</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://amargalla.com/Blog/sql-server/168-unable-to-connect-to-sql-server-2008</guid>
		<description><![CDATA[When you first install SQL Server 2008, you are unable to connect to the SQL Server from another machine in the network. You have enabled remote connections and still whenever you try to connect, you get an access denied error. Make sure the SQL Server Browser service is running. It is required in order to [...]]]></description>
			<content:encoded><![CDATA[<p>When you first install SQL Server 2008, you are unable to connect to the SQL Server from another machine in the network. You have enabled remote connections and still whenever you try to connect, you get an access denied error.</p>
<p>Make sure the SQL Server Browser service is running. It is required in order to listen for incoming connections. It may even be Disabled ( as in the case of SQL 2008 R2 Enterprise ). </p>
]]></content:encoded>
			<wfw:commentRss>http://amargalla.com/Blog/sql-server/168-unable-to-connect-to-sql-server-2008/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL2005 and Windows Installer Clashes</title>
		<link>http://amargalla.com/Blog/sql-server/27-sql2005-and-windows-installer-clashes</link>
		<comments>http://amargalla.com/Blog/sql-server/27-sql2005-and-windows-installer-clashes#comments</comments>
		<pubDate>Mon, 20 Feb 2006 17:41:00 +0000</pubDate>
		<dc:creator>Amar</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">/blog/archive/2006/02/20/sql2005-and-windows-installer-clashes.aspx</guid>
		<description><![CDATA[I recently came across a problem while installing SQL Server 2005 with Windows Installer 3.1. I tried with Windows Installer 3.1 and v2 of 3.1. But it always kept failing. I resolved the problem by uninstalling Windows Installer 3.1 ( it will give a protest message that almost all the major services on my machine [...]]]></description>
			<content:encoded><![CDATA[<p><P>I recently came across a problem while installing SQL Server 2005 with Windows Installer 3.1. I tried with Windows Installer 3.1 and v2 of 3.1. But it always kept failing. I resolved the problem by uninstalling Windows Installer 3.1 ( it will give a protest message that almost all the major services on my machine will fail, but just ignore it ). After uninstalling 3.1, I downloaded Windows Installer 3.0 and installed it. Rebooted my machine, and tried to install SQL Server 2005, and it succeeded !!!</P><br />
<P>There have been many reported problems with Windows Installer 3.1 failing silently in some cases. I for one, will be staying away from 3.1 till a proper next version is rolled out <img src='http://amargalla.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </P></p>
]]></content:encoded>
			<wfw:commentRss>http://amargalla.com/Blog/sql-server/27-sql2005-and-windows-installer-clashes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excel import gives NULL rows with DTS</title>
		<link>http://amargalla.com/Blog/sql-server/24-excel-import-gives-null-rows-with-dts</link>
		<comments>http://amargalla.com/Blog/sql-server/24-excel-import-gives-null-rows-with-dts#comments</comments>
		<pubDate>Mon, 20 Feb 2006 17:38:00 +0000</pubDate>
		<dc:creator>Amar</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">/blog/archive/2006/02/20/excel-import-gives-null-rows-with-dts.aspx</guid>
		<description><![CDATA[Sometimes, when the excel column contains numeric and text data, and you try to import the excel data using say DTS, it will give you either the text values or the numeric values and return NULLs for the other. This is a known problem in excel as it scans rows ( based on the set [...]]]></description>
			<content:encoded><![CDATA[<p><P>Sometimes, when the excel column contains numeric and text data, and you try to import the excel data using say DTS, it will give you either the text values or the numeric values and return NULLs for the other. This is a known problem in excel as it scans rows ( based on the set count, which can be 1 ), and determines the datatype for that column. Any row which does not adhere to that guessed datatype, gets imported as NULL for that column.</P><br />
<P>A solution to this problem as shown by the knowledge base is to add the option IMEX=1; in the connection string. If you use something like DAO to open the excel data, then you can write as according to the MS knowledge article ID 194124 :</P><br />
<P><CODE><BR>Set Db = OpenDatabase(&#8220;C:\Temp\Book1.xls&#8221;, _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; False, True, &#8220;Excel 8.0; HDR=NO; IMEX=1;&#8221;)<BR></CODE></P><br />
<P>But the problem is that if we are using DTS,&nbsp;and the&nbsp;excel connection object&nbsp;is opening the connection. So&nbsp;there is no code present as shown above in the package. But fortunately, there is a place&nbsp;where we can modify it. In the excel connections properties ( visible either thru&nbsp;disconnected edit, or a dynamic property task or thru the API functions ), there is a key called OLE DB Properties -&gt; Extended Properties. Add the setting IMEX=1; to the existing value and your problem should be solved. You will be able to&nbsp;import the entire&nbsp;excel sheet data thru DTS without worrying about missed values. This setting puts the&nbsp;mode of excel as import, and&nbsp;retreives all values as text&nbsp;instead of doing a data type guessing. </P></p>
]]></content:encoded>
			<wfw:commentRss>http://amargalla.com/Blog/sql-server/24-excel-import-gives-null-rows-with-dts/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Finding if a DTS Package is running</title>
		<link>http://amargalla.com/Blog/sql-server/23-finding-if-a-dts-package-is-running</link>
		<comments>http://amargalla.com/Blog/sql-server/23-finding-if-a-dts-package-is-running#comments</comments>
		<pubDate>Mon, 20 Feb 2006 17:37:00 +0000</pubDate>
		<dc:creator>Amar</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">/blog/archive/2006/02/20/finding-if-a-dts-package-is-running.aspx</guid>
		<description><![CDATA[I was stuck at finding a solution to if a DTS Package is executing or not. It could have been started with the scheduler, or started manually. The only solution to this problem which&#160;I could come up with without any code changes to the package itself, was to enable Logging to SQL Server, and then [...]]]></description>
			<content:encoded><![CDATA[<p><P>I was stuck at finding a solution to if a DTS Package is executing or not. It could have been started with the scheduler, or started manually. The only solution to this problem which&nbsp;I could come up with without any code changes to the package itself, was to enable Logging to SQL Server, and then checking the state of the package in the syspackagelog table by the following query</P><br />
<P><CODE><BR>SELECT TOP 1 endtime FROM msdb.sysdtspackagelog WHERE<BR>name = &#8216;Your Package Name&#8217; ORDER BY starttime DESC<BR></CODE></P><br />
<P>If it returns a date, then the package is not running, and if it returns NULL, then the package is currently in executing stage. </P></p>
]]></content:encoded>
			<wfw:commentRss>http://amargalla.com/Blog/sql-server/23-finding-if-a-dts-package-is-running/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>INI File limitations in DTS</title>
		<link>http://amargalla.com/Blog/sql-server/22-ini-file-limitations-in-dts</link>
		<comments>http://amargalla.com/Blog/sql-server/22-ini-file-limitations-in-dts#comments</comments>
		<pubDate>Mon, 20 Feb 2006 17:36:00 +0000</pubDate>
		<dc:creator>Amar</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">/blog/archive/2006/02/20/ini-file-limitations-in-dts.aspx</guid>
		<description><![CDATA[SQL Server 2000 DTS has a nice little Dynamic Properties task. But its usefulness for INI files is limited by some stupid limitations ( bugs/ features )&#160;of the size of data in the INI files. To overcome it, the only possible solution I found was to write a custom ini file parser script and use [...]]]></description>
			<content:encoded><![CDATA[<p><P>SQL Server 2000 DTS has a nice little Dynamic Properties task. But its usefulness for INI files is limited by some stupid limitations ( bugs/ features )&nbsp;of the size of data in the INI files. To overcome it, the only possible solution I found was to write a custom ini file parser script and use it to directly retrieve values form the INI files. Fortunately I found a very nice script by Nolan Bagadiogn which uses regular exceptions and does not get limited in any way on number of spaces between keywords and values. Use this in an ActiveX Scripting Task, and enjoy <img src='http://amargalla.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </P><br />
<P>For reference, you can download it from<BR><A href="http://cwashington.netreach.net/depo/view.asp?Index=553&amp;ScriptType=vbscript" target=_blank mce_href="http://cwashington.netreach.net/depo/view.asp?Index=553&amp;ScriptType=vbscript">http://cwashington.netreach.net/depo/view.asp?Index=553&amp;ScriptType=vbscript</A></P><br />
<P>Nolan, thanks for the nice script. It is very much appreciated. </P></p>
]]></content:encoded>
			<wfw:commentRss>http://amargalla.com/Blog/sql-server/22-ini-file-limitations-in-dts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing to DTS Package Logs thru ActiveX Scripts</title>
		<link>http://amargalla.com/Blog/sql-server/21-writing-to-dts-package-logs-thru-activex-scripts</link>
		<comments>http://amargalla.com/Blog/sql-server/21-writing-to-dts-package-logs-thru-activex-scripts#comments</comments>
		<pubDate>Mon, 20 Feb 2006 17:28:00 +0000</pubDate>
		<dc:creator>Amar</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">/blog/archive/2006/02/20/writing-to-dts-package-logs-thru-activex-scripts.aspx</guid>
		<description><![CDATA[If you would like to write custom error messages to the DTS log files thru your ActiveX scripts, the DTSPackageLog.WriteStringToLog method can be of help. Just call it as DTSPackageLog.WriteStringToLog “Custom Error Message” and it will appear as a Task Log in the log file.]]></description>
			<content:encoded><![CDATA[<p><P>If you would like to write custom error messages to the DTS log files thru your ActiveX scripts, the DTSPackageLog.WriteStringToLog method can be of help.</P><br />
<P>Just call it as</P><br />
<P><CODE>DTSPackageLog.WriteStringToLog “Custom Error Message”</CODE></P><br />
<P>and it will appear as a Task Log in the log file. </P></p>
]]></content:encoded>
			<wfw:commentRss>http://amargalla.com/Blog/sql-server/21-writing-to-dts-package-logs-thru-activex-scripts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Log File Dynamically in SQL Server 2000 DTS</title>
		<link>http://amargalla.com/Blog/sql-server/20-setting-log-file-dynamically-in-sql-server-2000-dts</link>
		<comments>http://amargalla.com/Blog/sql-server/20-setting-log-file-dynamically-in-sql-server-2000-dts#comments</comments>
		<pubDate>Mon, 20 Feb 2006 17:25:00 +0000</pubDate>
		<dc:creator>Amar</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">/blog/archive/2006/02/20/setting-log-file-dynamically-in-sql-server-2000-dts.aspx</guid>
		<description><![CDATA[Very often there are cases when we want to have our DTS package to&#160;log error at a different path or file. This can very easily be achieved in the following way&#8230; Read the log file&#160;path from a config file and store it to a global variable called ErrorLogFile&#160;using the Dynamic Properties Task. Set the Package&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><P>Very often there are cases when we want to have our DTS package to&nbsp;log error at a different path or file. This can very easily be achieved in the following way&#8230;</P><br />
<OL><br />
<LI>Read the log file&nbsp;path from a config file and store it to a global variable called ErrorLogFile&nbsp;using the Dynamic Properties Task.</LI><br />
<LI>Set the Package&#8217;s error log to the new value using ActiveX scripting.</LI></OL><br />
<P><CODE><BR>set oPackage = DTSGlobalVariables.Parent<BR>oPackage.Properties(&#8220;LogFileName&#8221;).Value = DTSGlobalVariables(&#8220;ErrorLogFile&#8221;).Value<BR></CODE></P></p>
]]></content:encoded>
			<wfw:commentRss>http://amargalla.com/Blog/sql-server/20-setting-log-file-dynamically-in-sql-server-2000-dts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looping in SQL Server 2000 DTS</title>
		<link>http://amargalla.com/Blog/sql-server/19-looping-in-sql-server-2000-dts</link>
		<comments>http://amargalla.com/Blog/sql-server/19-looping-in-sql-server-2000-dts#comments</comments>
		<pubDate>Mon, 20 Feb 2006 17:24:00 +0000</pubDate>
		<dc:creator>Amar</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">/blog/archive/2006/02/20/looping-in-sql-server-2000-dts.aspx</guid>
		<description><![CDATA[While working on an assignment involving some complex data loading using DTS Packages, I came across the need to loop through all the files present in a directory and perform a set of tasks for each file and also handle errors on a per file basis. I found this excellent article on sqldts.com which outlines [...]]]></description>
			<content:encoded><![CDATA[<p><P>While working on an assignment involving some complex data loading using DTS Packages, I came across the need to loop through all the files present in a directory and perform a set of tasks for each file and also handle errors on a per file basis.</P><br />
<P>I found this excellent article on sqldts.com which outlines a very simple yet effective way of condition based looping through dts tasks. Check it out <A href="http://www.sqldts.com/default.aspx?246" target=_blank mce_href="http://www.sqldts.com/default.aspx?246">here</A>. </P></p>
]]></content:encoded>
			<wfw:commentRss>http://amargalla.com/Blog/sql-server/19-looping-in-sql-server-2000-dts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

