njihan
njihan

Reputation: 13

Perl DBI connecting to Oracle 12c

I'm using Perl DBI & trying to connect to Oracle 12c. I get an error:

DBI connect('host=serverip;sid=comms;port=1521','comms',...) failed: ORA-28040: No matching authentication protocol (DBD ERROR: OCISessionBegin)

My connection is:

DBI->connect($connectionString, $user, $passwd,{PrintError=>1, RaiseError=>1, AutoCommit=>1})

Would like to know if DBI can connect to Oracle 12c? Should I change to use something else?

Am new to Perl, so any help very much appreciated.

Thank You.

Upvotes: 0

Views: 4913

Answers (2)

Ayrat Salavatovich
Ayrat Salavatovich

Reputation: 13

The connection string is always of the form: "dbi:Oracle:" There are several ways to identify a database:

  1. If the database is local, specifying the SID or service name will be enough.
  2. If the database is defined in a TNSNAMES.ORA file, you can use the service name given in the file
  3. To connect without TNSNAMES.ORA file, you can use an EZCONNECT url, of the form: //host[:port][/service_name]

Upvotes: 0

Lalit Kumar B
Lalit Kumar B

Reputation: 49082

Seems like an issue with the sqlnet.ora file. The parameters might not be same for the sqlnet.ora file in the client-side and server-side.

Since you have not posted all the details, there could be more than one issue. however, the most common is the SQLNET.ALLOWED_LOGON_VERSION.

Read the Database Net Services Reference documentation for more details on Parameters for the sqlnet.ora File.

Upvotes: 0

Related Questions