web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Problem updating OptionSet

(0) ShareShare
ReportReport
Posted on by 2,080

Hi

I'm trying to add a new value to an existing Option Set and I keep getting an error - when I dig deeper the long error message suggests a sql timeout problem

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding., View Script: if exists (select * from sysobjects where name = 'Contact' and xtype = 'V')....

 

Can anyone please advise as to how to fix this?

Thanks

*This post is locked for comments

I have the same question (0)
  • Bruno Lucas Profile Picture
    5,421 on at

    Can you share the code?

    is this anything like this:

    msdn.microsoft.com/.../gg509023.aspx

    (if exists (select * from sysobjects where name = 'Contact' and xtype = 'V'...) is part of your syntax or did it just pop on the error message?

    if you have sql code added to that code, how long does it take to run on it's own?

    if you are working on a synchronous plugin, the time limit for queries shouldn't be too long.

  • Bruno Lucas Profile Picture
    5,421 on at

    take a look on those time limits:

    social.technet.microsoft.com/.../12601.crm-2011-timeouts-and-limits.aspx

    you should be able to see how long it takes to execute by adding breaking points on the beginning and end of the code and debug

    or

    what you can do is add a trace on the beginning and end to track the time it takes to execute.

    mscrmtech.com/mscrm-2011-useful-itracingservice-addiion-when-creating-plugin-assemblies

    another suggestion is to register the plugin as synchronous and see if the time out disappears. If so, the code is exceeding the max time for the thread.

  • Suggested answer
    Mithilesh Kumar Profile Picture
    10,047 on at

    Hi Stuart,

    Are you using CRM 2013 On Premise.

    If yes can you please check if the CRM Services and SQL Services and not overloaded or shutdown.

    Hope that helps

    Thanks

  • stuart Profile Picture
    2,080 on at

    Hi

    There's no code to share - this is purely adding a new value to an option set from within the solution interface.

    This is a CRM 2013 onprem instance.

    I have to say that with a bit of persistence the error finally disappeared and it allowed me to update the list - I guess there must have been some server contention somewhere along the line.

    Thanks all.

  • Mithilesh Kumar Profile Picture
    10,047 on at

    Good Stuart,

    That is the reason I asked you to check your SQL Server Services if they have been overloaded due to some processes, if you are On Premise.

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans