Page 1 of 1

Oracle schema name sensitivity

Posted: Mon 13 May 2019 16:32
by Eric_08
I'm connecting to an Oracle 12.1 database where schema name is all upper-case characters. In .NET core with EF core code, I use

Code: Select all

modelBuilder.HasDefaultSchema(<schemaName>);
method. If I specify schema name as all uppercase in .NET code, DevArt driver generates SQL statement like this:

Code: Select all

SELECT "t".ID
FROM <schema name>.<table name> "t"
However, if I specify at least one lower-case letter in schema name, it generates the statement where schema name is in double quotes, which apparently makes it case sensitive.

Code: Select all

SELECT "t".ID
FROM "<schema name>".<table name> "t"
I don't quite understand why it's not putting double quotes in one case, but then putting quotes in another case. I want schema name being without double quotes in all cases, which would make it case-insensitive. Is there a way to do that?

Thanks,
Eric

Re: Oracle schema name sensitivity

Posted: Tue 14 May 2019 12:51
by Shalex
Upper case is a default case in Oracle, so unquoted name is treated as the name with all upper case characters. If at least one character is in lower case, the name should be quoted.

As a workaround, set config.Workarounds.DisableQuoting=true; in your EF Core code. Refer to https://www.devart.com/dotconnect/oracl ... tions.html.

Re: Oracle schema name sensitivity

Posted: Wed 15 May 2019 20:26
by Eric_08
That did the trick.

Thanks,
Eric