Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 23 Jul 2014 @ 00:27:50 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Database access rights macros: AllDatabaseRights & AllUserRights
 
From:   Martin Barrow

Hi Dave,

Yes - that is what I was expecting.

I temporarily changes the macro I installed to be:

     UNION ALL
     SELECT                          -- GET RIGHTS HELD THROUGH A SUBROLE
          :DATABASENAME AS DATABASENAME
         ,ROL.ROLENAME AS UR
         ,mbrx.GRANTEE
         ,ROL.TABLENAME
         ,ROL.COLUMNNAME
         ,ROL.ACCESSRIGHT
         ,NULL (CHAR(1)) AS GRANTAUTHORITY
         ,ROL.GRANTORNAME
         ,NULL (CHAR(1)) AS ALLNESSFLAG
         ,NULL (CHAR(1)) AS CREATORNAME
         ,ROL.CREATETIMESTAMP
      FROM DBC.ALLROLERIGHTSV ROL
      JOIN DBC.ROLEMEMBERSV MBRx
        ON MBRx.ROLENAME = ROL.ROLENAME
      WHERE DATABASENAME =  :DATABASENAME
      and grantee in (sel rolename from dbc.rolemembers)

I imagine it gives the same results.


Regards,

Martin Barrow



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023