Entity framework with oracle "Extent1"."[COLUMN_NAME]": invalid identifier - oracle

We are using Oracle 12c database with Entity Framework 6.1. We are using code first model to connect to Oracle database.
Although the data is saved successfully while reading the data it gives and error on a column which has a foreign key dependency on another table.
The error says:
"Extent1"."COLUMN_NAME": invalid identifier
I have checked the column name and the relationship between the table and the foreign key id.
Please suggest if anyone has faced the same issue.
regards,
A

Related

ORA-8103: Object no longer exist(On standby db)

I'm using oracle 12C and one of my partitioned table exist on primary database.
However, on my standby db ,when I'm selecting data from the same table, then it's throwing below error:
ORA-08103 'object no longer exist'
It's very strange my standby is behaving like this which is in sync with primary.
All other objects as well as tables ,I'm able to access and there data from other tables as well.
What could possibly causing this error and how to troubleshoot this? any help will be appreciated.

rethinkdb web interface error looking for other database even a database name has been specified

I'm trying to join two tables by parent id to child row name 'users_id' from the specific database via rethinkdb web interface, below is what I've tried
r.db('cn_chat').table('chat_que').eqJoin('users_id', r.table('connections'));
below is the error given by the web interface
where the expected database must be 'cn_chat' yet the web interface seems looking for the test database which did exist but not the correct database. Any help, ideas please?
The error message gives a good hint: "test.connection" doesn't exist.
When you are using r.table("connection") by default it tries to connect to a db called "test", but your table is in the "cn_chat" i assume.
Try the following:
r.db('cn_chat').table('chat_que').eqJoin('users_id', r.db('cn_chat').table('connections'));

Duplicate key error post SonarQube 5.3 upgrade

We have recently upgraded to Sonar 5.3 from 4.4.1 and seen duplicate key issue with one of our projects. I checked the collation and found database server and database to be case insensitive and column to be case sensitive. Should we change collation on the database to "Latin1_General_CS_AS" ? Changing the collation on the server is bit difficult but we can try with database.
SELECT SERVERPROPERTY('COLLATION')
Output: Latin1_General_CI_AS
SELECT DATABASEPROPERTYEX('<SonarDatabaseName>', 'Collation') SQLCollation;
Output: Latin1_General_CI_AS
For the column, it is "Laitn1_General_CS_AS"
Error in sonar log. I did see a duplicate key in the table but not sure if this is due to collation as reported here Duplicate key error with SonarQube 5.2:
ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVM28yZdM8YcgYQ_GJuI
org.sonar.server.computation.component.VisitException: Visit failed for Component
.
.
### Error updating database. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert duplicate key row in object 'dbo.projects' with unique index 'projects_kee'.
Thanks in advance.
Case sensitivity is a requirement, so yes you really need to change the collation of this database (putting it case-sensitive (CS) and accent-sensitive (AS)).

Oracle ODP.NET Entity Framework returning empty results

I have been trying to retrieve data from an Oracle 12g database using the following:
using (MyDbContext db = new MyDbContext())
{
var t = db.MyTable.ToList();
}
The underlying SQL is:
SELECT
"Extent1"."TOKEN" AS "TOKEN",
"Extent1"."FINGERPRINT" AS "FINGERPRINT",
"Extent1"."EXPIRES" AS "EXPIRES",
"Extent1"."ISSUED" AS "ISSUED"
FROM "MYSCHEMA"."MYTABLE" "Extent1
I run the SQL above within Oracle SQL Developer and it works just fine.
There is only 1 record in the MYSCHEMA.MYTABLE table but when calling the .ToList() I get zero results.
Am I missing some setting with Oracle's Entity Framework?
Using from nuget:
Oracle 11g (11.2.0.1.0 - 64bit)
Official Oracle ODP.NET, Managed Entity Framework Driver (12.1.021)
Microsoft Entity Framework (6.1.3)
Apparently when I inserted the new record into the MYSCHEMA.MYTABLE table I forgot to COMMIT it to the database.
Therefore, the Oracle SQL Developer tool was able to show me that the record was en route to becoming a record but until I committed it no other external process would be able to retrieve the record.
Lesson learned. Maybe this answer will be helpful to others.

H2 database write access reqd

I installed Talend Open Studio for MDM and Master data gets stored in H2 Database(which is the only DB provided by product). I created an entity in MDM. But I need to make changes in that entity datatype. I need to drop the entity which I already created. When I am trying to do this, I am getting below error.
sa#TMDM_DB/PUBLIC> drop table contact;
An error occurred when executing the SQL command: drop table contact
The database is read only; SQL statement: drop table contact [90097-176] [SQL State=90097, DB Errorcode=90097]
how to make this H2 DB as write mode. I need to have write access.

Resources