Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-11199

QOCI driver requires the ability to pass SYSOPER, SYSDBA or NORMAL modes to the OCISessionBegin call.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.6
    • None
    • SQL Support
    • None
    • cf2651ae80a34b388a6bbb41b5e62c7b352e8a80

    Description

      I'm using Qt 2009.03 at the moment, so this may be fixed. Apologies if so.

      The call to OCISessionBegin in the OCI Driver hard codes the "mode" parameter to OCI_DEFAULT. This means that I cannot write applications that connect as OCI_SYSDBA, OCI_ SYSOPER etc.

      May I suggest a driverMode parameter be appended to the open() call (or have a setMode() member function) of the QSqlDatabase class that allows me to specify any of the valid Oracle values (see below) required. This would be passed to the OCI driver to allow me to connect as required.

      Many thanks.

      From the Oracle docs:

      sword OCISessionBegin ( OCISvcCtx *svchp,
      OCIError *errhp,
      OCISession *usrhp,
      ub4 credt,
      ub4 mode );

      ...

      mode (IN)

      Specifies the various modes of operation. Valid modes are:

      • OCI_DEFAULT - in this mode, the user session context returned may only ever be set with the same server context specified in svchp. For encoding, the server handle uses the setting in the environment handle.
      • OCI_MIGRATE - in this mode, the new user session context may be set in a service handle with a different server handle. This mode establishes the user session context. To create a migratable session, the service handle must already be set with a non-migratable user session, which becomes the "creator" session of the migratable session. That is, a migratable session must have a non-migratable parent session.

      OCI_MIGRATE should not be used when the session uses connection pool underneath. The session migration and multiplexing happens transparently to the user.

      • OCI_SYSDBA - in this mode, the user is authenticated for SYSDBA access.
      • OCI_SYSOPER - in this mode, the user is authenticated for SYSOPER access.
      • OCI_PRELIM_AUTH - this mode may only be used with OCI_SYSDBA or OCI_SYSOPER to authenticate for certain administration tasks.

      Cheers,
      Norman.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              chehrlic Christian Ehrlicher
              normandunbar Norman Dunbar
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes