How to obtain the total count of linked repositories present in Bamboo Data Center.

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

The steps outlined on this article are provided AS-IS. This means we've had reports of them working for some customers — under certain circumstances — yet are not officially supported, nor can we guarantee they'll work for your specific scenario.

You may follow through and validate them on your own non-prod environments prior to production or fall back to supported alternatives if they don't work out.

We also invite you to reach out to our Community for matters that fall beyond Atlassian's scope of support!

Summary

The following SQL queries will help you obtain a list of linked repositories (global ones) in Bamboo DC from the Database. The list is present in the UI(Bamboo Administration→Linked Repositories)

Environment

The solution has been tested on Bamboo 9.6.0 DC with Postgres SQL DB and Microsoft SQL server , but it is applicable for other supported Bamvoo version as well.

Solution

Total count of Linked repositories from the Bamboo DB.


PostgreSQL
PostgreSQL
SELECT DISTINCT count(*) FROM VCS_LOCATION VL WHERE VL.IS_GLOBAL = true AND VL.MARKED_FOR_DELETION = false AND VL.PARENT_ID IS NULL;
Microsoft SQL Server
Microsoft SQL Server
SELECT DISTINCT count(*) FROM VCS_LOCATION VL WHERE VL.IS_GLOBAL = 1 AND VL.MARKED_FOR_DELETION = 0 AND VL.PARENT_ID IS NULL;

Note

If you're using a different Database Management System (DBMS), you will have to convert the query mentioned above into the syntax specific to your DBMS.

Last modified on Aug 26, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.