Skip to main content

How to use the DB schema to create custom reports

  • Nov 8, 2024 9:07 PM UTC
  • 5 replies
  • 140 views

Forum|alt.badge.img+3

As more and more of you create custom reports, we’ve heard interest in knowing what columns are available to pull from.

DB schema to the rescue!

Under "Report help" in the UI there is a dropdown that shows the tables; use this to pick a table and see the columns (see screenshot below). If you want the ability to navigate at your leisure and you are a cloud customer, you can download the on-premises version, install it somewhere, and browse the schema at your leisure.

 

 

5 replies

  • Nov 12, 2024 7:53 AM UTC

Hello, this is a nice first step …. while creating a new report, it doesnt help me to see every table alone. There is no hint of how the tables work with each other, what is the primary key etc. pp.  How are tables combined with others ? So an UML Diagram would  help much mor to understand the Design.  
What is a QRTZ_XXX Table and what is a vxxxx Table?

I would appriciate more informations on the Database. Thanks you in advance 

Greetings 

Diana 


Forum|alt.badge.img+3
  • Author
  • Senior Manager, Customer Advocacy
  • Nov 13, 2024 8:44 PM UTC

Great feedback, @diana.mahler ! I ran this by our PM team and they recommend the following:

The usual first step customers take when writing their own reports is to look at the reports shipped with the product, which provide the usual foreign key linkages between the most common tables - i.e. users, groups, secrets, etc.

If the customer is trying to get a more comprehensive view, the best option is to download and install the on-premises version. The schema is almost exactly the same, and it will give the customer the most complete view possible, as they can use whatever tool they like to turn the schema into the format they're looking for.

I hope this helps!


  • Nov 14, 2024 6:23 AM UTC

Hello @brigid.clover,

 

thanks for your answer, but it does’nt  help , sorry. We are on-premis only. I can see the little help provided in  the report editor already. Seriously ? Your recommandation is me having to dig into sql statements in OOB Reports myself to try to undestand your database? i dont ask you to put the UML in the wild, but for licenced customers you could - and i mean you should - provide a UML diagram to enable your customers to not only write own reports without needing support, but to understand the database it self. which is essential to me to administer such a sensible security matter.

Greetings,

Diana 


  • Nov 15, 2024 1:58 AM UTC

I agree with Diana here - providing a diagram would be far more helpful. I’ve raised this in the Ideas portal previously also. For those not running on prem the advice was to install an on prem instance to use SSMS to interrogate the DB… this is far too much to ask when a diagram would suffice.


  • Nov 18, 2024 5:01 PM UTC

If you have Secret Server On-Premise, you can create your own ER (entity relationship) diagram. This is what you are after since it shows both tables that are related and how they are related (foreign and primary keys). This is needed for your join statements. 

NOTE: I do not recommended creating an ER diagram of the entire database, as this will cause a massive performance hit and will be a mess to sort through. It is best to search for a table you know needs to be included and right click > add related tables.

To create an ER diagram in SQL Server Management Studio (SSMS), login to the database server in SSMS, expand the SecretServer database, right click on Database Diagrams and select “New Database Diagram”. Once the tab opens, you can right click in the white area of the screen and add a table. Once the table is added you can right click it and add related tables. You can also have it auto sort them because when it adds them, they are sitting on top of each other.

I’ve done this probably 100 times and it is very useful when building custom reports. It would be awesome to have similar functionality within the SS UI.