This content has been marked as final. Show 5 replies
Well the documentation states otherwise
Controlling the Database Version Banner Displayed
OCIServerVersion() can be issued before authentication (on a connected server handle after calling OCIServerAttach()) to get the database version.
To avoid disclosing the database version string before authentication, set SEC_RETURN_SERVER_RELEASE_BANNER initialization parameter to NO. For example:
SEC_RETURN_SERVER_RELEASE_BANNER = NO
This will display the following string for release 11.1 and all subsequent releases and patch sets:
Oracle Database 11g Release 18.104.22.168.0 - Production
Set SEC_RETURN_SERVER_RELEASE_BANNER to YES and then the current banner is displayed. If you have installed release 22.214.171.124, the banner displayed is:
Oracle Database 11g Enterprise Edition Release 126.96.36.199 - Production
This feature will work with a release 11.1 or later server, and any version client.
What the document says & what I mentioned are true.
I mentioned "Without connecting to server there is no way to get the server version or the banner information"
I did not say without authentication.
The document also says before authentication it works.
You are connected after OCIServerAttach but for authentication you need to use call OCILogon2/OCISessionBegin/OCILogon with username and passwd
To get the server version/banner you can call OCIServerVersion after OCIServerAttach.
If your python modules are using OCILogon2 which does connection and authentication you will have to connect to get the server version unless you have the python sources which you want to modify to user OCIServerAttach followed by Logon/SessionBegin