Is there a way to unlink all databases from source control?

Is there a way to unlink all databases from source control?  We just updated our AD account user names so now we have a bunch of databases that can't find the workspaces in TFS.
Tagged:

Answers

  • Hi @kevin83177

    Absolutely, in this case if you navigate to %localappdata% > Red Gate > SQL Source Control 7 > LinkedDatabases.xml

    If you delete all the entries from the file within the example block, this will remove all of the databases from being linked

    <div><LinkedDatabaseList type="LinkedDatabaseList" version="2"></div><div>&nbsp; &nbsp; <value version="7" type="LinkedDatabase"></div><div>&nbsp; &nbsp; &nbsp; <DatabaseId version="2" type="DatabaseId"></div><div>&nbsp; &nbsp; &nbsp; &nbsp; <ServerAndInstanceName>PS-LT-DANC\DC_SQLSERVER2019</ServerAndInstanceName></div><div>&nbsp; &nbsp; &nbsp; &nbsp; <DatabaseName>AdventureWorks2019</DatabaseName></div><div>&nbsp; &nbsp; &nbsp; </DatabaseId></div><div>&nbsp; &nbsp; &nbsp; <ISrcCLocation version="2" type="WorkingFolderGenericLocation"></div><div>&nbsp; &nbsp; &nbsp; &nbsp; <LocalRepositoryFolder>C:\Users\Dan.Calver\Documents\SQL Source Control Repos\AdventureWorks019-WorkingFolder\</LocalRepositoryFolder></div><div>&nbsp; &nbsp; &nbsp; &nbsp; <HooksConfigFile>C:\Users\Dan.Calver\AppData\Local\Red Gate\SQL Source Control 7\ReservedCommandLineHooks\WorkingFolder.xml</HooksConfigFile></div><div>&nbsp; &nbsp; &nbsp; &nbsp; <HooksFileInRepositoryFolder>False</HooksFileInRepositoryFolder></div><div>&nbsp; &nbsp; &nbsp; </ISrcCLocation></div><div>&nbsp; &nbsp; &nbsp; <IWorkspaceId version="1" type="WorkspaceId"></div><div>&nbsp; &nbsp; &nbsp; &nbsp; <RootPath>C:\Users\Dan.Calver\AppData\Local\Red Gate\SQL Source Control 7\WorkingBases\nitnretf.3wk</RootPath></div><div>&nbsp; &nbsp; &nbsp; </IWorkspaceId></div><div>&nbsp; &nbsp; &nbsp; <SharedModel>False</SharedModel></div><div>&nbsp; &nbsp; &nbsp; <ScriptTransientId version="1" type="WorkspaceId"></div><div>&nbsp; &nbsp; &nbsp; &nbsp; <RootPath>C:\Users\Dan.Calver\AppData\Local\Red Gate\SQL Source Control 7\Transients\h1gliyun.5vj</RootPath></div><div>&nbsp; &nbsp; &nbsp; </ScriptTransientId></div><div>&nbsp; &nbsp; </value></div>

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

Sign In or Register to comment.