在角色管理器中,我将用户添加到角色,例如sitecore\Sitecore Local Administrator
。向用户添加用户时(菜单;会员 - >添加)我收到错误:
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
堆栈追踪:
[SqlException (0x80131904): Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +2442126
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5736904
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +628
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +3731
System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +58
System.Data.SqlClient.SqlDataReader.get_MetaData() +89
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +379
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +2026
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +375
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +53
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +240
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +81
System.Web.Security.SqlRoleProvider.AddUsersToRolesCore(SqlConnection conn, String usernames, String roleNames) +384
System.Web.Security.SqlRoleProvider.AddUsersToRoles(String[] usernames, String[] roleNames) +724
Sitecore.Security.SwitchingRoleProvider.AddUsersToRoles(String[] userNames, String[] roleNames) +164
Sitecore.Security.<>c__DisplayClass1.<AddUsersToRoles>b__0() +32
Sitecore.Data.DataProviders.NullRetryer.ExecuteNoResult(Action action, Action recover) +161
Sitecore.Data.DataProviders.NullRetryer.ExecuteNoResult(Action action) +15
Sitecore.Security.SitecoreRoleProvider.AddUsersToRoles(String[] userNames, String[] roleNames) +91
System.Web.Security.Roles.AddUsersToRole(String[] usernames, String roleName) +140
Sitecore.Shell.Framework.Commands.RoleManager.AddMember.AddAccounts(ListString roles, ListString users, String roleName) +174
Sitecore.Shell.Framework.Commands.RoleManager.AddMember.Run(ClientPipelineArgs args) +505
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +92
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +101
Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +58
Sitecore.Pipelines.Processor.Invoke(PipelineArgs args) +243
Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) +252
Sitecore.Pipelines.Pipeline.Resume() +38
Sitecore.Web.UI.WebControls.ContinuationManager.ResumePipeline(HttpContext httpContext) +461
Sitecore.Web.UI.WebControls.ContinuationManager.OnPreRender(EventArgs e) +299
System.Web.UI.Control.PreRenderRecursiveInternal() +88
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4775
答案 0 :(得分:1)
Sitecore数据库中的默认排序规则级别为&#34; SQL_Latin1_General_CP1_CI_AS&#34;。我不知道你在哪里得到&#34; Latin1_General_CI_AS&#34;。您可以尝试执行以下操作:
SELECT * FROM [model].[sys].[all_columns]
WHERE collation_name = 'Latin1_General_CI_AS'
使用&#34; Latin1_General_CI_AS&#34;获取所有列排序规则。
当您知道导致冲突的列(它应该是来自&#34; aspnet _ ****和#34;表中的列)时,您可以更改列排序规则:
ALTER TABLE dbo.aspnet_XXX ALTER COLUMN YYY
varchar(ZZZ) COLLATE SQL_Latin1_General_CP1_CI_AS
从评论中的讨论中添加: 据我所知,aspnet_UsersInRoles_AddUsersToRoles存储过程中会抛出错误。核心数据库中只有表名为&#34; aspnet _ ****&#34;和临时表。如果现有列中没有问题,则检查默认数据库归类是有意义的,因为使用此位置创建临时表。因此,请查看Sitecore_Core数据库属性并检查其排序规则。
答案 1 :(得分:0)
您最近升级到8.2吗?
确保您使用的是同一次sitecore更新中的数据库。
我从8.2初始化到8.2更新2时遇到了这个问题。
答案 2 :(得分:0)
我得到了'Anton'评论的帮助。问题不在于某些表中列的排序,而是数据库本身。不知何故,数据库的整理得到了改变。我将Sitecore_core
DB的排序规则设置为SQL_Latin1_General_CP1_CI_AS
并解决了问题。