Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Altering the osuser in v$session

Re: Altering the osuser in v$session

From: Steve Howard <stevedhoward_at_gmail.com>
Date: 8 Mar 2007 12:27:33 -0800
Message-ID: <1173385653.662337.259370@8g2000cwh.googlegroups.com>


On Mar 8, 8:30 am, Thomas Kellerer <TAAXADSCB..._at_spammotel.com> wrote:
> On 08.03.2007 14:16 Steve Howard wrote:> On Mar 8, 2:10 am, Thomas Kellerer <TAAXADSCB..._at_spammotel.com> wrote:
> >> On 07.03.2007 11:56 bove027 wrote:
>
> >>> Hi,
> >>> is it possible to change the osuser of the session?
> >> Depends on how you connect to the database.
> >> With Java/JDBC this is possible.
>
> > Hi Thomas,
>
> > I would be interested to see how you got that to work. I tried
> > sometime ago, but could never get osuser to set.
>
> [...]
>
> > Class.forName("oracle.jdbc.driver.OracleDriver");
> > Properties props = new Properties();
> > props.put("user", args[0]);
> > props.put("password", args[1]);
> > props.put("v$session.osuser", "linus");
> > props.put("v$session.program", "charlie_brown");
> > Connection con =
> > DriverManager.getConnection("jdbc:oracle:thin:@peantus:152
> > 1:test",props);
>
> That's the way I do it, and it works for me.
>
> This is with the latest 10.2.0.2.0 driver against an Oracle 10.2.0.1.0
> database.
>
> In my experience the behaviour of the driver with regards to the
> v$session stuff is very different. Newer drivers will e.g. refuse to
> "detect" settings for v$session.terminal, whereas the 9.x drivers did.
>
> Thomas

Thank you! I tried that six months ago with 10.2.0.1 drivers, which still don't work. The 10.2.0.2 drivers I just downloaded, however, do work.

Thanks again!

Steve Received on Thu Mar 08 2007 - 14:27:33 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US