Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article explains how to find pages that utilize macro to a specific data source profile using SQL for Confluence appacross different SQL macros in a Confluence instance. The macros involved are SQL, SQL query and SQL file.

Instructions

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

    Code Block
    themeMidnight
    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 data source profile name.

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


Info
This example is from the MySQL database.