Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: v$session slow?
"Alex Schonlinner" <schonlinner_at_yahoo.com> a écrit dans le message de
news:56fd2574.0402110938.95596cc_at_posting.google.com...
> "Michel Cadot" <micadot{at}altern{dot}org> wrote in message
news:<4029ef7b$0$28142$626a14ce_at_news.free.fr>...
> > "Alex Schonlinner" <schonlinner_at_yahoo.com> a écrit dans le message de
> > news:56fd2574.0402110058.2d8b8254_at_posting.google.com...
> > > Hi,
> > >
> > > in our production database we would like to use an update trigger on
> > > an table, which accesses v$session in order to extract the information
> > > about the person who is currently performing this update.
> > >
> > > I thought I have read something about *not* using v$session for such
> > > purposes because it may be very slow.
> > >
> > > Is this correct? If yes, what other methods are there?
> > >
> > > Regards,
> > > Alex
> >
> > What is your Oracle version?
> > Which information do you need to get?
> > The Oracle version is 8.1.7.3 > > The information we would like to use is osuser, machine and program from > v$session, so our system can recognize who (i.e. what interface or human > being) made the update. > > But as I said above, I'm personally anxious about retrieving that information > from v$session. > But I'm not sure why...it's only a feeling not to use such views for such > jobs... > > But perhaps others have a much better experience with Oracle... > > Regards, > Alex
select sys_context('USERENV','OS_USER') osuser,
sys_context('USERENV','HOST') machine from dual;
For program, you have to create your own context and set it in a logon trigger from v$session then retrieve your context data as for the system USERENV context.
Regards
Michel Cadot
Received on Wed Feb 11 2004 - 12:29:05 CST
![]() |
![]() |