Microsoft KB Archive/926081

= Error message when you try to save a security role that contains privileges in many custom entities in Microsoft Dynamics CRM: &quot;A SQL Error has occurred&quot; =

Article ID: 926081

Article Last Modified on 1/4/2008

-

APPLIES TO


 * Microsoft Dynamics CRM 4.0
 * Microsoft Dynamics CRM 3.0

-



SYMPTOMS
You try to save and close a security role in Microsoft Dynamics CRM. This security role has privileges that are selected in many custom entities. However, the security role is not saved. Additionally, you receive the following error message:

A SQL Error has occurred. Contact your system administrator.

If you run a SQL Profiler trace, you receive the following error message:

The incoming tabular data Stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.



CAUSE
This issue may occur when a security role has privileges selected for between 50 and 100 custom entities. This issue may also occur when a security role has privileges selected for more than 100 custom entities.



WORKAROUND
To work around this issue, create multiple security roles. Then, assign privileges in each role for 20 to 25 custom entities. To do this, follow these steps:
 * 1) Log on to the Web client of Microsoft Dynamics CRM as an administrator.
 * 2) Use the appropriate method:
 * 3) * If you are running Microsoft Dynamics CRM 3.0, click Settings, click Business Unit Settings, and then click Security Roles.
 * 4) * If you are running Microsoft Dynamics CRM 4.0, click Settings, click Administration, and then click Security Roles.
 * 5) Click the security role for which you want to add privileges for the custom entities. For example, click Salesperson.
 * 6) Click More Actions, and then click Copy Role.
 * 7) In the New Role Name box, type a new role name. For example, type Salesperson_CustomEntites_1.
 * 8) Click to select the Open a new security role when copying is complete check box, and then click OK.
 * 9) After the new role has been copied successfully, click the Custom Entities tab.
 * 10) Select the privileges that you want to assign to the role. Do not select more than 25 custom entities for which you assign the privileges. Note these custom entities.
 * 11) Click Save and Close to save the new role.
 * 12) Repeat steps 3 through 9 as many times as necessary to assign privileges for all the custom entities that are in new security roles. For example, create a new &quot;Salesperson_CustomEntites_2&quot; security role, and then assign privileges for the next 25 custom entities. Make sure that you do not assign privileges to previously-assigned custom entities.


 * 1) After you assign privileges to all the custom entities, use the appropriate method:
 * 2) * If you are running Microsoft Dynamics CRM 3.0, click Business Unit Settings, and then click Users.
 * 3) * If you are running Microsoft Dynamics CRM 4.0, click Settings, click Administration, and then click Users.
 * 4) Double-click the user to whom you want to assign access to the custom entities.
 * 5) Under Details, in the left Navigation Pane, click Roles. The currently-assigned roles for the user appear.
 * 6) Click Manage Roles.
 * 7) Under Manage User Roles, click to select the check box for each new security role that you created in steps 3 through 9. For example, click to select the Salesperson_CustomEntites_1 check box, click to select the check boxes for the other security roles that you created, and then click OK.
 * 8) Click Save and Close to save the changes to the user.

After you complete this procedure, the user has privileges assigned to the custom entities that are in the new security roles.

Additional query words: crm3 crm30 crm3.0 crm role privileges sql error tabular data stream remote procedure call

Keywords: kbmbscrm40 kbtshoot kbpermissions kbexpertiseinter kberrmsg kbmbscustomization kbmbsmigrate kbprb KB926081

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.