# ORA-01013 Message

**URL:** <https://community.easymorph.com/t/ora-01013-message/384>\
**Category:** General Q&A\
**Created:** [January 5, 2018, 10:03am UTC](https://community.easymorph.com/t/ora-01013-message/384 "2018-01-05T10:03:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MetzM](https://community.easymorph.com/user_avatar/community.easymorph.com/metzm/32/259_2.png) [@MetzM](https://community.easymorph.com/u/MetzM)\
**Post date:** [January 5, 2018, 10:03am UTC](https://community.easymorph.com/t/ora-01013-message/384/1 "2018-01-05T10:03:14Z")

</div>

Hello,

I try to select data from an Oracle database using an SQL-statement. The database is really big (34.459.000 data sets)  
The statement is listed below.

Easymorph stops with errormessage ORA-01013 indicating timeout problems.

Have you got a clue where to fix this issue? I allready tried with increased timeout, but did not work.

Regards,  
Michael

SELECT  
r.rd AS VERMITTLERNUMMER\_KOPF  
,aa.VERMITTLERNUMMER  
,aa.KOSTENSTELLE  
,to\_char(CAST(aa.ABRECHNUNGSDATUM AS Date),'YYYY-MM-DD') AS DATE\_ABRECHNUNG  
,COUNT(DISTINCT VERT\_ID) AS cnt\_VERT\_ABGER  
,SUM(ORG\_BEWERTUNGSSUMME) AS sum\_ORG\_BWS

FROM FF\_OWNER.S\_VFFW\_ABRECHNUNG\_ARCHIC aa  
LEFT JOIN FF\_OWNER.V\_FFREP\_RDVB\_LISTE r ON aa.vermittlernummer = r.vermittlernummer

WHERE 1=1  
AND r.rd IS NOT NULL  
AND aa.PROVISIONSART NOT IN 'Saldo'  
AND ABRECHNUNGS\_POSITION IN ('EA','PB')  
AND aa.KOSTENSTELLE IN (2061,2062,2065)  
AND aa.VERMITTLERNUMMER NOT IN ('MAK75729','MAK24698')  
AND CAST(aa.ABRECHNUNGSDATUM AS Date) \>= TO\_TIMESTAMP(COALESCE('{PRM\_DATE\_FROM}',to\_char(TRUNC(CURRENT\_DATE - 1),'YYYY-MM-DD HH24:MI:SS')),'YYYY-MM-DD HH24:MI:SS')  
AND CAST(aa.ABRECHNUNGSDATUM AS Date) \< TO\_TIMESTAMP(COALESCE('{PRM\_DATE\_TO}',to\_char(TRUNC(CURRENT\_DATE),'YYYY-MM-DD HH24:MI:SS')),'YYYY-MM-DD HH24:MI:SS')

GROUP BY  
r.rd  
,aa.VERMITTLERNUMMER  
,aa.KOSTENSTELLE  
,to\_char(CAST(aa.ABRECHNUNGSDATUM AS Date),'YYYY-MM-DD')

ORDER BY  
r.rd  
,aa.VERMITTLERNUMMER

---

<div class="post-metadata">

**Author:** ![andrew.rybka](https://community.easymorph.com/user_avatar/community.easymorph.com/andrew.rybka/32/13_2.png) [@andrew.rybka](https://community.easymorph.com/u/andrew.rybka)\
**Post date:** [January 5, 2018, 12:44pm UTC](https://community.easymorph.com/t/ora-01013-message/384/2 "2018-01-05T12:44:09Z")

</div>

Hello Michael,

Can you please provide an actual error message?

Do you use EasyMorph's Oracle connector or ODBC connector?

> [@MetzM](#):
>
> I allready tried with increased timeout, but did not work.

Just have to make sure that we are talking about "SQL SELECT timeout" setting in Advanced tab in connector configuration dialog? If yes - how many seconds did you tried to set there? And how much time passes before the query fails?

---

<div class="post-metadata">

**Author:** ![MetzM](https://community.easymorph.com/user_avatar/community.easymorph.com/metzm/32/259_2.png) [@MetzM](https://community.easymorph.com/u/MetzM)\
**Post date:** [January 8, 2018, 5:14pm UTC](https://community.easymorph.com/t/ora-01013-message/384/3 "2018-01-08T17:14:42Z")

</div>

Hello Andrew,

we are using the EM Oracle Connector.  
SQL SELECT timeout is set to 3.600 seconds.

Actual message follows.

Regards,  
Michael

---

<div class="post-metadata">

**Author:** ![andrew.rybka](https://community.easymorph.com/user_avatar/community.easymorph.com/andrew.rybka/32/13_2.png) [@andrew.rybka](https://community.easymorph.com/u/andrew.rybka)\
**Post date:** [January 8, 2018, 7:18pm UTC](https://community.easymorph.com/t/ora-01013-message/384/4 "2018-01-08T19:18:40Z")

</div>

Michael, thanks for the details.

And how much time does it takes for query to fail?

---

<div class="post-metadata">

**Author:** ![MetzM](https://community.easymorph.com/user_avatar/community.easymorph.com/metzm/32/259_2.png) [@MetzM](https://community.easymorph.com/u/MetzM)\
**Post date:** [January 9, 2018, 7:33am UTC](https://community.easymorph.com/t/ora-01013-message/384/5 "2018-01-09T07:33:23Z")

</div>

Hello Andrew,  
it stops exactly after 1 hour ... (Server and Professional)  
Regards,  
Michael

![EM ORA-01013](https://community.easymorph.com/uploads/default/optimized/1X/d5f7c211faa29abc2357a4029416a6f4abb83d10_2_690x24.JPG)

 ![EM ORA-01013_2](https://community.easymorph.com/uploads/default/original/1X/5941371cd81413629486087183ac203d73178372.JPG)

---

<div class="post-metadata">

**Author:** ![andrew.rybka](https://community.easymorph.com/user_avatar/community.easymorph.com/andrew.rybka/32/13_2.png) [@andrew.rybka](https://community.easymorph.com/u/andrew.rybka)\
**Post date:** [January 9, 2018, 2:32pm UTC](https://community.easymorph.com/t/ora-01013-message/384/6 "2018-01-09T14:32:20Z")

</div>

Hello Michael,

It seems that it just takes more than 1 hour to execute this query and import all the results to EasyMorph.

Can you please try to run this query with a limited number of rows (100 and 100,000, for example) and measure approximate import time?

Do you know an approximate number of rows which this query should return?

Regards,  
Andrew
