Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Problems upgrading from 4.9.2 to 5.1.1 - collation issuesProblems upgrading from 4.9.2 to 5.1.1 - collation issues
Previous
 
Next
New Post
3/14/2011 2:01 PM
 
Hi, when trying to run an upgrade from 4.9.2 to 5.1.1, I get SQL errors at the 5.0.0 and 5.1.1 stages. The error log files contain the following two collation related issues:

 
SQL error System.Data.SqlClient.SqlException: Cannot resolve collation conflict for column 9 in SELECT statement.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
 
 
CREATE VIEW dbo.vw_Tabs
AS
 SELECT    
  TabID,
  TabOrder,
  PortalID,
  TabName,
  IsVisible,
  ParentId,
  [Level],
        CASE WHEN LEFT(LOWER(T.IconFile), 7) = 'fileid=' THEN
                  (SELECT Folder + FileName
                    FROM  dbo.Files
                    WHERE fileid = CAST((RIGHT(LOWER(T.IconFile), Len(T.IconFile) - 7)) AS int)) ELSE T.IconFile END AS IconFile,
        CASE WHEN LEFT(LOWER(T.IconFileLarge), 7) = 'fileid=' THEN
                  (SELECT Folder + FileName
                    FROM  dbo.Files
                    WHERE fileid = CAST((RIGHT(LOWER(T.IconFileLarge), Len(T.IconFileLarge) - 7)) AS int)) ELSE T.IconFileLarge END AS IconFileLarge,
  DisableLink,
  Title,
  Description,
  KeyWords,
  IsDeleted,
  SkinSrc,
  ContainerSrc,
  TabPath,
  StartDate,
  EndDate,
  Url,
  CASE WHEN EXISTS (SELECT  1 FROM dbo.Tabs T2 WHERE T2.ParentId = T.TabId) THEN 'true' ELSE 'false' END AS HasChildren,
  RefreshInterval,
  PageHeadText,
  IsSecure,
  PermanentRedirect,
  SiteMapPriority,
  CreatedByUserID,
  CreatedOnDate,
  LastModifiedByUserID,
  LastModifiedOnDate
 FROM dbo.Tabs AS T
 
 -----------------------------------------------
 
System.Data.SqlClient.SqlException: Cannot resolve collation conflict for column 2 in SELECT statement.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
 
 
 
CREATE PROCEDURE dbo.[GetPortalSettings]
 @PortalID int
 
AS
 SELECT
  SettingName,
  CASE WHEN LEFT(LOWER(dbo.PortalSettings.SettingValue), 6) = 'fileid'
   THEN
    (SELECT Folder + FileName 
     FROM dbo.Files
     WHERE 'fileid=' + convert(varchar,dbo.Files.FileID) = dbo.PortalSettings.SettingValue
    )
   ELSE
    dbo.PortalSettings.SettingValue 
   END
  AS SettingValue,
  dbo.PortalSettings.CreatedByUserID,
  dbo.PortalSettings.CreatedOnDate,
  dbo.PortalSettings.LastModifiedByUserID,
  dbo.PortalSettings.LastModifiedOnDate
 FROM dbo.PortalSettings
 WHERE  PortalID = @PortalID

------------------------------------------------------------

I used the following script (courtesy of Sebastian Leupold) to verify the collation settingd for the server:

SELECT

DATABASEPROPERTYEX( '<mydb>' , 'Collation' ) AS DotNetNukeDB_Collation,

DATABASEPROPERTYEX( 'tempdb' , 'Collation' ) AS TempDB_Collation,

SERVERPROPERTY( 'Collation' ) AS Server_Default_Collation


and this showed that all three properties were set to Latin1_General_CI_AS - i.e the default database setting.

Predictably, the stored procedure 'GetPortalSettings' and the view 'vw_Tabs' were not created and the site is not working.


The fact that the relevant collations are all set to the same value would suggest that this really isn't a collation issue, but I'm no expert in the area.

Any help would be much appreciated, workarounds, fixes etc.

Cheers

Phil
 
New Post
3/14/2011 2:38 PM
 
please validate collation of columns Tabs.IconFile, Tabs.IconFileLarge and PortalSettings.SettingValue to be the same as well.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/14/2011 3:14 PM
 
Thanks for the quick reponse Sebastian...the collation for the fields you noted are:

Tabs.IconFile -- SQL_Latin1_General_CP1_CI_AS
Tabs.IconFileLarge -- Latin1_General_CI_AS
PortalSettings.SettingValue -- Latin1_General_CI_AS

So looks like Tabs.IconFile might be cuasing one of the issues. How might this be resolved?

Phil
 
New Post
3/14/2011 4:42 PM
 
http://stackoverflow.com/questions/1091617/alter-column-charset-and-collation-ms-sql-2005

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Problems upgrading from 4.9.2 to 5.1.1 - collation issuesProblems upgrading from 4.9.2 to 5.1.1 - collation issues


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out