All Forums Database
chillerm 15 posts Joined 04/11
02 Dec 2014
Stored Procedure switching user

I have a stored procedure I call to create a role, profile, and a couple users.  The SP finishes successfully, but after finishing I am no longer the user I logged on as, but rather the user the SP is created under.  This is a rather large SP, so I didn't want to post it.  Figured I would see if anyone had experience with this.  The same happens in both SQL assistant (15.00) and Teradata Studio (15.00)
 
Here is an example of execution.  
 

SELECT USER;
/*
USER
SYSDBA
*/
CALL SECADMIN.SP_CRT_BATCH('TEST', A, B, C, D, E);
/*
o_MAIN_USR_PASSWD o_SQL_USR_PASSWD o_MSG o_SQL_ERR_CD o_SQL_STATE
W2318R15O25Y I97G9I17Q Users successfully created. 0 00000
*/
SELECT USER;
/*
User
SECADMIN
*/
 
Thanks in advance!

You must sign in to leave a comment.