Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.

↑ Back to the top


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.

↑ Back to the top


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:
    • If you are running Microsoft Dynamics CRM 3.0, click Settings, click Business Unit Settings, and then click Security Roles.
    • If you are running Microsoft Dynamics CRM 4.0, click Settings, click Administration, and then click Security Roles.
  3. Click the security role for which you want to add privileges for the custom entities. For example, click Salesperson.
  4. Click More Actions, and then click Copy Role.
  5. In the New Role Name box, type a new role name. For example, type Salesperson_CustomEntites_1.
  6. Click to select the Open a new security role when copying is complete check box, and then click OK.
  7. After the new role has been copied successfully, click the Custom Entities tab.
  8. 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.
  9. Click Save and Close to save the new role.
  10. 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 "Salesperson_CustomEntites_2" 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.
  11. After you assign privileges to all the custom entities, use the appropriate method:
    • If you are running Microsoft Dynamics CRM 3.0, click Business Unit Settings, and then click Users.
    • If you are running Microsoft Dynamics CRM 4.0, click Settings, click Administration, and then click Users.
  12. Double-click the user to whom you want to assign access to the custom entities.
  13. Under Details, in the left Navigation Pane, click Roles. The currently-assigned roles for the user appear.
  14. Click Manage Roles.
  15. 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.
  16. 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.

↑ Back to the top


Keywords: kbfreshness2008, kbmbsadministration, kbmbscrmonline, kbtshoot, kbpermissions, kbexpertiseinter, kberrmsg, kbmbscustomization, kbmbsmigrate, kbprb, kbmbscrm40, KB926081

↑ Back to the top

Article Info
Article ID : 926081
Revision : 3
Created on : 1/4/2008
Published on : 1/4/2008
Exists online : False
Views : 342