|
|
Archives of the TeradataForum
Message Posted: Thu, 04 Aug 2005 @ 08:50:18 GMT
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
| |