Versions Compared

Key

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

This article helps you find all the spaces and pages where the SQL Latex Math for Confluence macros are added to your Confluence instance hosted on the Server or Data Center.

Instructions

  • Log in as Confluence Administrator and navigate to Cogwheel > General configuration > Administration > Macro Usage:

...

  • Under All macros, look out for the App name SQL(Pro Edition) for ConfluenceLatex Math:

...

Usage information using SQL queries:

As the SQL for Confluence has three macros, the query must be executed for each macro Use the following query to get the macro-level usage information. If the query returns any records, the output includes the the Space Key, Space name, Title of the page and SpaceID of the relevant pages.

...

Code Block
languagesql

...

SELECT DISTINCT 

...

SPACES.

...

SPACEKEY, 

...

SPACES.

...

SPACENAME, 

...

CONTENT.Title, BODYCONTENT.body 

...

FROM 

...

BODYCONTENT

...

JOIN 

...

CONTENT 

...

ON 

...

BODYCONTENT.

...

CONTENTID =

...

 CONTENT.

...

CONTENTID

...

JOIN SPACES ON CONTENT.

...

SPACEID = 

...

SPACES.

...

SPACEID

...

WHERE 

...

BODYCONTENT.BODY like '%<ac:structured-macro ac:name="

...

mathblock"%'

...

For the SQL-query macro, execute the following query:

...

languagesql

...


...

 OR BODYCONTENT.BODY LIKE '%<ac:structured-macro ac:name="mathblock-ref"%'
OR 

...

BODYCONTENT.

...

BODY 

...

LIKE '

...

%<ac:structured-macro ac:name="mathinline"%'
OR BODYCONTENT.BODY 

...

LIKE '%<ac:structured-macro ac:name="

...

mathblock-

...

table"%'

...

For the SQL file macro, execute the following query:

...

languagesql

...


OR BODYCONTENT.BODY LIKE '%<ac:structured-macro ac:name="unit"%'
OR BODYCONTENT.BODY LIKE '%<ac:structured-macro ac:name="

...

latex"%'

...


Results:

...

Info

It is recommended to: 

  • Test the above queries in a test environment. The time taken to get the results is based on the number of pages where the macro has been used.

  • Run the query during off-business hours to reduce any impact caused by the query's run time.

  • Queries have to be adjusted with syntax in databases. 

...