This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
confluence_sql_queries [2018/09/20 11:47] pawel created |
confluence_sql_queries [2018/09/20 12:11] (current) pawel |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Confluence SQL Queries | + | ===== Confluence SQL Queries |
Below is the list of SQL queries to perform tasks directly on the database. Please note that you should always shut down Confluence & backup your database before performing any of these queries. | Below is the list of SQL queries to perform tasks directly on the database. Please note that you should always shut down Confluence & backup your database before performing any of these queries. | ||
+ | === Find all spaces and the space owner === | ||
+ | <code java> | ||
+ | select s.SPACEKEY, s.SPACENAME, | ||
+ | from SPACES s | ||
+ | join SPACEPERMISSIONS p ON s.SPACEID = p.SPACEID | ||
+ | join user_mapping u on p.PERMUSERNAME = u.user_key | ||
+ | join cwd_user u1 on u.username = u1.user_name | ||
+ | where p.PERMTYPE = ' | ||
+ | </ |