How can I connect to an Oracle database as SYSDBA using dbExpress?

3k Views Asked by At

I have a Delphi application that connects to an oracle database.

When I try to log in as SYSDBA, I get the error:

ORA-28009: connection as SYS should be as SYSDBA or SYSOPER

When I try to log in with a user of "SYS AS SYSDBA", I get the error:

ORA-01017: invalid username/password; logon denied

How can I log in as sysdba using a dbExpress connection?

See also this related post regarding ADO

3

There are 3 best solutions below

1
On BEST ANSWER

I found nothing specific for special dbexpress driver. But try to add a connection parameter DBA privilege with the value SYSDBA.

Connection.Params.Append('DBA Privilege=SYSDBA'); 

I have no delphi installed to check the concrete syntax of the parameter name. Please try using an underscore instead of the blank.

This page shows several connection strings used in certain tools to connect to oracle database.

0
On

connect SYS as SYSDBA;

or you can use SYSOPER

the password will be what you specified at installation (same as SYSTEM)

refer: http://docs.oracle.com/cd/E11882_01/server.112/e10897/users_secure.htm#ADMQS12004

1
On

Specify the user as "Joseph as SYSDBA" instead of Joseph

I found a checklist but not sure whether it is useful or not. Just have a look.

Checklist