EViews/Oracle connection

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

fi99ggb
Posts: 26
Joined: Tue Jul 02, 2019 4:05 am

EViews/Oracle connection

Postby fi99ggb » Wed Apr 15, 2020 8:31 am

Hello

I have managed to connect EViews with Oracle and run my code on a daily basis through the Windows task scheduler. The process involves, among other things, fetching data from Oracle, manipulating the data, estimating models and pushing data back to Oracle. The process is fully automated and runs smoothly in the majority of the times.

The problem is that there are several occasions when EViews and Oracle do not look like they communicate properly. There are times that I cannot fetch the data or push the data back to Oracle.

For your information:
- I have set up the task scheduler to run my program at three different times in a day (one hour apart) - I have set up three independent tasks. This is how I know that there are times that the connectivity is not always OK, i.e. I cannot fetch the data at 09.00 but I can fetch the data at the 10.00 task scheduler run.
- Before I fetch the data, I execute a simple command to make sure that the problem is not with the task scheduler or EViews.
- There are a few times that I am able to fetch the data and execute the whole program file but 10' later when the program tries to push the data back to Oracle, it fails.

I appreciate it is not a straightforward inquiry. But do you have any tips/insights you could share with me?

Thanks
George

EViews Steve
EViews Developer
Posts: 614
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: EViews/Oracle connection

Postby EViews Steve » Wed Apr 15, 2020 2:34 pm

If you're using the WFOPEN or PAGELOAD command to do the import, there is an undocumented option named TIMEOUT that you can try. For example:

Code: Select all

wfopen(type=odbc, timeout=secs) dsn "query string"

If you don't specify a timeout option, the default value is 30 seconds. It's possible that your database needs more time to return the query results at 9.00 so try increasing the timeout value to 60 seconds to see if that resolves the issue for you.

You can use the same TIMEOUT option on the WFSAVE (or PAGESAVE) call as well.

These kinds of problems can be hard to track down and fix as it can be caused by infinite reasons. Perhaps your fetch query is not optimized to use indexes in your Oracle tables or perhaps the database is busy at that moment handling some other query. Perhaps there is a network file backup happening at that exact moment that causes your network to be busy.

You should also try using Excel to fetch the same data using the same ODBC connection that EViews is using. Do this at the 9.00 and then do it again at 10.00 to see if you notice a time difference.

Steve

fi99ggb
Posts: 26
Joined: Tue Jul 02, 2019 4:05 am

Re: EViews/Oracle connection

Postby fi99ggb » Wed Apr 15, 2020 11:50 pm

Thanks, Steve. Makes sense.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 12 guests