Changes between Initial Version and Version 1 of pushingData


Ignore:
Timestamp:
06/19/17 17:00:47 (7 years ago)
Author:
lttoth@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pushingData

    v1 v1  
     1= ZUAUSR Table Maintenance = 
     2 
     3== Overview == 
     4Three types of table maintenance for the zuausr@prod user are ongoing.   
     5* Cleaning out unused classes 
     6* Consolidating classes 
     7* Managing Fake or Terminated Users 
     8 
     9== Cleaning out Unused Classes == 
     10As we examine ZUAUSR tables, we at times find base classes that have no users associated with them.  When that is the case, the functional user is consulted about its relevance.  If the class is determined to be of no value, then the class is recorded in ZUAUSR administrative documents and deleted. See [[https://drive.google.com/drive/folders/0B1lxXqYPLTCicW1OZmswd2dYdUk|ZUAUSR > DELETE ZUAUSR CLASSES]]. 
     11 
     12=== Removing a SUPER class === 
     13A typical report to determine membership follows: 
     14{{{ 
     15FG_AR_ATN_CLS 
     16Description 
     17This class was created to finalize billing related to an audio conferencing service that was discontinued.  RayAnne Robinson created the class and assigned Laura Morisky to it who used it for a few months to clear out the accounts receivable.  Laura is its only member and has not used it since. 
     18  
     19Class Definition 
     20ZUAUSR@prod> select ztvclsd_class_inst, ztvclsd_assoc_class_name, 
     21  2  ztvclsd_assoc_class_type, ztvclsd_assoc_class_inst 
     22  3  from ztvclsd 
     23  4  where ztvclsd_class_name = 'FG_AR_ATN_CLS'; 
     24  
     25CLS Inst   Associated Class Name          AssocType  AssocInst 
     26---------- ------------------------------ ---------- ---------- 
     27LRGP       MTR_ATN_C                      BANNER     LRGP 
     28LRGP       USR_DEFAULT_Q                  ORACLE     LRGP 
     29LRGP       USR_DEFAULT_M                  ORACLE     LRGP 
     30  
     31PROD       QAA_ACCESS_C                   BANNER     PROD 
     32PROD       MTR_ATN_C                      BANNER     PROD 
     33PROD       USR_DEFAULT_M                  ORACLE     PROD 
     34PROD       USR_DEFAULT_Q                  ORACLE     PROD 
     35  
     367 rows selected. 
     37Zero Members 
     38 
     39}}} 
     40 
     41Since there are no members, and this is a SUPER class, there are two steps required.  One must first delete the class from ZTVCLSD, then delete it from ZTVCLSA.  All entries in the ZTVCLSD table are deleted using the following command: 
     42{{{ 
     43DELETE ztvclsd 
     44where ztvclsd_class_name = 'FG_AR_ATN_CLS'; 
     45}}} 
     46The associated class names are not removed from ZTVCLSA so they remain associated with SUPER classes that are actively used.  
     47 
     48The following command deletes the class from ZTVCLSA 
     49{{{ 
     50DELETE ztvclsa 
     51where ztvclsa_class_name = 'FG_AR_ATN_CLS'; 
     52}}} 
     53 
     54=== Removing an Associated Class === 
     55Several associated classes had not been used in ZUAUSR.  If an associated class had not been included in a SUPER class, then removing it from ZTVCLSA is enough.  However, if it had been included in a SUPER class, the following would suffice to remove its associations. The following was such a class 
     56||'''Type'''||'''Class Name'''||'''Instance'''|| 
     57||ORACLE||UA_APPWORX||APMT|| 
     58||ORACLE||UA_APPWORX||APMP|| 
     59 
     60First query the number of classes to which its associated: 
     61{{{ 
     62SELECT count(*) from ztvclsd 
     63WHERE ztvclsd_assoc_class_name = 'UA_APPWORX'; 
     64}}} 
     65A number results.  This is the number you use to ensure that you do not delete any other classes from the ZUAUSR tables.  The following deletes the class from any association to a SUPER class. 
     66{{{ 
     67DELETE ztvclsd 
     68WHERE ztvclsd_assoc_class_name = 'UA_APPWORX'; 
     69}}} 
     70The number should match the result from the previous count.  If it does, issue a "COMMIT;" command. 
     71 
     72== Managing Terminated or Fake Users == 
     73As time permits, users who have no classes assigned in ZUAUSR are compared to what privileges are assigned in GURUCLS and ORACLE.  If those users have no roles in Banner or ORACLE, they are set to terminated status.  This may be done in the ZUAUSR forms, but would require work from another co-worker who happened to be managing the queue.  Setting the termination status can be done easily by performing three update queries as zuausr@prod:  
     74{{{ 
     75INSERT INTO ztrusrd 
     76(ztrusrd_user_acct_id, ztrusrd_class_type,  
     77 ztrusrd_class_name, ztrusrd_class_inst) 
     78VALUES 
     79('idxxx','SUPER','EMPLOYEE_TERMINATE_CLS','PROD'); 
     80 
     81UPDATE ztbusrh 
     82SET ztbusrh_term_flag = 'X' 
     83WHERE ztbusrh_user_acct_id = 'idxxx'; 
     84 
     85UPDATE ztbusrh_load 
     86SET ztbusrh_term_flag = 'X' 
     87WHERE ztbusrh_user_acct_id = 'idxxx'; 
     88 
     89commit; 
     90}}} 
     91 
     92At times, on TEST database instance or PREP database instance, fake users have been created that are not managed in both the ZTBUSRH_LOAD and ZTBUSRH table.  These users may have Social Security Numbers of actual users who had been affiliated with UA at one time.  Since no termination date is set and since they are not showing up as actual users, they linger in ZUAUSR. 
     93 
     94As a policy, we are removing these users from ZUAUSR. The following must be run as zuausr@prod.  One may find them in only one table, but I list both below: 
     95{{{ 
     96DELETE ztbusrh 
     97WHERE ztbusrh_user_acct_id = 'fakeid'; 
     98 
     99DELETE ztbusrh_load 
     100WHERE ztbusrh_user_acct_id = 'fakeid'; 
     101 
     102commit; 
     103}}} 
     104 
     105