So you imported a large solution, perhaps an upgraded solution in a CRM upgrade, and when you publish the entire solution, you get a generic SQL error. What should you do?
- Go to Settings–>Customization–>Customize the System.
- Select Entities
- When the entity list appears, select 5-10 entities at a time and click “Publish.”
- Continue until you work through all updated entities.
- If you hit the error, publish each entity in the selected group individually to identify which entity has the issue.
- If you get to the end and don’t hit the error, it was most likely a SQL timeout. You should then be able to Publish All successfully.
If this is occurring, the fix that was found was to temporarily increase the SQL timeout value to allow for publishing of the solution. A bit risky because it involves editing the web.config file but it works.
Add Registry Entries
1. Start > Run > regedit
2. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM
3. Right Click MSCRM > New > DWORD Value
4. Rename DWORD value to OLEDBTimeout
5. Modify the DWORD value, type in 86400 and leave Base at Hexadecimal
6. Add another DWORD Value
7. Rename this DWORD value to ExtendedTimeout
8. Modify the DWORD value, type in 1000000 and leave Base at Hexadecimal
Edit Web.Config file on CRM Server
1. RDP to CRM Server
2. Go to C:\Program Files\Microsoft Dynamics CRM\CRMWeb
3. Right click on the Web.config file and open with Notepad (There are two areas of the file that we need to modify)
4. At the beginning of the web.config file edit the following (the initial values may vary)
<httpRuntime executionTimeout="300" maxRequestLength="32768"
5. Replace the values in step 4 with (NOTE: if the maxRequestLength is already greater than 20000, then leave it alone):
<httpRuntime executionTimeout="3600" maxRequestLength="32768"
6. Then, towards the middle of the file, maxRequestLength occurs once more, find this:
7. Replace the values in step 6 with
Great comment Joseph. Your comment is longer than our tip. Kind of a bonus tip.
Though step 6 and 7 of the second part could use a bit more detail.
Here is an update for steps 6 and 7, not sure why they did not show up in my original comment.
6. Then, towards the middle of the file, maxRequestLength occurs once more, find this:
7. Replace the values in step 6 with
Ah the tags are getting wiped out. Last try, here is removing of the end of the tag so hopes it will paste in successfully (need to add /> at the end
6. Then, towards the middle of the file, maxRequestLength occurs once more, find this:
< httpRuntime maxRequestLength="8192"
7. Replace the values in step 6 with
< httpRuntime maxRequestLength="20000"
It would make more sense to do the same, but within your solution rather then the default solution.
I agree, if you are doing a limited solution, you would do this in your solution; however, in the scenario described in the post you are doing a broad default solution as part of an upgrade. These are the scenarios where publish fails happen most often. Thanks for reading.
we have same error, but in trace, “state transition hiyerarcy rule”