[Interest] [HELP]How to open an Oracle database with "sysdba" role inQt?

Richard Moore rich at kde.org
Wed Dec 19 17:09:03 CET 2012


On 19 December 2012 13:26, Till Oliver Knoll
<till.oliver.knoll at gmail.com> wrote:
> 2012/12/19 Xiaognag Wang <xiaogangwang2012 at hotmail.com>:
> Mapping that knowledge to Qt leads me to:
>
>   http://doc.qt.digia.com/qt/qsqldatabase.html#setConnectOptions
>
>
> That's what I get from a 2 minute Google session, mixed with a sound
> level of assumptions and educated guesses. Does that help?

That's where it would need to implemented, but at the moment the
driver always uses OCI_DEFAULT as you can see here:

        if (user.isEmpty() && password.isEmpty())
            r = OCISessionBegin(d->svc, d->err, d->authp,
OCI_CRED_EXT, OCI_DEFAULT);
        else
            r = OCISessionBegin(d->svc, d->err, d->authp,
OCI_CRED_RDBMS, OCI_DEFAULT);

This would need to be changed to add support for an additional option
that told it to use OCI_SYSDBA or OCI_SYSOPER from what I can see. So
right now, I'd say this isn't possible using the Qt OCI driver.

Cheers

Rich.



More information about the Interest mailing list