Skip to end of banner
Go to start of banner

How to find pages that utilize macro to a specific profile using SQL for Confluence

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This article explains how to find pages that utilize macro to a specific profile using SQL for Confluence app.

Instructions

  1. The following query provides the information that how many pages are using a specific profile in Confluence instance.

    SELECT c.contentid, c.contenttype, c.title, s.spacekey FROM CONTENT c JOIN BODYCONTENT bc ON c.contentid = bc.contentid JOIN SPACES s ON c.spaceid = s.spaceid WHERE c.prevver IS NULL AND c.contenttype IN ('PAGE', 'BLOGPOST') AND bc.body LIKE '%ac:name="dataSource">Profile_name%';

     Note: Replace Profile_name in the query with your datasource profile name.

  2. The output of the above query is as shown below:


This example is from the MySQL database.
  • No labels