Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Mon, 04 Oct 2004 @ 18:29:59 GMT

  <Prev Next>  
Next> Last>>  

Subj:   Stored Procedure Help - Switches logged on USER to the OWNER of the the Procedure.
From:   Kallarakkal, Baburaj (B.)

I am trying to run a stored procedure which uses a volatile tabel to store the resultset. . It runs fine, no run-time or compilation errors and returns the resultset. But the issue is after the execution the session itself is changed to the owner of the Stored Procedure.


For eg: On a Teradata SQL Assistant session if USER_A is logged on currently and if the below is executed.

     SELECT USER;                          /* This will return USER_A as the result * /
     EXECUTE User_TEMP.RecursiveSP ( );    /* Run's sucessfully & returns the resultset */
     SELECT USER;                          /* This will return USER_TEMP  * /

Any ideas why the second SELECT USER command returns USER_TEMP instead of returning USER_A. Any one has encountered this issue before?.

Is there any fucntionality in Stored Procedures in reality we can switch the user session to the owner of the stored procedure?.Any help to debug this's appreciated..



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