Previous Topic: Sample Report OutputNext Topic: List Roles Connected to a Userid


Examples of Ad-Hoc SQL Queries

One advantage of externalizing the security information into a relational repository is that the information becomes available for ad-hoc queries using SQL. Queries that run a long time or that have a performance impact when run against the active security database can be easily run against the information in the security repository.

Because the repository is not used in security processing, intensive queries can be run with no impact on the performance of the security product. Because most of the data in the relational repository has been resolved and indexed, queries that run a long time in the base security environment are processed much quicker. In addition, custom queries cannot be serviced in the base security environment without writing programs that use the security product programming interface. These queries can be created and run against the information in the security repository.

This chapter contains examples of some SQL queries, shows how to write a query, and how the query would be serviced from the repository information.

This section contains the following topics:

List Roles Connected to a Userid

List Users Connected to a Role

List Userids for a Global ID

List Users Who Have Been Inactive

List Users Who Have Been Defined in the Last Thirty Days