Fulltext index references unknown key index

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace, andy.campbell.smith

Fulltext index references unknown key index

Postby bpelkey » Fri Nov 08, 2013 4:53 pm

Keep getting this error and not sure how to fix it any help would be great.

Bret


Error:
Fulltext index references unknown key index PK__Document__5A5B77D507C43B0B.

RedGate.SQLSourceControl.Engine.SqlCompareException: Fulltext index references unknown key index PK__Document__5A5B77D507C43B0B. ---> RedGate.SQLCompare.Engine.SqlCompareException: Fulltext index references unknown key index PK__Document__5A5B77D507C43B0B.
at #Eyg.#Gyg.#nGh()
at #Eyg.#Gyg.#LCdd()
at #Eyg.#Gyg.#vl(IEnumerable`1 #rXrc)
at RedGate.SQLCompare.Engine.Database.Register(String path, ScriptDatabaseInformation dbinfo, Options options, IEnumerable`1 filesToUse, IReadFromFolderCache cache)
at #NsZc.#y0Lc.#PsZc(String #yIc, ICompareScriptDatabaseInformation #P53c, ICompareOptions #5OPb, Boolean #jf4c)
at RedGate.SQLSourceControl.Engine.Diff.CompareEngineUtils.WrapRegisterWithCache(ICompareDatabase db, String path, ICompareScriptDatabaseInformation scriptFolderOptions, ICompareOptions options, Boolean isDatabaseCaseSensitive)
at #GWeb.#WXM.#TAb.#Byed()
at #NsZc.#MsZc.#gKf(Action #sxPb)
--- End of inner exception stack trace ---

Server stack trace:
at #NsZc.#MsZc.#gKf(Action #sxPb)
at RedGate.SQLSourceControl.Engine.Diff.CompareEngineUtils.DoWrapped(Action #sxPb, ICompareActionExecutor #yu1c)
at RedGate.SQLSourceControl.Engine.Diff.CompareEngineUtils.#z2.#rkW()
at RedGate.SQLSourceControl.Engine.SharedUtilsUtils.DoActionWithCancel(ICancellableOperationStatus status, ICancellable cancellable, Action action)
at RedGate.SQLSourceControl.Engine.Diff.CompareEngineUtils.DoWrappedActionWithCancel(ICancellableOperationStatus status, ICancellable database, Action action)
at #GWeb.#WXM.#f6c(String )
at #GWeb.#WXM.#YtV()
at #GWeb.#Wheb.#tieb(Func`1 )
at #GWeb.#WXM.#XtV()
at RedGate.SQLSourceControl.Engine.Cancellables.CancellableUtils.#y2.#RKc()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]:
at RedGate.SQLSourceControl.Engine.Diff.Memoization.ReattachableMemoizer.#YZBc.#VAb.#xSXc()
at RedGate.SQLSourceControl.Engine.Diff.Memoization.ReattachableMemoizer.#uz2b(String , IDatabaseConnection , #1heb , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks , Action )
at #qlhb.#0heb.#wieb(IBoundDatabase , ICompareOptions , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks , Action )
at #GWeb.#VXM.#mYM[#NrPb](IBoundDatabase , Func`2 , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks , IDifferenceSelector , Action )
at #GWeb.#VXM.#jYM(IBoundDatabase , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks , IDifferenceSelector )
at #GWeb.#4Ec.#7Jc(ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks , IDifferenceSelector )
at #GWeb.#4Ec.#y2.#QB7b(ICancellableOperationStatus )
at RedGate.SQLSourceControl.Engine.Cancellables.MutexedCancellableOperation`1.#u3.#k5f()
at RedGate.SQLSourceControl.Engine.Cancellables.CancellableOperationBase.InvokeWithTracker(String featureUsageKey, Action action)
at RedGate.SQLSourceControl.Engine.Cancellables.MutexedCancellableOperation`1.Invoke()
at #eEc.#Qlg.Invoke()
at #JLc.#PLc.#Jfb.#EJf()
at RedGate.SQLSourceControl.Engine.SmartAssembly.ExceptionReporting.ErrorReporterBase.Do(Action , Predicate`1 , Boolean )
at RedGate.SQLSourceControl.Engine.SmartAssembly.ExceptionReporting.ErrorReporterBase.DoWithObviousExceptionsRethrowAll(Action action)
at RedGate.SQLSourceControl.CommonUI.Forms.ErrorDialog.DoWithObviousExceptionsRethrowAll(Action action)
at #JLc.#PLc.#CTc(ICancellableOperation`1 , Object )
bpelkey
 
Posts: 1
Joined: Fri Nov 08, 2013 4:38 pm

Postby james.billings » Wed Nov 13, 2013 3:15 pm

Hi Bret, thanks for your post, and sorry you are having some trouble. The underlying error as you probably saw is:

Fulltext index references unknown key index PK__Document__5A5B77D507C43B0B

The first thing to establish is if this is something odd in your database or your scripts - to do this, try unlinking your database, then link it to an "evaluation" repository and perform a commit of all the objects. If that works, then the problem is probably in the script files; my guess being they have some sort of inconsistency in.

You can try checking out a copy of the scripts from your repo to a temporary folder and then running a command prompt "findstr" command to locate where the reference is, for example:

findstr /S /C:"PK__Document__5A5B77D507C43B0B" *.*

That will hopefully find the file where the fulltext index is referencing that key. If no other reference is found, then it's likely that the PK on whichever table it references is now different.

As you're using system named constraint names rather than explicit ones, it could be that the problem was caused by someone committing a change to the underlying table which resulted in a new PK name, but not the Fulltext index (which in theory should have been shown as a dependency to be committed)

To correct the problem, you'd ideally need to work out what the correct PK name now is, update the file for the fulltext index to match that, then unlink and relink your DB to refresh the working copies.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SQL Source Control 3

Who is online

Users browsing this forum: No registered users and 0 guests