Skip to Main Content
  • Questions
  • Is it possible to overwrite OS User when connecting to oracle database from a .NET Application

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: July 13, 2016 - 7:25 pm UTC

Last updated: July 14, 2016 - 3:09 am UTC

Version: 11.0.0.116

Viewed 1000+ times

You Asked

I have a .NET Desktop Application which runs on our user's machine individually, as part of one of our functionality we need to pull data from Upstream that has data stored in an Oracle Database. Currently we get data from this oracle db by logging in with an application user id. As part of audit on their end they need to flag all those whose OS_User Id does not match the DB login Id due to which all users that are using my .Net Application are getting flagged. (e.g. OS_User : Scott and App DB user id : AppUser). Is there a way were we can overwrite the OS_USER to match the login User Id?

Thanks,
Gopi

and Connor said...

I dont think you can do so directly, but perhaps you might want to tack a different tack and look at proxy authentication

http://docs.oracle.com/database/121/DBSEG/authentication.htm#DBSEG99848

Because I can understand the auditors concern - its hard to tell the difference between OS user "A" connecting as "APPUSER" to the database, or doing it via SQLPlus and hacking the data.



Is this answer out of date? If it is, please let us know via a Comment