Setting OS User with Oracle Call Interface (OCI)

北战南征 提交于 2019-12-12 04:42:52

问题


I'm trying to change the OS User that is passed to Oracle during database connection set up in golang oracle oci-8 driver. This is in a similar way to setting the v$session.osuser in the Java JDBC drivers. I'm trying to modify mattn's go-oci8 oracle driver so I can change the os user value on the fly. I've tried adding conn.attrs.Set("os_user", "test_os_user") in the open method.

I've trawled through the oci docs and I think I might need to set OCI_ATTR_CLIENT_IDENTIFIER but I can work out if this is correct or how to do it. Any ideas if it is possible (and how) to change the osuser value using OCI?

Cheers


回答1:


It appears that it is not possible to set the OS User with the OCI driver. The Oracle documentation for Java highlights that setting the OS User is only possible when the oracle Java Thin driver is used.



来源:https://stackoverflow.com/questions/26115614/setting-os-user-with-oracle-call-interface-oci

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!