jeremyevans / sequel

Sequel: The Database Toolkit for Ruby
http://sequel.jeremyevans.net
Other
4.98k stars 1.07k forks source link

SSL certification options for oracle #2004

Closed rajeevkannavmck closed 1 year ago

rajeevkannavmck commented 1 year ago

Note: If you have a question about Sequel, would like help using Sequel, want to request a feature, or do anything else other than submit a bug report, please use GitHub Discussions or the sequel-talk Google Group.

Complete Description of Issue

Database configurations are

configuration_with_ssl = { "adapter"=>"oracle", "database"=>"database_name", "username"=>"username", "password"=>"password", "host"=>"hostname", "port" => "1538", "encoding"=>"utf8", "sslmode" => "verify-full", "sslrootcert" => "certificates/qa.pem" }

db_2 = Sequel.connect(configuration_with_ssl, :after_connect => block_io_to_prevent_errors ) db_2.test_connection

When trying to connect with port 1531 Or 1538 on oracle getting 1531 - oci8.c:557:in oci8lib_300.so: OCIError: ORA-12541: TNS:no listener (Sequel::DatabaseConnectionError) 1538 - oci8.c:557:in oci8lib_300.so: OCIError: ORA-12537: TNS:connection closed (Sequel::DatabaseConnectionError)

Simplest Possible Self-Contained Example Showing the Bug

Is this correct way to configure sslmode and sslrootcert for oracle ??

Full Backtrace of Exception (if any)

SQL Log (if any)

jeremyevans commented 1 year ago

I'm not sure how to setup SSL connections with the oracle adapter, it doesn't appear to be currently supported. If you show how you can do so when using OCI8 directly, I can probably add a way to support it in Sequel.

In the future, please ask questions about how to use Sequel in GitHub Discussions or the Google Group. Only use GitHub Issues to report a bug in Sequel.