How to determine real-time row counts of each table in the RSA Via Lifecycle & Governance AVUSER schema
Originally Published: 2016-06-03
Last Modified: 2023-10-06
Article Number
Applies To
Issue
- The Statistics Report (ASR) under System > Diagnostics.
- Querying dba_tables as in:
$ sqlplus / avuser SQL> SELECT table_name, num_rows FROM dba_tables WHERE owner='AVUSER' AND num_rows IS NOT NULL;
However, neither of these methods are real time. The row counts are based on the last time database statistics (db stats) ran. Furthermore, db stats does not count the rows in every single table. This article addresses a third method that allows you to create a SQL script file that calculates and reports the current row counts for every table in the AVUSER schema. You may also modify the file to include only those tables for which you want row counts.
Tasks
- Create a SQL command file that will count the number of rows in each table in the AVUSER schema. Please note you may modify these steps to include any schema of your choosing.
$ sqlplus / as sysdba SQL> SPOOL <filename>.sql SQL> SET linesize 300; SQL> COLUMN ||TABLE_NAME|| FORMAT a200; SQL> COLUMN COUNT(*) FORMAT a10; SQL> SELECT 'SELECT '''||table_name||''',COUNT(*) FROM '||table_name||';' FROM dba_tables WHERE owner='AVUSER'; SQL> SPOOL OFF; SQL> EXIT
- Modify the SQL command file created in step 1 so that it runs without error. Using an editor of your choosing:
- Replace all occurrences of 'SELECT'''||TABLE_NAME||''',COUNT(*)FROM'||TABLE_NAME||';' with --, which is the SQL comment line command. Below is a code snippet from such a file before making the change:
- Remove the top and bottom lines prefaced with 'SQL>'. Also remove 'no. of rows selected' from the bottom of the file.
'SELECT'''||TABLE_NAME||''',COUNT(*)FROM'||TABLE_NAME||';' -------------------------------------------------------------------------------- SELECT 'T_AV_ROLE_TYPES',COUNT(*) FROM T_AV_ROLE_TYPES; SELECT 'T_AV_VIOLATIONS',COUNT(*) FROM T_AV_VIOLATIONS; SELECT 'T_AV_ROLEVER_VIOLATIONS',COUNT(*) FROM T_AV_ROLEVER_VIOLATIONS; SELECT 'T_AV_USER_RULE_VIOLATIONS',COUNT(*) FROM T_AV_USER_RULE_VIOLATIONS; SELECT 'T_AV_EXEMPTIONS',COUNT(*) FROM T_AV_EXEMPTIONS; ...
- After making the change:
-- -------------------------------------------------------------------------------- SELECT 'T_AV_ROLE_TYPES',COUNT(*) FROM T_AV_ROLE_TYPES; SELECT 'T_AV_VIOLATIONS',COUNT(*) FROM T_AV_VIOLATIONS; SELECT 'T_AV_ROLEVER_VIOLATIONS',COUNT(*) FROM T_AV_ROLEVER_VIOLATIONS; SELECT 'T_AV_USER_RULE_VIOLATIONS',COUNT(*) FROM T_AV_USER_RULE_VIOLATIONS; SELECT 'T_AV_EXEMPTIONS',COUNT(*) FROM T_AV_EXEMPTIONS; ...
- Save the file.
- Execute the file:
$ sqlplus avuser/secret SQL> @<filename>
Related Articles
This request contains no changes. It cannot be submitted error when adding entitlement belonging to a role in RSA Identity… 24Number of Views Total Orphaned Accounts count is not getting updated after local account mapping import in RSA Identity Governance & Lifec… 69Number of Views Data Collections fail with 'An invalid XML character (Unicode: 0x0) was found in the element content of the document' / 'I… 258Number of Views The Account Changes table shows an error instead of account details when change request is initiated via Roles in RSA Via … 34Number of Views RSA Governance & Lifecycle SAP Connector Datasheet Guide 23Number of Views
Trending Articles
How to manipulate imported RSA SecurID Software Token(s) on an iPhone or iPad device Reporting on RSA Authentication Manager 8.x users with On-Demand Token, a fixed passcode or a hardware/software token assi… How to Download OTP Token Seed Files from myRSA Anomalix idGenius - SAML Relying Party Configuration - RSA Ready Implementation Guide RSA MFA Agent 2.5 for Microsoft Windows Installation and Administration Guide
Don't see what you're looking for?