Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 20 Jan 2011 @ 18:24:21 GMT

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

Subj:   Re: Dynamic SQL question about rights
From:   Curley, David

The procedure does not have to be owned by the calling user. Here's what the 12.0 "SQL Reference: Stored Procedures and Embedded SQL" manual says:

Page 141:

The CALL DBC.SysExecSQL statement checks whether or not the creating user is also the immediate owner of the stored procedure and thus has the right to use dynamic SQL.

Page 134:

Privileges Required for Statement Execution

During stored procedure execution, the Teradata Database checks the privileges of the immediate owner of the procedure for all statements specified and all objects referenced in the stored procedure body.

If a user other than the immediate owner is executing the stored procedure, then the immediate owner must have the required privileges WITH GRANT OPTION.

Access Rights for Dynamic SQL

The owner and creator do not have to be the same for stored procedures with dynamic SQL. At execution time, the creator's rights are checked when the owner's rights are checked. If the creator does not exist at execution time, the system returns an error.

So it's clear then: the right to use dynamic SQL exists only if the creator and owner are the same, but the owner and creator do not have to be the same to use dynamic SQL.


  <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