5 Replies Latest reply on Feb 23, 2012 9:44 AM by Sudheendra-Oracle

    OCIServerVersion()  sec_return_server_release_banner


      In order to demonstrate the security feature of Oracle one has to call OCIServerVersion() or OCIServerRelease() when the user session has not yet been established
      while having the database parameter sec_return_server_release_banner = false.
      I am using python cx_Oracle module for this but i am not sure how to get the server version before establishing the connection any ideas ?

        • 1. Re: OCIServerVersion()  sec_return_server_release_banner
          Without connecting to server there is no way to get the server version or the banner information
          • 2. Re: OCIServerVersion()  sec_return_server_release_banner

            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:


            This will display the following string for release 11.1 and all subsequent releases and patch sets:

            Oracle Database 11g Release - Production

            Set SEC_RETURN_SERVER_RELEASE_BANNER to YES and then the current banner is displayed. If you have installed release, the banner displayed is:

            Oracle Database 11g Enterprise Edition Release - Production

            This feature will work with a release 11.1 or later server, and any version client.
            • 3. Re: OCIServerVersion()  sec_return_server_release_banner
              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
              • 4. Re: OCIServerVersion()  sec_return_server_release_banner
                Hi Sudheendra

                Thanks for taking time out and looking at this.
                Is there any example that can show me this
                • 5. Re: OCIServerVersion()  sec_return_server_release_banner
                  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