fsprojects / SQLProvider

A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides.
https://fsprojects.github.io/SQLProvider
Other
564 stars 144 forks source link

Provide access to the OracleConfiguration #682

Open rjmccann101 opened 4 years ago

rjmccann101 commented 4 years ago

In my work environment the default SQLNET.ORA file has SQLNET.AUTHENTICATION_SERVICES set to nts and kerberos5 - these are the company standards and I can't do anything about them. When I want to connect to Oracle using Dotnet Core I have to use a username and password and in my own code I end up having to use OracleConfiguration to set SqlNetAuthenticationServices to "none". There's details on my question https://stackoverflow.com/questions/59424123/kerberos-error-when-connecting-to-oracle-database-in-net-core/59424124#59424124.

So with the data provider there is no way to override the authentication method as far as I can see. I can get around the problem by changing my environment before running VSCode so I have my own SQLNET.ORA but it's not an ideal situation.

Could an new parameter be added to the data provider that allows OracleConfiguration and the equivalents for other databases to be set before the data provider makes it's connection to the database?

Thorium commented 4 years ago

Is this a design-time (static parameter) or runtime (parameter for GetDataContext-method) problem?

I don't have an access to Oracle DB, but I can accept the PR if someone else creates it.

rjmccann101 commented 4 years ago

I think it needs to be design-time, the provider just reports an error in the editor right now.

Thorium commented 4 years ago

Just note static parameters have to be primitive types (string, enum, ...) and cannot be discriminated unions.