This content has been marked as final. Show 5 replies
Without connecting to server there is no way to get the server version or the banner information
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 220.127.116.11.0 - Production
Set SEC_RETURN_SERVER_RELEASE_BANNER to YES and then the current banner is displayed. If you have installed release 18.104.22.168, the banner displayed is:
Oracle Database 11g Enterprise Edition Release 22.214.171.124 - 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
Thanks for taking time out and looking at this.
Is there any example that can show me this
Did you mean to show how to modify python sources to use OCIServerAttach and then OCISessionBegin ? Sorry, I don't have anything on this.
If you are looking for just an OCI Code then its very trivial and you can look up at OCI docs.
Edited by: Sudheendra on Feb 23, 2012 3:13 PM