The settings could not be saved because of an internal error: There was an 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

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:

PID FriendlyName PID FriendlyName
0 All

2147418060

ows_taxId_SPLocationSite
2147418028 AnchorLink

2147418054

PHFlags
2147418033 BaseHref

69

PluggableSdid
2147418035 ChangeID

2147418042

PluggableSecurityBlob
2147418048 ChangeIDEnd

2147418089

PluggableSecurityTrimmerId
9 ContentExcludeFromSummaries

99

QIRExternal
2147418058 CrawlLogLevel

2147418057

RankPrecalBottom
2147418036 CrawlObjectID

2147418056

RankPrecalTop
2147418090 CrawlUrl

2147418019

RedirectedURL
2147418034 CRC

2147418018

Robots
2147450879 DefaultProperties

330

SameEnumDepthProps
2147418016 DirLink

2147418080

Scope
2147418021 DirLinkSecurityUpdate

2147418027

SecurityBlob
2147418020 DirLinkWithTime

2147418053

SecurityId
2147418026 EndAnchor

2147418031

SecurityProvider
2000000001 EntityName

2147418038

SiteContainer
2000000002 EntityNamespace

2147418088

SocialDistance
2147418022 FollowAll

2147418091

Summary Description
2147418023 FollowNone

70

TAUCCLICK0
12 IndexDocId

71

TAUCCLICK1
2147418037 IndexRare

72

TAUCCLICK2
183 InternalExpiresInDays

73

TAUCCLICK3
674 IsPartiallyProcessed

74

TAUCCLICK4
2147418039 LinkHRef

2147418049

TAUCCLICKNOTIFY
2147418040 LinkOfficeChild

2147418051

TAUCDISPLAYURL
2147418041 LinkOfficeChildList

2147418050

TAUCTITLE
2147418043 NonDocument

2147418046

TempAuthor
2147418024 NormalizedForwardURL

2147418062

TempLastModifiedTime
2147418025 NormalizedURL
68 NtSdid
2147418044 ows_MetadataFacetInfo
2147418045 ows_SPLocationInfo
2147418059 ows_taxId_SPLocationInfo
2147418061 ows_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.

5/5 (1)

Please rate this

 
Comments

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.

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

Marc

Leave a Reply