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)

Generic SQL error while Assigning or Sharing a record

(0) ShareShare
ReportReport
Posted on by

Hi Experts,

 CRM version 2016 (8.2), On Premise.

While sharing/assigning a record in CRM we are getting Generic SQL error.

from the MicrosoftDynamicsCRM\Trace, we find out the exception as below.

>Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784, InnerException: System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'r'.
Invalid column name 's'.
An explicit value for the identity column in table '#CascadeCollect' can only be specified when a column list is used and IDENTITY_INSERT is ON.

Please suggest on this.

*This post is locked for comments

I have the same question (0)
  • Radu Chiribelea Profile Picture
    6,667 on at

    Hi bnsp,

    Does this happen for all entities (accounts, contacts, opportunities, custom entities, etc.) or only some?

    Where there any modifications made to the stored procedures or the CRM Database?

    Regards,

    Radu

  • Community Member Profile Picture
    on at

    Hi Radu,

    it's happening for all entities.

    and it's working fine for the same solution (XXX_MSCRM) in different environment

    Thanks,

    bnsp

  • Community Member Profile Picture
    on at

    Hi there bnsp

    Did you manage to resolve your issue.

    We have same occurring on CRM 2013 SP 1. Also cannot assign across all entities. This is just in our production environment.

    Same error with invalid column name 'r', 's'

    UAT and Dev are working fine.

    Thx,

    Neil

  • Suggested answer
    Community Member Profile Picture
    on at

    For anyone with a similar issue, here's what I found and eventually did to resolve.

    We ran SQL traces to capture the actual error on the SQL side. It appeared that our list of functions (core CRM deployed functions) were different from the functions in the same Organisation in our UAT environment, meaning that the databases were on different versions of CRM.

    Our problem was caused because we initially have CRM 2013 SP1 Update Rollup 5 installed and we regressed this update, taking the server back to CRM 2013 SP 1.

    For some reason our organisation database seemed to be stuck on an older version, so we;

    1. Disabled and deleted Organisation in deployment manager

    2. Installed CRM 2013 SP1 Update Rollup 5 again onto our server

    3. Imported the organisation again...this step is important as it updates the SQL database with any objects applicable to the current rollup version.

    4. This brought all the core CRM SQL objects in the database in line with the CRM version installed.

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