<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Change Collation of Database Column &#8211; T-SQL Script &#8211; Consolidating Collations &#8211; Extention Script</title>
	<atom:link href="http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 09 Feb 2012 19:36:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Collation and Collation Sensitivity &#8211; Quiz &#8211; Puzzle &#8211; 6 of 31 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-233265</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Collation and Collation Sensitivity &#8211; Quiz &#8211; Puzzle &#8211; 6 of 31 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sun, 08 Jan 2012 01:30:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-233265</guid>
		<description><![CDATA[[...] resolve collation conflict for equal to operation Find Database Collation Using T-SQL and SSMS Change Collation of Database Column – T-SQL Script – Consolidating Collations – Extension Sc... Default Collation of SQL Server [...]]]></description>
		<content:encoded><![CDATA[<p>[...] resolve collation conflict for equal to operation Find Database Collation Using T-SQL and SSMS Change Collation of Database Column – T-SQL Script – Consolidating Collations – Extension Sc&#8230; Default Collation of SQL Server [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: soowork</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-191653</link>
		<dc:creator><![CDATA[soowork]]></dc:creator>
		<pubDate>Wed, 09 Nov 2011 15:32:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-191653</guid>
		<description><![CDATA[The link to the scripts no longer works - can this be fixed please??]]></description>
		<content:encoded><![CDATA[<p>The link to the scripts no longer works &#8211; can this be fixed please??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-174633</link>
		<dc:creator><![CDATA[Brian]]></dc:creator>
		<pubDate>Mon, 03 Oct 2011 13:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-174633</guid>
		<description><![CDATA[Ronald, please see my follow-up reply above (September 28, 2010).  This will likely solve the connection issue you&#039;ve described.]]></description>
		<content:encoded><![CDATA[<p>Ronald, please see my follow-up reply above (September 28, 2010).  This will likely solve the connection issue you&#8217;ve described.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronald Kraijesteijn</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-147990</link>
		<dc:creator><![CDATA[Ronald Kraijesteijn]]></dc:creator>
		<pubDate>Wed, 13 Jul 2011 13:10:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-147990</guid>
		<description><![CDATA[I am having problems with the pre-3 script. I am getting these kinds of errors:

ERROR: Connect.
Source: ODSOLE Extended Procedure
Description: [Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).

Any idea how to fix this? I am sysadmin on the server.]]></description>
		<content:encoded><![CDATA[<p>I am having problems with the pre-3 script. I am getting these kinds of errors:</p>
<p>ERROR: Connect.<br />
Source: ODSOLE Extended Procedure<br />
Description: [Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.<br />
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).</p>
<p>Any idea how to fix this? I am sysadmin on the server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronald Kraijesteijn</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-147948</link>
		<dc:creator><![CDATA[Ronald Kraijesteijn]]></dc:creator>
		<pubDate>Wed, 13 Jul 2011 10:10:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-147948</guid>
		<description><![CDATA[Thanks a lot! I become crazy of this collation stuff after migrating to a new data center with database consolidation of multiple users. I am trying to use your script so solve this problem!]]></description>
		<content:encoded><![CDATA[<p>Thanks a lot! I become crazy of this collation stuff after migrating to a new data center with database consolidation of multiple users. I am trying to use your script so solve this problem!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-122694</link>
		<dc:creator><![CDATA[Andrea]]></dc:creator>
		<pubDate>Thu, 10 Mar 2011 15:08:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-122694</guid>
		<description><![CDATA[Thank you! You saved my day! ;-)]]></description>
		<content:encoded><![CDATA[<p>Thank you! You saved my day! ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kevin benedict</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-112238</link>
		<dc:creator><![CDATA[kevin benedict]]></dc:creator>
		<pubDate>Thu, 20 Jan 2011 15:09:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-112238</guid>
		<description><![CDATA[thank you. I appreciate your work.]]></description>
		<content:encoded><![CDATA[<p>thank you. I appreciate your work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-111662</link>
		<dc:creator><![CDATA[Andy]]></dc:creator>
		<pubDate>Tue, 18 Jan 2011 13:46:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-111662</guid>
		<description><![CDATA[Hi

Another issue I has with these scripts was that FOREIGN KEY CONSTRAINTS generated duplicate entries on script 1 and 3, to solve this I added a Distinct to the relevent select statements.

Other than that these scripts worked great, Cheers for publishing them.]]></description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Another issue I has with these scripts was that FOREIGN KEY CONSTRAINTS generated duplicate entries on script 1 and 3, to solve this I added a Distinct to the relevent select statements.</p>
<p>Other than that these scripts worked great, Cheers for publishing them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-111659</link>
		<dc:creator><![CDATA[Andy]]></dc:creator>
		<pubDate>Tue, 18 Jan 2011 13:40:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-111659</guid>
		<description><![CDATA[Hi,

The database I need to convert used alot of user defined types, to support this I changed the select in script 2 as follows. Basically it checks the DOMAIN_NAME which on my system contained the name of the user defined type for the column. (User defined types appear to take the default collation of the database so this is not specified)
-------

SELECT [SET_COLLATION] = (&#039;ALTER TABLE [&#039; + TABLE_NAME + &#039;] ALTER COLUMN [&#039; + COLUMN_NAME + &#039;] &#039; + 
	CASE WHEN DOMAIN_NAME is null THEN 
		DATA_TYPE + 
		CASE WHEN 
			DATA_TYPE IN (&#039;text&#039;,&#039;ntext&#039;) THEN 
				&#039; COLLATE &#039; + @collation  
			ELSE 
				&#039;(&#039;+CAST(CHARACTER_MAXIMUM_LENGTH AS VARCHAR(10))+&#039;)&#039;  + &#039; COLLATE &#039; + @collation 
			END 
		ELSE
			DOMAIN_NAME		
		END
				+ CASE IS_NULLABLE WHEN &#039;NO&#039; THEN &#039; NOT NULL&#039; WHEN &#039;YES&#039; THEN &#039; NULL&#039; END
	
	) 	
	COLLATE Latin1_General_CI_AS
FROM INFORMATION_SCHEMA.columns  
WHERE
	TABLE_NAME  N&#039;dtproperties&#039; AND
	OBJECTPROPERTY(OBJECT_ID(TABLE_NAME), N&#039;IsUserTable&#039;) = 1 AND
	COLLATION_NAME  @collation]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>The database I need to convert used alot of user defined types, to support this I changed the select in script 2 as follows. Basically it checks the DOMAIN_NAME which on my system contained the name of the user defined type for the column. (User defined types appear to take the default collation of the database so this is not specified)<br />
&#8212;&#8212;-</p>
<p>SELECT [SET_COLLATION] = (&#8216;ALTER TABLE [' + TABLE_NAME + '] ALTER COLUMN [' + COLUMN_NAME + '] &#8216; +<br />
	CASE WHEN DOMAIN_NAME is null THEN<br />
		DATA_TYPE +<br />
		CASE WHEN<br />
			DATA_TYPE IN (&#8216;text&#8217;,'ntext&#8217;) THEN<br />
				&#8216; COLLATE &#8216; + @collation<br />
			ELSE<br />
				&#8216;(&#8216;+CAST(CHARACTER_MAXIMUM_LENGTH AS VARCHAR(10))+&#8217;)&#8217;  + &#8216; COLLATE &#8216; + @collation<br />
			END<br />
		ELSE<br />
			DOMAIN_NAME<br />
		END<br />
				+ CASE IS_NULLABLE WHEN &#8216;NO&#8217; THEN &#8216; NOT NULL&#8217; WHEN &#8216;YES&#8217; THEN &#8216; NULL&#8217; END</p>
<p>	)<br />
	COLLATE Latin1_General_CI_AS<br />
FROM INFORMATION_SCHEMA.columns<br />
WHERE<br />
	TABLE_NAME  N&#8217;dtproperties&#8217; AND<br />
	OBJECTPROPERTY(OBJECT_ID(TABLE_NAME), N&#8217;IsUserTable&#8217;) = 1 AND<br />
	COLLATION_NAME  @collation</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: naser</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-102462</link>
		<dc:creator><![CDATA[naser]]></dc:creator>
		<pubDate>Sat, 27 Nov 2010 11:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-102462</guid>
		<description><![CDATA[Hi sir,
I can&#039;t download the scripts. If the address of download-able files have been changed?]]></description>
		<content:encoded><![CDATA[<p>Hi sir,<br />
I can&#8217;t download the scripts. If the address of download-able files have been changed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-89928</link>
		<dc:creator><![CDATA[Brian]]></dc:creator>
		<pubDate>Tue, 28 Sep 2010 14:50:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-89928</guid>
		<description><![CDATA[Hello all.
This is the author of the article and have been meaning to publish a couple bugs I&#039;ve discovered.

Script: Pre-Script_0_DBADB.sp_scriptObject.sql
Line 81
Should be changed from:
EXEC @rc = sp_OAMethod @o_server , &#039;Connect&#039;, NULL, &#039;(local)&#039;

to

EXEC @rc = sp_OAMethod @o_server , &#039;Connect&#039;, NULL, @@SERVERNAME

The above corrects the &quot;connect&quot; issue when running the scripts against a named instance.


These scripts were technically designed to run on a SQL 2000 instance, where the generated DDL could then be run on any version.  So, technically this isn&#039;t an error.  However, I&#039;ve found that these scripts do run fine on SQL&#039;05 and SQL&#039;08.  However, Microsoft dropped DMO in 2005 and replaced it with SMO.  So, in order for these to run, you may need to install DMO with the Backward Compatability package which can be downloaded at:

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&amp;displaylang=en


@CJ - Thanks for spotting that.  Sounds like you&#039;re current collation is Case Sensitive.  So, by correcting the case for .COLUMNS, it makes the script much more generic - exactly what I was trying to achieve.

@Kevin - Apologies for not posting this sooner.  Your connection issue is addressed in my first bullet point above.]]></description>
		<content:encoded><![CDATA[<p>Hello all.<br />
This is the author of the article and have been meaning to publish a couple bugs I&#8217;ve discovered.</p>
<p>Script: Pre-Script_0_DBADB.sp_scriptObject.sql<br />
Line 81<br />
Should be changed from:<br />
EXEC @rc = sp_OAMethod @o_server , &#8216;Connect&#8217;, NULL, &#8216;(local)&#8217;</p>
<p>to</p>
<p>EXEC @rc = sp_OAMethod @o_server , &#8216;Connect&#8217;, NULL, @@SERVERNAME</p>
<p>The above corrects the &#8220;connect&#8221; issue when running the scripts against a named instance.</p>
<p>These scripts were technically designed to run on a SQL 2000 instance, where the generated DDL could then be run on any version.  So, technically this isn&#8217;t an error.  However, I&#8217;ve found that these scripts do run fine on SQL&#8217;05 and SQL&#8217;08.  However, Microsoft dropped DMO in 2005 and replaced it with SMO.  So, in order for these to run, you may need to install DMO with the Backward Compatability package which can be downloaded at:</p>
<p><a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&#038;displaylang=en" rel="nofollow">http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&#038;displaylang=en</a></p>
<p>@CJ &#8211; Thanks for spotting that.  Sounds like you&#8217;re current collation is Case Sensitive.  So, by correcting the case for .COLUMNS, it makes the script much more generic &#8211; exactly what I was trying to achieve.</p>
<p>@Kevin &#8211; Apologies for not posting this sooner.  Your connection issue is addressed in my first bullet point above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CJ</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-88966</link>
		<dc:creator><![CDATA[CJ]]></dc:creator>
		<pubDate>Wed, 22 Sep 2010 12:44:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-88966</guid>
		<description><![CDATA[Thx,

This was a very helpfull article and scripts.

There are 2 errors
1: in de Usage.txt it says you need to create the database named &#039;DBA_Data&#039; wich should be DBADB (as mentioned in the article)
2: when you use these scripts in 2005, you have to change 
Pre-Script_2_CHANGE_COLLATIONS:
change 
FROM INFORMATION_SCHEMA.columns 
into 
FROM INFORMATION_SCHEMA.COLUMNS

After this it works like a charm.]]></description>
		<content:encoded><![CDATA[<p>Thx,</p>
<p>This was a very helpfull article and scripts.</p>
<p>There are 2 errors<br />
1: in de Usage.txt it says you need to create the database named &#8216;DBA_Data&#8217; wich should be DBADB (as mentioned in the article)<br />
2: when you use these scripts in 2005, you have to change<br />
Pre-Script_2_CHANGE_COLLATIONS:<br />
change<br />
FROM INFORMATION_SCHEMA.columns<br />
into<br />
FROM INFORMATION_SCHEMA.COLUMNS</p>
<p>After this it works like a charm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kevin</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-84465</link>
		<dc:creator><![CDATA[kevin]]></dc:creator>
		<pubDate>Tue, 17 Aug 2010 21:42:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-84465</guid>
		<description><![CDATA[I tried it on sql server 2005. the first two scripts ran find, but when I ran the third script, Pre-Script_3_CREATE_DEPENDENCIES.sql, I kept getting

ERROR: Connect for each call. 

I am sysadm, and do not know what is wrong. I need to have something by friday, and am researching another method that does about the same thing, but is more manual, and is taking much longer. any suggestions as to what I am doing wrong would be appreciated.]]></description>
		<content:encoded><![CDATA[<p>I tried it on sql server 2005. the first two scripts ran find, but when I ran the third script, Pre-Script_3_CREATE_DEPENDENCIES.sql, I kept getting</p>
<p>ERROR: Connect for each call. </p>
<p>I am sysadm, and do not know what is wrong. I need to have something by friday, and am researching another method that does about the same thing, but is more manual, and is taking much longer. any suggestions as to what I am doing wrong would be appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rene Moosens</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-79260</link>
		<dc:creator><![CDATA[Rene Moosens]]></dc:creator>
		<pubDate>Thu, 08 Jul 2010 14:27:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-79260</guid>
		<description><![CDATA[I let it work on MSSQL 2008.

One remark, I had to run sp_configure to enable &#039;Ole Automation Procedures&#039; during generation of the CREATE script.]]></description>
		<content:encoded><![CDATA[<p>I let it work on MSSQL 2008.</p>
<p>One remark, I had to run sp_configure to enable &#8216;Ole Automation Procedures&#8217; during generation of the CREATE script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Wickström</title>
		<link>http://blog.sqlauthority.com/2009/10/19/sql-server-change-collation-of-database-column-t-sql-script-consolidating-collations-extention-script/#comment-68931</link>
		<dc:creator><![CDATA[Jon Wickström]]></dc:creator>
		<pubDate>Tue, 04 May 2010 13:52:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7139#comment-68931</guid>
		<description><![CDATA[Hmm... Does this work on MSSQL 2005?]]></description>
		<content:encoded><![CDATA[<p>Hmm&#8230; Does this work on MSSQL 2005?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

