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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Cannot resolve the collation conflict between "Latin1_General_CI_AS"Cannot resolve the collation conflict between "Latin1_General_CI_AS"
Previous
 
Next
New Post
7/13/2010 5:13 AM
 
I will try to investigate it within the next days.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/13/2010 9:32 AM
 
Thanks Sebastian.

It's a bit bigger than the Event Log i think.  i ran this:

SELECT TABLE_NAME, COLUMN_NAME, COLLATION_NAME
FROM INFORMATION_SCHEMA.COLUMNS

and the result was substantial.  Here's a snippet of the CSV file I saved.  All told there are 532 instances of this.

Table Name Column Name Collation Name
AllDnn_More_item Description SQL_Latin1_General_CP850_CI_AI
AllDnn_More_item Icon SQL_Latin1_General_CP850_CI_AI
AllDnn_More_item Title SQL_Latin1_General_CP850_CI_AI
AllDnn_More_item Url SQL_Latin1_General_CP850_CI_AI
Announcements Description SQL_Latin1_General_CP850_CI_AI
Announcements ImageSource SQL_Latin1_General_CP850_CI_AI
Announcements Title SQL_Latin1_General_CP850_CI_AI
Announcements URL SQL_Latin1_General_CP850_CI_AI
AnonymousUsers UserID SQL_Latin1_General_CP850_CI_AI
aspnet_Applications ApplicationName SQL_Latin1_General_CP850_CI_AI
aspnet_Applications Description SQL_Latin1_General_CP850_CI_AI
aspnet_Applications LoweredApplicationName SQL_Latin1_General_CP850_CI_AI
aspnet_Membership Comment SQL_Latin1_General_CP850_CI_AI
aspnet_Membership Email SQL_Latin1_General_CP850_CI_AI
aspnet_Membership LoweredEmail SQL_Latin1_General_CP850_CI_AI
aspnet_Membership MobilePIN SQL_Latin1_General_CP850_CI_AI
aspnet_Membership Password SQL_Latin1_General_CP850_CI_AI
aspnet_Membership PasswordAnswer SQL_Latin1_General_CP850_CI_AI
aspnet_Membership PasswordQuestion SQL_Latin1_General_CP850_CI_AI
aspnet_Membership PasswordSalt SQL_Latin1_General_CP850_CI_AI
aspnet_Profile PropertyNames SQL_Latin1_General_CP850_CI_AI
aspnet_Profile PropertyValuesString SQL_Latin1_General_CP850_CI_AI
aspnet_Roles Description SQL_Latin1_General_CP850_CI_AI
aspnet_Roles LoweredRoleName SQL_Latin1_General_CP850_CI_AI
aspnet_Roles RoleName SQL_Latin1_General_CP850_CI_AI
aspnet_SchemaVersions CompatibleSchemaVersion SQL_Latin1_General_CP850_CI_AI
aspnet_SchemaVersions Feature SQL_Latin1_General_CP850_CI_AI
aspnet_Users LoweredUserName SQL_Latin1_General_CP850_CI_AI
aspnet_Users MobileAlias SQL_Latin1_General_CP850_CI_AI
aspnet_Users UserName SQL_Latin1_General_CP850_CI_AI
Assemblies AssemblyName SQL_Latin1_General_CP850_CI_AI
Assemblies Version SQL_Latin1_General_CP850_CI_AI
Authentication AuthenticationType SQL_Latin1_General_CP850_CI_AI
Authentication LoginControlSrc SQL_Latin1_General_CP850_CI_AI
Authentication LogoffControlSrc SQL_Latin1_General_CP850_CI_AI
Authentication SettingsControlSrc SQL_Latin1_General_CP850_CI_AI
Banners BannerName SQL_Latin1_General_CP850_CI_AI
Banners CreatedByUser SQL_Latin1_General_CP850_CI_AI
Banners Description SQL_Latin1_General_CP850_CI_AI
Banners GroupName SQL_Latin1_General_CP850_CI_AI
Banners ImageFile SQL_Latin1_General_CP850_CI_AI
Banners URL SQL_Latin1_General_CP850_CI_AI
Blog_Comments Email SQL_Latin1_General_CP850_CI_AI
Blog_Comments Website SQL_Latin1_General_CP850_CI_AI
Blog_Entries Description SQL_Latin1_General_CP850_CI_AI
Blog_MetaWeblogData TempInstallUrl SQL_Latin1_General_CP850_CI_AI
Classification ClassificationName SQL_Latin1_General_CP850_CI_AI
Dashboard_Controls ControllerClass SQL_Latin1_General_CP850_CI_AI
Dashboard_Controls DashboardControlKey SQL_Latin1_General_CP850_CI_AI
Dashboard_Controls DashboardControlLocalResources SQL_Latin1_General_CP850_CI_AI
Dashboard_Controls DashboardControlSrc SQL_Latin1_General_CP850_CI_AI
DesktopModules BusinessControllerClass SQL_Latin1_General_CP850_CI_AI
DesktopModules CompatibleVersions SQL_Latin1_General_CP850_CI_AI
DesktopModules Dependencies SQL_Latin1_General_CP850_CI_AI
DesktopModules Description SQL_Latin1_General_CP850_CI_AI
DesktopModules FolderName SQL_Latin1_General_CP850_CI_AI
DesktopModules FriendlyName SQL_Latin1_General_CP850_CI_AI
DesktopModules ModuleName SQL_Latin1_General_CP850_CI_AI
DesktopModules Permissions SQL_Latin1_General_CP850_CI_AI
DesktopModules Version SQL_Latin1_General_CP850_CI_AI
Discussion Body SQL_Latin1_General_CP850_CI_AI
Discussion CreatedByUser SQL_Latin1_General_CP850_CI_AI
Discussion DisplayOrder SQL_Latin1_General_CP850_CI_AI
Discussion Title SQL_Latin1_General_CP850_CI_AI
Documents Category SQL_Latin1_General_CP850_CI_AI
Documents Description SQL_Latin1_General_CP850_CI_AI
Documents Title SQL_Latin1_General_CP850_CI_AI
Documents URL SQL_Latin1_General_CP850_CI_AI
DocumentsSettings CategoriesListName SQL_Latin1_General_CP850_CI_AI
DocumentsSettings DefaultFolder SQL_Latin1_General_CP850_CI_AI
DocumentsSettings DisplayColumns SQL_Latin1_General_CP850_CI_AI
DocumentsSettings SortOrder SQL_Latin1_General_CP850_CI_AI
EventLog LogGUID SQL_Latin1_General_CP850_CI_AI
EventLog LogPortalName SQL_Latin1_General_CP850_CI_AI
EventLog LogProperties SQL_Latin1_General_CP850_CI_AI
EventLog LogServerName SQL_Latin1_General_CP850_CI_AI
EventLog LogTypeKey SQL_Latin1_General_CP850_CI_AI
EventLog LogUserName SQL_Latin1_General_CP850_CI_AI
EventLogConfig LogTypeKey SQL_Latin1_General_CP850_CI_AI
EventLogConfig MailFromAddress SQL_Latin1_General_CP850_CI_AI
EventLogConfig MailToAddress SQL_Latin1_General_CP850_CI_AI
EventLogTypes LogTypeCSSClass SQL_Latin1_General_CP850_CI_AI
EventLogTypes LogTypeDescription SQL_Latin1_General_CP850_CI_AI
EventLogTypes LogTypeFriendlyName SQL_Latin1_General_CP850_CI_AI
EventLogTypes LogTypeKey SQL_Latin1_General_CP850_CI_AI
EventLogTypes LogTypeOwner SQL_Latin1_General_CP850_CI_AI
EventQueue Attributes SQL_Latin1_General_CP850_CI_AI
EventQueue AuthorizedRoles SQL_Latin1_General_CP850_CI_AI
EventQueue Body SQL_Latin1_General_CP850_CI_AI
EventQueue EventName SQL_Latin1_General_CP850_CI_AI
EventQueue ExceptionMessage SQL_Latin1_General_CP850_CI_AI
EventQueue ProcessorCommand SQL_Latin1_General_CP850_CI_AI
EventQueue ProcessorType SQL_Latin1_General_CP850_CI_AI
EventQueue Sender SQL_Latin1_General_CP850_CI_AI
EventQueue Subscriber SQL_Latin1_General_CP850_CI_AI


-----
Cheers
Dave
 
New Post
7/13/2010 11:07 AM
 
Dave, I assume this is default collation and i.e. the results are fine. in most cases, joins are using integer columns, which are not affected by collation at all. Only there seems to be a single sproc, which joins with a table from temp database, which might use a different collation.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/13/2010 11:55 AM
 
I ran into this issue of the collation last week.  I am doing a DB migration from SQL 2000 to 2008 (not DNN related) and in the process I also have to harden the security of the server.  I use a script I learned some time ago to generate SQL statements that I need to do on many objects and all of a sudden I started getting the error "Cannot resolve collation conflict for column 1 in SELECT statement."   The statement below if a sample of the type of script you can do to generate other SQL statements:

SELECT 'REVOKE ' + RTRIM(p.permission_name) + ' ON ' + '[' + RTRIM(o.name) + '] ' + 'TO ' + RTRIM(u.name)  COLLATE DATABASE_DEFAULT
FROM sys.database_principals u
JOIN sys.database_permissions p ON u.principal_id = p.grantee_principal_id
JOIN sys.all_objects o ON p.major_id = o.object_id
WHERE p.state_desc <> 'DENY'
AND u.name IN ('guest', 'public')
ORDER BY u.name, o.name, p.permission_name

Like I said above, I have used statements like the above a lot without errors until now, in this DB migration, which I did via backup and restore.  I checked the collation of the DB, the tables, and the columns involved and they were all the same.  The problem arises with the concatenation.  It does not matter if you use the N unicode prefix by the way.  The solution is to use COLLATE DATABASE_DEFAULT after the string concatenation like in my sample.  That is the big equalizer, so regardless of what different collations you may be mixing up in your statements (different databases, tables, etc.) the concatenation will be executed using whatever DATABASE_DEFAULT is.  Notice that this is probably the best solution as it solves the problem when you run your query, again, regardless of what the collation is for the tables, etc.  Run the query above with and without the COLLATE DATABASE_DEFAULT to see what happens.

By the way, so far I only ran into this problem when running a statement like the one above where I'm dealing with system tables.  All the queries from the application/user database ran just fine like they were.

By the way #2, run the following query to see the collations available:  SELECT * FROM fn_helpcollations().

Hope this helps (I hope it does, it took me a while to find the solution).  One more thing, when you run the query above you have to be careful of what your current database is, it will obviously give you different results if your current DB is Master versus a user DB.

Carlos


 
New Post
7/13/2010 4:14 PM
 
if you get a collation issue, please check your database, stored procedure GetEventLog should look like this (DNN4.2.3):

PROCEDURE [dbo].[GetEventLog]

@PortalID int,

@LogTypeKey nvarchar(35),

@PageSize int,

@PageIndex int

AS

DECLARE @PageLowerBound int

DECLARE @PageUpperBound int

-- Set the page bounds

SET @PageLowerBound = @PageSize * @PageIndex

SET @PageUpperBound = @PageLowerBound + @PageSize + 1

CREATE TABLE #PageIndex

(

IndexID int IDENTITY (1, 1) NOT NULL,

LogGUID varchar(36) COLLATE database_default

)

INSERT INTO #PageIndex (LogGUID)

SELECT dbo.EventLog.LogGUID

FROM dbo.EventLog

INNER JOIN dbo.EventLogConfig

ON dbo.EventLog.LogConfigID = dbo.EventLogConfig.ID

WHERE (LogPortalID = @PortalID or @PortalID IS NULL)

AND (dbo.EventLog.LogTypeKey = @LogTypeKey or @LogTypeKey IS NULL)

ORDER BY LogCreateDate DESC

 

SELECT dbo.EventLog.*

FROM dbo.EventLog

INNER JOIN dbo.EventLogConfig

ON dbo.EventLog.LogConfigID = dbo.EventLogConfig.ID

INNER JOIN #PageIndex PageIndex

ON dbo.EventLog.LogGUID = PageIndex.LogGUID

WHERE PageIndex.IndexID > @PageLowerBound

AND PageIndex.IndexID < @PageUpperBound

ORDER BY

PageIndex.IndexID

SELECT COUNT(*) as TotalRecords

FROM #PageIndex


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Cannot resolve the collation conflict between "Latin1_General_CI_AS"Cannot resolve the collation conflict between "Latin1_General_CI_AS"


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