RAS Reporting Database Schema

The table below describes the RAS Reporting database schema.

To see the visual representation of the schema, please use the following link: https://kb.parallels.com/Attachments/kcs-171407/DB_relations_Diagram.jpg

Database schema

SQL query example

SELECT
	us.Username,
	ac.ApplicationName AS [Application Name],
	COUNT (ac.ApplicationName) AS [NumOf Times Used]
FROM
	dbo.Users us INNER JOIN
	dbo.RDSessions rd ON us.SID = rd.User_fk INNER JOIN
	dbo.ApplicationConnections ac ON ac.Session_fk = rd.Session_ID
GROUP BY
	us.Username,
	ac.ApplicationName

Referring to the database schema and the SQL query above, we can see that the query does the following:

  • Selects usernames from table dbo.Users and gives the "us" alias to the table.

  • Since dbo.Users is not directly related to dbo.ApplicationConnections, it should first join dbo.RDSessions using matches on field SID from dbo.Users and User_fk from dbo.RDSessions

  • After we have joined dbo.RDSessions (alias "rd"), which has link to dbo.ApplicationConnections, we may also join ApplicationConnections itself with alias "ac" and select application names and number of launches from it.

Last updated

Other Resources

Feedback

© 2024 Parallels International GmbH. All rights reserved.