I have an Active Directory account "Contoso\SomeWinAccount" which I need to use for connecting to Oracle database. When I run a command prompt as a user Contoso\SomeWinAccount, I can successfully connect to Oracle like this:
sqlplus.exe [OracleUserName]@myTnsName
SELECT user FROM dual; returns OracleUserName. This works fine and this is exactly what I need.
The problem is, I need to achieve the same using PowerShell and OLEDB. With this connection string I can connect, but SELECT user FROM dual returns SomeWinAccount:
Provider=OraOLEDB.Oracle;User Id=/;Data Source=myTnsName;OSAutent=1;
What do I need to change in order to be able to act as OracleUserName when connected? Is it even possible with OLEDB provider?
Version: Oracle 12.2