Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 04 Aug 2005 @ 08:50:18 GMT


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


Subj:   Re: Collect Stats in a Procedure
 
From:   Anomy Anom

<-- Anonymously Posted: Wednesday, August 03, 2005 19:48 -->

Robert Diehl wrote:

  Create a User and name it something like PROD_PROCS. Then create the stored procedures in PROD_PROCS. It does not matter who creates the stored procs.  


AFAIK, it_does_ matter who creates the stored procs. I'm away from my SP notes, but to be able to use Dynamic SQL, the Owner (PROD_PROCS), must be the one who compiles it. Therefore it is necessary to logon as PROD_PROCS, if only once.


  Then you can use any user to CALL. Proper permission must be given to the calling User and PROD_PROCS user. The calling user just needs Execute procedure on PROD_PROCS. The user PROD_PROCS needs nay access needed by the stored procedures with the grant option. For example, the stored procedure does select, insert, update and delete on database PROD_Tables. The grant would be  



          > GRANT select, insert, update, delete on PROD_TABLES
          >     to PROD_PROCS with grant option.

Yes, we ran into permissions issues that were solved by using GRANT.


  You never need to logon as PROD_PROCS.  


See above, you do need to logon as PROD_PROCS. But, you do not need to be PROD_PROCS to execute the SP when it moves to production.


-Anomy



     
  <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