Print Thread
TOracleEvent.Stop --> ORA-03113
#506 05/09/00 10:51 PM
Joined: Sep 1999
Posts: 17
Fresno, CA, USA
M
Member
OP Offline
Member
M
Joined: Sep 1999
Posts: 17
Fresno, CA, USA
Hi,

I'm still getting ORA-03113 errors when trying to stop a TOracleEvent component that's monitor DBMS_ALERT messages from my database. This is happening with Oracle 8.0.5.2.2 (which my DBA assures me is a latest and greatest 8.0.5 patch available as of last month) and 8.1.6.0.0.

If this is still a bug with the oracle code, do you have a reference # for the incident so my DBA can take it up with Oracle? Otherwise, do you have any other suggestions for me to pursue?


Michael Bonner
Programmer/Analyst III
City of Fresno
E-Mail: michael.bonner@ci.fresno.ca.us
Visit our web site at www.ci.fresno.ca.us
Re: TOracleEvent.Stop --> ORA-03113
#507 05/11/00 05:08 PM
Joined: Aug 1999
Posts: 22,216
Member
Offline
Member
Joined: Aug 1999
Posts: 22,216
There was indeed a problem in Oracle8 with the dbms_alert package that could lead to ORA-03113, but that was fixed in 8.0.5.1.1. Therefore I can only assume that something else is going wrong here. Could you check if there are any related errors in the database alert and trace files?

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations
Re: TOracleEvent.Stop --> ORA-03113
#508 05/18/00 11:49 PM
Joined: Sep 1999
Posts: 17
Fresno, CA, USA
M
Member
OP Offline
Member
M
Joined: Sep 1999
Posts: 17
Fresno, CA, USA
Marco,

***Note***
When the TOracleEvent component creates its copy of the OracleSession, it doesn't (currently) copy the state of the SQLTrace property!!! If you want to enable tracing in you're OracleEvent calls, you (currently) have to hack the code to do so.

Please add a request to modify this in the next release. If you want the specific code changes, I can give them to you.
***End Note***

I checked the logs and found out the ORA-03113 error was being generated because the session was getting blown away when I was starting the TOracleEvent component.

My program flow was: 1) Grab server, userID and password from encrypted registry entries (or use default values), 2) Open the session, 3) Open a bunch of lookup tables and an initial set of master>detail>detail data tables, 4) execute the OracleEvent component which watches for Alerts that the lookup tables have been updated (causes a refresh).

This was causing an error on the Oracle side, crashing the session. I added a 500ms delay between steps 3 and 4 and that worked around that particuliar problem.

The logs show the alerts registering fine now and firing ok.

My current problem is during the shutdown. Before I close the DataModule which contains the DOA components, I'm calling a routine that logs the user out of my application. This modifies the security table to show that the user has logged out. This fires an Alert to which the OracleEvent component responds.

After logging out the user, the DataModule is freed which stops and frees the OracleEvent component, closes all the Datasets and closes the session.

I'm currently getting Access Violations. I've traced into the code and the cause appears to be that the final event is still being processed when the OracleEvent component is freed. When the AlertLoop returns from processing the AlertDoOnEvent, Ready is False, because the thread wasn't terminated when the last event fired so the loop repeats, but, the main thread has already freed the components, so when the AlertLoop tries to access the Event.Query component, it's generating the AV.

I'll try to generate a short code block to send that illustrates the problem, and see if I can come up with a proposed solution or work-around.

Michael


Michael Bonner
Programmer/Analyst III
City of Fresno
E-Mail: michael.bonner@ci.fresno.ca.us
Visit our web site at www.ci.fresno.ca.us
Re: TOracleEvent.Stop --> ORA-03113
#509 05/23/00 05:41 PM
Joined: Aug 1999
Posts: 22,216
Member
Offline
Member
Joined: Aug 1999
Posts: 22,216
We'll copy the SQLTrace property to the duplicated session as you suggested, no problem. We will also check the AV problem. Looking at the code it seems that the thread must be terminated before the event and its objects are destroyed. If you have some code to reproduce the problem, let me know.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.030s Queries: 14 (0.011s) Memory: 2.5189 MB (Peak: 3.0394 MB) Data Comp: Off Server Time: 2024-05-11 20:24:11 UTC
Valid HTML 5 and Valid CSS