#1 2012-07-30 09:04:07

Bascy
Member
From: The Netherlands
Registered: 2012-06-22
Posts: 108

Cannot run Perftest on our own Oracle Database

I'm trying to run the new Perftest project against our own oracle 10g installation, but getting the following error:

..raised exception class ESQLDBOracle with message 'ORA-00904: "CREATEDAT": invalid identifier

Any suggestions?

Offline

#2 2012-07-30 09:08:02

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Cannot run Perftest on our own Oracle Database

Perhaps there is already a SAMPLERECORD table in your test base, with some missing column.
Run "DROP TABLE SAMPLERECORD" before launching the test.

Or perhaps you do not have the latest version of our units (including SynOracle).

Or perhaps there is an issue with Oracle 10g.
I've tested only with Oracle 11g.

Offline

#3 2012-07-30 09:09:55

Bascy
Member
From: The Netherlands
Registered: 2012-06-22
Posts: 108

Re: Cannot run Perftest on our own Oracle Database

Ok, solved this one myself ;-)
Turns out the Perftest uses a SampleRecord table, and that one already existed in our database LOL

Next error:

ORA-01861: Literal does not match format string

probably during "select max(id) from SampleRecord"

no the error occurs during the following statement:

SQLite3DB.TSQLRestServerStaticExternal.ExecuteInlined('insert into SampleRecord (ID,FirstName,LastName,Amount,BirthDate,LastChange,CreatedAt) VALUES (:(1):,:(''Namé 5''):,:(''5''):,:(0.05):,:(''1900-01-05''):,:(135052048292):,:(135052048292):)',False)

Last edited by Bascy (2012-07-30 09:28:17)

Offline

#4 2012-07-30 09:45:37

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Cannot run Perftest on our own Oracle Database

I think this is because it expects NLS_DATE to be set to YYYY-MM-DD-HH24.MI.SS which is not the case on your computer I guess.
On our PCs, this is the case, so it works as expected.

There is an issue here, since we should not have to force this global environment variable to be set to a specific value.
The problem is that the date and time is sent as plain text - i.e. sad''1900-01-05''): - from the ORM core. So it does not know if this is a text parameter or a date time parameter...
I'll find out how to circumvent this issue. Certainly by setting OCI_ATTR_DATEFORMAT for the column.

Thanks for the report.

Offline

#5 2012-07-30 10:06:55

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Cannot run Perftest on our own Oracle Database

I've fixed issue when NLS_DATE_FORMAT is not ISO-8601: since the ORM part of mORMot will send date/time as ISO8601 text, we now force proper NLS_DATE_FORMAT.

It has been forced when the connection is created.
See http://synopse.info/fossil/info/c0b995baef

Hope it fixes your issue.

Offline

#6 2012-07-30 10:10:48

Bascy
Member
From: The Netherlands
Registered: 2012-06-22
Posts: 108

Re: Cannot run Perftest on our own Oracle Database

ab wrote:

I'll find out how to circumvent this issue. Certainly by setting OCI_ATTR_DATEFORMAT for the column.

Can i set this attribute by hand somehow? maybe with SQLPLUS?

Hahaha you have fixed the problem faster than i can think of a workaround,
thanks

Last edited by Bascy (2012-07-30 10:17:12)

Offline

#7 2012-08-24 15:01:34

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Cannot run Perftest on our own Oracle Database

The Date/Time format problem has been fixed at higher level, for all external DB.
See http://synopse.info/fossil/info/036c93bf9b

Now before insertion, the column type will be checked to ensure a DATE column will receive a TDateTime bound parameter, computed from the JSON textual value.

Offline

Board footer

Powered by FluxBB