Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle9: Can I create a variable for each session?
"Andreas Mosmann" <keineemails_at_gmx.de> wrote in message
news:1123679987.6_at_user.newsoffice.de...
> Hi,
>
> hope I can explain it.
> Is there a way an application can store any variable in a session so
> that any function/trigger can use this?
>
> f.e.
> ActualUser:=(a number) [1]
>
> crete trigger ...
> :new.id:=ActualUser;
> end;--trigger
>
> Important is, that this variable must be created for each session.
>
> The only way I can imagine is to create a table where every session
> inserts a row with session-id and user-id and trigger has to look into
> v$session and this table, preconditioned there is a possibility for the
> trigger to get to know which session called it.
>
> Thanks
>
> Andreas
>
> [1] User in that case isn't an Oracle-User. There are some users that
> share 1 oracle- user
>
> --
> wenn email, dann AndreasMosmann <bei> web <punkt> de
You can have a variable in a package. Its value is private to each session. Jim Received on Wed Aug 10 2005 - 08:53:21 CDT
![]() |
![]() |