Oracle startup error not logged when using ADODB

I have an application that uses Adodb to insert data into an Oracle table (customer database).

  • The data has been inserted successfully if there are no errors.
  • If there is any error like invalid data type etc. The error occurs and is captured by my application and dumped to the log file.
  • A client of mine wrote his own triggers on this table. When a record is inserted, several other checks are performed before inserting data.

Now everything is fine so far.

But recently, we have found that many times the data is not inserted into the oracle table. In the meantime, there is no need to know about it. ”

  • No error found in log file check.
  • Then I followed the query, which was done.
  • Copied the Sacl oracle query request and executed it indicating the trigger error.

My question

  • The client is not willing to share trigger information.
  • The error does not occur when inserting into the oracle table, so we cannot register it or take any action.
  • The same qry, when executed directly in oracle, displays trigger errors.

Help Needed for

  • Why the error does not occur in ADODB
  • Should I inform the client to do any error raising.
  • Anything you can suggest to solve the problem

I have 0% -10% knowledge of Oracle

+1


a source to share


3 answers


"Copied the request for the Sacl oracle query and ran it with a trigger error." Since the ADO session does not report an error, it can happen that the error from the trigger is misleading. It might just be checking the rows "Hey, you're not allowed to insert into this table except by the application."

"The error does not occur when inserting into an oracle table, so we cannot register it or take any action." If the error does not occur during insertion, it MAY be raised during the commit. Deferred constraints and materialized views can do this.

Hypothetically, I could reproduce your experience like this: 1. Create table tab_a with deferred constraint initially deferred (e.g. val_a> 10) 2. ADO segment inserts a row violating constraint but it dooesn't error because constraint deferred 3. A commit is made and a constraint violation exception is raised, and the transaction is rolled back rather than executed.



So, see if you have the opportunity to make a commit error.

There may also be something else in the transaction that causes the entire transaction to be rolled back (for example, deadlock). Session trace would be good. Otherwise, look at the SERVERERROR trigger for the user to log the error (e.g. in a file so it doesn't rollback)

http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7004.htm#i2153530

+1


a source


  • You can register your business logic in the log table.
  • But you have to use a stored procedure to register the message.
  • The stored procedure must have a pragma transaction, so your log data must be stored in the log table.
  • You have a trigger that needs to have error handling - and when handling errors, you need to call the Logged stored procedure (with a pragma transaction)


+1


a source


I've never used adodb (and I'm guessing that's what you are using, not ADO.NET?) .. But a quick look at its links leads to this question. Are you really checking the return status of your request?

$ok = $DB->Execute("update atable set aval = 0");
if (!$ok) mylogerr($DB->ErrorMsg());

      

0


a source







All Articles