Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RH not working against Oracle TNSless connection #417

Closed
twerthi opened this issue Aug 25, 2020 · 6 comments
Closed

RH not working against Oracle TNSless connection #417

twerthi opened this issue Aug 25, 2020 · 6 comments
Labels
Oracle specific Issues specific to Oracle provider

Comments

@twerthi
Copy link

twerthi commented Aug 25, 2020

Attempted to use rh against Oracle 19c but was unable to connect. I tried both the EZConnect connection string and the one described in the Wiki,
--connectionstring=Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Oracle1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=SAKILA)));User Id=SAKILA;Password=********;Persist Security Info=false --databasetype=oracle --silent --withtransaction=false --version=1.0.20238.115452

Creating (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Oracle1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=SAKILA))) database on  server if it doesn't exist. 
roundhouse.databases.oracle.OracleDatabase with provider System.Data.OracleClient does not provide a facility for creating a database at this time. 
System.Data.OracleClient.OracleException (0x80131938): ORA-01017: invalid username/password; logon denied 
   at System.Data.OracleClient.OracleException.Check(OciErrorHandle errorHandle, Int32 rc) 
   at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName) 
   at System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions) 
   at System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) 
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) 
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) 
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) 
   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) 
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) 
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) 
   at System.Data.OracleClient.OracleConnection.Open() 
   at roundhouse.connections.AdoNetConnection.open() in C:\projects\roundhouse\product\roundhouse.core\connections\AdoNetConnection.cs:line 23 
   at roundhouse.databases.AdoNetDatabase.open_admin_connection() in C:\projects\roundhouse\product\roundhouse.core\databases\AdoNetDatabase.cs:line 48 
   at roundhouse.databases.AdoNetDatabase.setup_database_command(String sql_to_run, ConnectionType connection_type, IEnumerable`1 parameters) in C:\projects\roundhouse\product\roundhouse.core\databases\AdoNetDatabase.cs:line 194 
   at roundhouse.databases.oracle.OracleDatabase.run_sql_scalar(String sql_to_run, ConnectionType connection_type, IList`1 parameters) in C:\projects\roundhouse\product\roundhouse.databases.oracle\OracleDatabase.cs:line 184 
   at roundhouse.databases.DefaultDatabase`1.run_sql_scalar(String sql_to_run, ConnectionType connection_type) in C:\projects\roundhouse\product\roundhouse.core\databases\DefaultDatabase.cs:line 222 
   at roundhouse.databases.DefaultDatabase`1.run_sql_scalar_boolean(String sql_to_run, ConnectionType connection_type) in C:\projects\roundhouse\product\roundhouse.core\databases\DefaultDatabase.cs:line 141 
   at roundhouse.databases.DefaultDatabase`1.create_database_if_it_doesnt_exist(String custom_create_database_script) in C:\projects\roundhouse\product\roundhouse.core\databases\DefaultDatabase.cs:line 115 

Verified username and password were correct using sqlplus

@ninjabadgerpirate
Copy link

Hi Twerthi,

I am not sure if you are using Docker to host your Oracle Express image, but I had this issue before when I was building my Oracle Express image for Docker and the solution was to create a sqlnet.ora file with the following entries:

SQLNET.ALLOWED_LOGON_VERSION=11
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=11
SQLNET.ALLOWED_LOGON_VERSION_SERVER=11

And then in your DockerFile that builds the Oracle Express image, copy the file sqlnet file into your oracle home directory:

COPY sqlnet.ora $ORACLE_HOME/network/admin

Hopefully this helps you.

@twerthi
Copy link
Author

twerthi commented Sep 9, 2020

Hey there, thanks for your reply :) Unfortunately, I'm not using Docker, this is installed on a server. I'll admit that my knowledge in Oracle is limited. If I'm reading this correctly, it looks like it should work for regular Oracle too, yes?

@erikbra
Copy link
Member

erikbra commented Oct 4, 2020

Hi, @twerrthi, sorry for the issues when running against Oracle. That said, we do have a lot of issues on Oracle, and we are running with very old Oracle drivers. We have an issue from 2015 on converting to the managed Oracle provider, but no one has fixed it since then (#171 )

I have very little experience with Oracle the latest 15 years, so testing of this migration would be a bit lacking. So, to be frank, we are dependent on someone with Oracle competence stepping up and pulling the Oracle implementation forward technology-wise.

This is the mixed blessing of Open source, I'm afraid. Nothing gets done if nobody does it. And, I, as maintainer, don't have the time and resources to solve everything. Collaborative effort is a prerequisite.

@erikbra erikbra added the Oracle specific Issues specific to Oracle provider label Oct 4, 2020
@twerthi
Copy link
Author

twerthi commented Oct 15, 2020

@erikbra That is understandable. I'd love to help, but my knowledge in Oracle is most likely even less than your own :P

@erikbra
Copy link
Member

erikbra commented Nov 28, 2021

Hi, @twerthi - could you please check out if my reboot of RoundhousE, called grate, solved this issue? It uses much newer Oracle libraries.

It should be a more-or-less drop-in replacement to RoundhousE: https://erikbra.github.io/grate/

@twerthi
Copy link
Author

twerthi commented Jul 19, 2022

Closing as this project is deprecated.

@twerthi twerthi closed this as completed Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Oracle specific Issues specific to Oracle provider
Projects
None yet
Development

No branches or pull requests

3 participants