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: Thomas Kellerer <TAAXADSCBIXW_at_spammotel.com>
Date: Thu, 08 Mar 2007 14:30:29 +0100
Message-ID: <55ahflF24fgpmU1@mid.individual.net>


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 Received on Thu Mar 08 2007 - 07:30:29 CST

Original text of this message

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