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

{WIP} Changed OracleConnection to use Managed provider #298

Closed
wants to merge 1 commit into from

Conversation

erikbra
Copy link
Member

@erikbra erikbra commented Nov 5, 2017

I was tired of the warnings about System.Data.OracleClient being outdated, so I tried to convert to using https://www.nuget.org/packages/Oracle.ManagedDataAccess/ to connect to Oracle databases. In the passage, I created an integration test for Oracle too (made a copy of the MySql one), but I'm having a really, really hard time getting it to work.

Mainly I get a ORA-01017, which is basically "wrong password". However, it is not..
Other people are having the problem too:
https://stackoverflow.com/questions/14476875/ora-01017-invalid-username-password-when-connecting-to-11g-database-from-9i-clie
https://dba.stackexchange.com/questions/145055/ora-01017-invalid-username-password-logon-denied-from-sql-developer-but-sqlplu

A couple of questions:

  1. Are there any Oracle heads out there who could help me test? I haven't done Oracle in 10 years, and that was from Java
  2. Are anyone able to get the new integration test i wrote running with the current oracle driver? (it has client dependencies, I didn't want to go down that rabbit hole)

@BiggerNoise
Copy link
Member

I can't do much more here than say thanks. Hopefully, someone that wants Oracle support is willing to step up and help provide it.

@erikbra
Copy link
Member Author

erikbra commented Nov 6, 2017

Yes, we'll just have to see. I don't really know anyone using Oracle on .NET these days.

@erikbra
Copy link
Member Author

erikbra commented Nov 12, 2017

(just if anyone's watching #171 ), this PR tries to address that issue.

@bladeoflight16 - I saw you commented on #85 that we shouldn't switch to AnyCPU without switching to the fully managed Oracle driver. But we have a bit problems testing it. Would you be able to help us get this PR working? I have very rusty Oracle knowledge.

@bladeoflight16
Copy link

bladeoflight16 commented Nov 16, 2017

@erikbra Sorry for the delay.

Does the user have permissions to connect? You can make sure they do by running GRANT CREATE SESSION TO [user]. (There's also a role that contains the permission, but I personally prefer granting the permission directly, since this makes querying the database's metadata to see if they have it easier.) If the test also creates any objects, you'll need to grant permissions for creating them as well, and you'll likely need to grant the user some space on the tablespace.

I really wish using Oracle wasn't this complicated. The only reason granting connection permissions is necessary is because users and schemas are conflated as the same object type in Oracle.

I'd try to check it out and test myself, but I've had experiences wasting days trying to get RoundhousE up and running on my machine before. Don't really have that much time to sink into it right now.

@bladeoflight16
Copy link

@erikbra
Also, if you still want to try to get the existing integration tests to run, I have some advice about the native Oracle client.

You can download the Instant Client (the Basic Light one is all you need) and extract it somewhere. In your command prompt where you're running your tests, you can SET PATH=%PATH%;C:\path\where\you\extracted\instantclient_12_2 to let RoundhousE to find the binaries. You'll have to do it each time you launch the command line, of course, since that's a process level change to the environment variable.

I personally avoid the global client installs as much as possible, and I've found this works for the majority of applications. (There's more involved if you want to use ASP.NET providers, but RoundhousE doesn't require those.)

@erikbra
Copy link
Member Author

erikbra commented Nov 13, 2021

I'm abandoning this in favour of grate. I have just now implemented Oracle support there, with the newest Oracle provider. If any of you are interested in having a look, it's here: erikbra/grate#134

@erikbra erikbra closed this Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants