Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Altering the osuser in v$session
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. >>
> 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 Received on Thu Mar 08 2007 - 07:30:29 CST
![]() |
![]() |