azure-devopsazure-pipelinesazure-devops-server-2019azure-devops-server

Since upgrade, on-prem AzureDevops Server 2019 is retaining 10x build data in dbo.tbl_content


My on-prem, Azure DevOps 2019's backups are showing an unsubstainable increase in size of the .mdf file

So,I believe I'm looking for a build pipe (not release pipe) that needs cleaning up? Historically, we've tried to keep 366 days worth of old build logs but at the rate we're going we won't make it.

We've got about 40 build pipes (some historic, that no longer run), inc 4 triggered on commit (CI).

re: retention policy...

Any help appreciated here, but specifically:

Related question: TFS2015 tbl_Content increase


Solution

  • You could try to run below query to narrow down the date:

    SELECT ci.ContainerId,
    c.ArtifactUri,
    c.Name,
    c.DateCreated,
    SUM(fm.FileLength)
    FROM tbl_ContainerItem ci
    JOIN tbl_FileReference f
    ON f.FileId = ci.FileId
    JOIN tbl_FileMetadata fm
    ON fm.PartitionId = 1
    AND fm.ResourceId = f.ResourceId 
    LEFT JOIN tbl_Container c 
    ON c.ContainerId = ci.ContainerId 
    AND c.PartitionId = 1 
    WHERE f.PartitionId = 1 
    AND ci.PartitionId = 1 
    GROUP BY ci.ContainerId, c.ArtifactUri, c.Name, c.DateCreated
    

    And since it's related to build, kindly check if test report caused this. You could refer detail actions in this thread: TFS database growing too large

    Besides, you could also try shrinking the transaction log in TFS/Azure DevOps Database.