theme-sticky-logo-alt

The settings could not be saved because of an internal error: There was an internal problem connecting to or querying the database

2 Comments

Today I was at a client and we wanted to create a new Managed Property called “EntityName”. It looked simple, just create a new manage property, set your options, click OK and it’s done! However, we got this strange error:

internal problem connecting to or querying the database

“The settings could not be saved because of an internal error: There was an internal problem connecting to or querying the database.”

After reading the error message, my first reaction was checking if the SQL was up and I didn’t have any Access Denied errors in the Event Viewer. However, everything looked up. I then looked up in the ULS and found the following log:

SqlError: ‘Violation of PRIMARY KEY constraint ‘PK_MSSManagedProperties’. Cannot insert duplicate key in object ‘dbo.MSSManagedProperties’. The duplicate key value is (EntityName, 0).’ Source: ‘.Net SqlClient Data Provider’ Number: 2627 State: 1 Class: 14 Procedure: ‘proc_MSS_AddManagedPropertyEx’ LineNumber: 52 Server: SQLSERVER,1433′

SqlError: ‘The statement has been terminated.’ Source: ‘.Net SqlClient Data Provider’ Number: 3621 State: 0 Class: 0 Procedure: ‘proc_MSS_AddManagedPropertyEx’ LineNumber: 52 Server: SQLSERVER,1433′

According to the log, there is already a managed property called “EntityName” in Managed properties, however when I do a Search for it, it doesn’t show up!

I wanted to know more on the problem, so I went to SQL Database (PS: Microsoft doesn’t recommend you to do this!) and looked what’s inside the ‘dbo.MSSManagedProperties’ table. I then found something really interesting, there is a field called “Hidden”! And no surprise, my “EntityName” was in there:

So, to help you in the future, here are all the hidden Managed Properties in SharePoint 2013:

PIDFriendlyNamePIDFriendlyName
0All

2147418060

ows_taxId_SPLocationSite
2147418028AnchorLink

2147418054

PHFlags
2147418033BaseHref

69

PluggableSdid
2147418035ChangeID

2147418042

PluggableSecurityBlob
2147418048ChangeIDEnd

2147418089

PluggableSecurityTrimmerId
9ContentExcludeFromSummaries

99

QIRExternal
2147418058CrawlLogLevel

2147418057

RankPrecalBottom
2147418036CrawlObjectID

2147418056

RankPrecalTop
2147418090CrawlUrl

2147418019

RedirectedURL
2147418034CRC

2147418018

Robots
2147450879DefaultProperties

330

SameEnumDepthProps
2147418016DirLink

2147418080

Scope
2147418021DirLinkSecurityUpdate

2147418027

SecurityBlob
2147418020DirLinkWithTime

2147418053

SecurityId
2147418026EndAnchor

2147418031

SecurityProvider
2000000001EntityName

2147418038

SiteContainer
2000000002EntityNamespace

2147418088

SocialDistance
2147418022FollowAll

2147418091

Summary Description
2147418023FollowNone

70

TAUCCLICK0
12IndexDocId

71

TAUCCLICK1
2147418037IndexRare

72

TAUCCLICK2
183InternalExpiresInDays

73

TAUCCLICK3
674IsPartiallyProcessed

74

TAUCCLICK4
2147418039LinkHRef

2147418049

TAUCCLICKNOTIFY
2147418040LinkOfficeChild

2147418051

TAUCDISPLAYURL
2147418041LinkOfficeChildList

2147418050

TAUCTITLE
2147418043NonDocument

2147418046

TempAuthor
2147418024NormalizedForwardURL

2147418062

TempLastModifiedTime
2147418025NormalizedURL
68NtSdid
2147418044ows_MetadataFacetInfo
2147418045ows_SPLocationInfo
2147418059ows_taxId_SPLocationInfo
2147418061ows_taxId_SPLocationList

So, to fix this problem, make sure you name your new Managed Property something that is not in the columns above!

Leave  a comment and don’t forget to like the Absolute SharePoint Blog Page on Facebook and to follow me on Twitter here  for the latest news and technical articles on SharePoint.  Also, don’t forget to check out SharePoint Community.Net for more great SharePoint Content.

Previous Post
Step by Step: Create a Result Source for a BCS Entity
Next Post
[Free Webinar] Three Must-Have SharePoint Workflows with SharePoint Designer

2 Comments

  • November 18, 2014 at 4:24 pm
    Eric Skaggs

    Great article! I make it a habit to really push for a company-specific prefix on each managed property to avoid this kind of issue. That tends to work out ok in most cases since most of the time we can customize the display name in the front end.

    Reply
  • June 15, 2015 at 10:35 am

    Thanks a lot. You’re a life saver ! Saved me a lot of time.

    Marc

    Reply

Leave a Reply

15 49.0138 8.38624 1 0 4000 1 https://vladtalkstech.com 300 1