none
CRM2011 Update Rollup 12 error

    Question

  • I know I'm early off the mark, but I decided to download and apply UR-12 to my development system today. I used the just published version (v2).

    After the Install the Navigation bar appears, but the grid window comes up with an SQL error as per below. This happens to all the orgs in the deployment.

    [2013-01-30 14:06:29.027] Process: w3wp |Organization:347483e5-fe69-e211-9089-00155d000104 |Thread:   27 |Category: Platform.Sql |User: 30201ebe-eb2b-45c1-9ddc-795d40259aae |Level: Error |ReqId: cd8d8e7b-fcc5-4adb-81f2-08286b2ef69c | BusinessProcessObject.ExecuteQuery  ilOffset = 0x4A
    >Exception when executing query: select
    top 5001 "principalobjectaccessreadsnapshot0".PrincipalId as "principalid"
    , "principalobjectaccessreadsnapshot0".ObjectTypeCode as "objecttypecode"
    , "principalobjectaccessreadsnapshot0".Count as "count"
    , "principalobjectaccessreadsnapshot0".PrincipalObjectAccessReadSnapshotId as "principalobjectaccessreadsnapshotid"
    , "principalobjectaccessreadsnapshot0".ObjectTypeCodeName as "objecttypecodename"
    from
     PrincipalObjectAccessReadSnapshot as "principalobjectaccessreadsnapshot0" (NOLOCK)  order by
     "principalobjectaccessreadsnapshot0".PrincipalId asc
    , "principalobjectaccessreadsnapshot0".ObjectTypeCodeName asc
    , "principalobjectaccessreadsnapshot0".PrincipalObjectAccessReadSnapshotId asc Exception: System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'ObjectTypeCodeName'.
    Invalid column name 'ObjectTypeCodeName'.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

    I can't see the column name 'ObjectTypeCodeName' in the database. Only 'ObjectTypeCode'.

    Any ideas?

    Thanks,


    CRM Consultant

    Wednesday, January 30, 2013 3:34 AM

Answers

  • Got the following supported solution:
    • If you got RU11 installed in between, uninstall RU 12 and RU 11
    • Reinstall RU 12
    • Run the following SQL script for each organization
    if (N'00000000-0000-0000-00AA-110000000030' = (select AttributeTypeId from AttributeView where AttributeId = 'b1238e32-9429-4918-ad8e-56c5d5706453'))
    begin
    	-- Delete the ObjectTypeCodeName attributes
    	delete from MetadataSchema.Attribute where AttributeId in ('4456bbb5-0bad-4360-afca-74d099056116', 'c3dce60b-fd95-43b4-8d20-ea4bbcd5c436')
    	delete from AttributeIds where AttributeId in ('4456bbb5-0bad-4360-afca-74d099056116', 'c3dce60b-fd95-43b4-8d20-ea4bbcd5c436')
    end
    • Reboot your CRM Machine
    • done.
    • Proposed as answer by _jfr Wednesday, February 13, 2013 5:15 PM
    • Marked as answer by rockstar1 Thursday, February 14, 2013 11:19 AM
    Wednesday, February 13, 2013 5:15 PM

All replies

  • Got the same error here, traced with SQL profiler after a successful upgrade to RU 12:

    "Ungültiger Spaltenname 'ObjectTypeCodeName'." Although here just one organization is affected.

    Did you find a way to resolve the issue apart from uninstalling RU12, so far?

    Wednesday, February 13, 2013 8:29 AM
  • Mine was the dev environment so in the end I just created that column name and then it started working.

    I suspect it was beacause I had the UR12 pre-release installed , then I uninstalled it but it obviously didn't clean up properly. I then applied final release UR12 and got the issue. From there I could not resolve it even with uninstalling UR12, so in the end I just created that column as it was dev. With prod it would be a different story.


    CRM Consultant

    Wednesday, February 13, 2013 8:57 AM
  • thanks for your quick reply! We'll try that in a test environment. Also, we forwarded the issue to Microsoft to get a supported solution.
    Wednesday, February 13, 2013 9:02 AM
  • No worries. Let me know if you find a supported solution.

    Thanks,

    rocky.


    CRM Consultant

    Wednesday, February 13, 2013 9:04 AM
  • Got the following supported solution:
    • If you got RU11 installed in between, uninstall RU 12 and RU 11
    • Reinstall RU 12
    • Run the following SQL script for each organization
    if (N'00000000-0000-0000-00AA-110000000030' = (select AttributeTypeId from AttributeView where AttributeId = 'b1238e32-9429-4918-ad8e-56c5d5706453'))
    begin
    	-- Delete the ObjectTypeCodeName attributes
    	delete from MetadataSchema.Attribute where AttributeId in ('4456bbb5-0bad-4360-afca-74d099056116', 'c3dce60b-fd95-43b4-8d20-ea4bbcd5c436')
    	delete from AttributeIds where AttributeId in ('4456bbb5-0bad-4360-afca-74d099056116', 'c3dce60b-fd95-43b4-8d20-ea4bbcd5c436')
    end
    • Reboot your CRM Machine
    • done.
    • Proposed as answer by _jfr Wednesday, February 13, 2013 5:15 PM
    • Marked as answer by rockstar1 Thursday, February 14, 2013 11:19 AM
    Wednesday, February 13, 2013 5:15 PM
  • Hi _jfr,

    Where did you get that solution from and exactly how is an SQL script a supported solution?

    Regards


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Thursday, February 14, 2013 6:35 AM
  • Cool. Thanks for the update.

    I had to generate the first guid using

    select AttributeTypeId from AttributeView where AttributeId = 'b1238e32-9429-4918-ad8e-56c5d5706453'

    Then all worked.

    Thank you for posting back.

    Regards,

    Rocky.


    CRM Consultant

    Thursday, February 14, 2013 11:19 AM
  • Hi _jfr/Rockstar

    I have a similar issue on CRM 2011 after installation of update rollup 12. I have tried running above SQL query on database but it did not resolve. Could you please help?

    Thanks

    Nemath


    Nemath

    Thursday, March 14, 2013 10:40 AM
  • Did you do this

    select AttributeTypeId from AttributeView where AttributeId = 'b1238e32-9429-4918-ad8e-56c5d5706453'

    and substitute the return value as the first guid in jfr's Script?


    CRM Consultant

    Friday, March 15, 2013 2:36 AM
  • Awesome! This works for me.

    I updated to UR13 and SQL Error popped up. Ran an SQL profiler trace and got back: Invalid column name 'ObjectTypeCodeName'

    Before I saw this thread I uninstalled UR13,12,11 (yeah paranoid and frustrated)

    I ran the script mentioned by _jfr and rockstar1:

    select AttributeTypeId from AttributeView where AttributeId = 'b1238e32-9429-4918-ad8e-56c5d5706453' (use the return attributeID for the next script below)

    if (N'replace_this_section_with_attribute_from_select_query_above' = (select AttributeTypeId from AttributeView where AttributeId = 'b1238e32-9429-4918-ad8e-56c5d5706453'))
    begin
        -- Delete the ObjectTypeCodeName attributes
        delete from MetadataSchema.Attribute where AttributeId in ('4456bbb5-0bad-4360-afca-74d099056116', 'c3dce60b-fd95-43b4-8d20-ea4bbcd5c436')
        delete from AttributeIds where AttributeId in ('4456bbb5-0bad-4360-afca-74d099056116', 'c3dce60b-fd95-43b4-8d20-ea4bbcd5c436')
    end

    Reboot both CRM and SQL Server...and it's back!

    I usually do stuff on dev box but have become accustom to the UR being so stable so i didn't think twice...lesson learn.

    Thursday, April 25, 2013 2:26 PM
  • Worked for me as well. Had already installed RU 14.

    Monday, September 09, 2013 8:53 PM