Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Handling JDBC connection when v$session.osuser value is more than 30 chars

I am installing a third party application and it set the value of v$session.osuser to the user name when connecting to oracle 12.1. Unfortunately the username of my linux account is 34 chars long and because of this installation is not able to complete.

I can't change the linux account username and also can't edit connection properties programmatically as I don't have access to the application source.

Below are my attempts so far (that didn't work):

  1. Updated .bash_profile to trim the value of linux USER property to 29 chars
  2. Added two command line argruments, -Doracle.jdbc.v$session.osuser={USER:0:29} and -Duser.name={USER:0:29}

Any other way options that would work?

like image 912
Kumar V Avatar asked Oct 23 '25 19:10

Kumar V


2 Answers

Try:

java -Doracle.jdbc.v\$session.osuser="my_user" ...
like image 102
FCA69 Avatar answered Oct 26 '25 09:10

FCA69


I had the same issue and managed to fix it by setting the user.name value in the JVM. So, add:

-Duser.name=<shorter-name>

... as an option when starting the JVM.

like image 36
BarrySW19 Avatar answered Oct 26 '25 07:10

BarrySW19



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!