How sql loader handle the error throw back from DB?

How sql loader handle the error throw back from DB?

Post by C Chan » Sun, 28 Apr 2002 23:49:10



I have an batch file using the sqlldr to insert raw data into a view,
which triggers an insert into a real table.   Apparently I did not have
some exception in that procedure to handle the insert error. So when it
crash, it caused the sqlldr failed and since there is no handle, so it
generated a Dr. Waston error on screen.  I want to know is there an
error handling by sql loader? ( I know I can handle the exception inside
the sql procedure) but what if I still miss somthing.  Thanks

C Chang

 
 
 

How sql loader handle the error throw back from DB?

Post by Bricklen Anderso » Mon, 29 Apr 2002 00:01:16


What do you mean by "crash"?  What crashed?  How?  Is sqlldr loading the
data fine into you view (insert errors should be caught by your sqlldr
error log file), then there are problems when the trigger pops the data
into the table? (btw, are you using an "instead of" trigger?). If that's
the case, have you coded an exception handler into the trigger itself to
catch and/or redirect errors?
Or is there something else involved with your loading process?


> I have an batch file using the sqlldr to insert raw data into a view,
> which triggers an insert into a real table.   Apparently I did not have
> some exception in that procedure to handle the insert error. So when it
> crash, it caused the sqlldr failed and since there is no handle, so it
> generated a Dr. Waston error on screen.  I want to know is there an
> error handling by sql loader? ( I know I can handle the exception inside
> the sql procedure) but what if I still miss somthing.  Thanks

> C Chang

--
 -----------------------------
* http://pipers.hypermart.net *
 -----------------------------

 
 
 

How sql loader handle the error throw back from DB?

Post by C Chan » Wed, 01 May 2002 13:20:45



> What do you mean by "crash"?  What crashed?  How?  Is sqlldr loading the
> data fine into you view (insert errors should be caught by your sqlldr
> error log file), then there are problems when the trigger pops the data
> into the table? (btw, are you using an "instead of" trigger?). If that's
> the case, have you coded an exception handler into the trigger itself to
> catch and/or redirect errors?
> Or is there something else involved with your loading process?


> > I have an batch file using the sqlldr to insert raw data into a view,
> > which triggers an insert into a real table.   Apparently I did not have
> > some exception in that procedure to handle the insert error. So when it
> > crash, it caused the sqlldr failed and since there is no handle, so it
> > generated a Dr. Waston error on screen.  I want to know is there an
> > error handling by sql loader? ( I know I can handle the exception inside
> > the sql procedure) but what if I still miss somthing.  Thanks

> > C Chang

> --
>  -----------------------------
> * http://pipers.hypermart.net *
>  -----------------------------

Bricklen:
   Thanks for your answer.  As I said, there is no exception in the
Trigger where an insert of extra long string casued the error.  Since
there is no handler, so the trigger failed and subsequently SQLLDR did
not finish and there was nothing in sqlldr error file.  HOwever, my
question is whether there is any process in sqlldr to handle this, even
there is an exception in PL/SQL. Just in case. So I will not get a Dr.
Waston error for DOS mode.

C Chang

 
 
 

How sql loader handle the error throw back from DB?

Post by Bricklen Anderso » Thu, 02 May 2002 01:37:30


Hmmm... Not sure why sqlloader would cause a Dr. Watson error on that,
assuming that a bad row is a bad row and would be logged in the error
file. Have you coded in a nice exception handler into the view yet? I
would think that between the two (sqlldr and exception trap) you could
handle pretty much anything thrown your way.  Obviously I'm not seeing
something here, probably something obvious.  ;-)

Bricklen



> > What do you mean by "crash"?  What crashed?  How?  Is sqlldr loading the
> > data fine into you view (insert errors should be caught by your sqlldr
> > error log file), then there are problems when the trigger pops the data
> > into the table? (btw, are you using an "instead of" trigger?). If that's
> > the case, have you coded an exception handler into the trigger itself to
> > catch and/or redirect errors?
> > Or is there something else involved with your loading process?


> > > I have an batch file using the sqlldr to insert raw data into a view,
> > > which triggers an insert into a real table.   Apparently I did not have
> > > some exception in that procedure to handle the insert error. So when it
> > > crash, it caused the sqlldr failed and since there is no handle, so it
> > > generated a Dr. Waston error on screen.  I want to know is there an
> > > error handling by sql loader? ( I know I can handle the exception inside
> > > the sql procedure) but what if I still miss somthing.  Thanks

> > > C Chang

> > --
> >  -----------------------------
> > * http://pipers.hypermart.net *
> >  -----------------------------
> Bricklen:
>    Thanks for your answer.  As I said, there is no exception in the
> Trigger where an insert of extra long string casued the error.  Since
> there is no handler, so the trigger failed and subsequently SQLLDR did
> not finish and there was nothing in sqlldr error file.  HOwever, my
> question is whether there is any process in sqlldr to handle this, even
> there is an exception in PL/SQL. Just in case. So I will not get a Dr.
> Waston error for DOS mode.

> C Chang

--

 -----------------------------
* http://pipers.hypermart.net *
 -----------------------------

 
 
 

How sql loader handle the error throw back from DB?

Post by Bricklen Anderso » Thu, 02 May 2002 01:45:10


that should read "... coded a nice exception handler into the
TRIGGER..."


> Hmmm... Not sure why sqlloader would cause a Dr. Watson error on that,
> assuming that a bad row is a bad row and would be logged in the error
> file. Have you coded in a nice exception handler into the view yet? I
> would think that between the two (sqlldr and exception trap) you could
> handle pretty much anything thrown your way.  Obviously I'm not seeing
> something here, probably something obvious.  ;-)

> Bricklen



> > > What do you mean by "crash"?  What crashed?  How?  Is sqlldr loading the
> > > data fine into you view (insert errors should be caught by your sqlldr
> > > error log file), then there are problems when the trigger pops the data
> > > into the table? (btw, are you using an "instead of" trigger?). If that's
> > > the case, have you coded an exception handler into the trigger itself to
> > > catch and/or redirect errors?
> > > Or is there something else involved with your loading process?


> > > > I have an batch file using the sqlldr to insert raw data into a view,
> > > > which triggers an insert into a real table.   Apparently I did not have
> > > > some exception in that procedure to handle the insert error. So when it
> > > > crash, it caused the sqlldr failed and since there is no handle, so it
> > > > generated a Dr. Waston error on screen.  I want to know is there an
> > > > error handling by sql loader? ( I know I can handle the exception inside
> > > > the sql procedure) but what if I still miss somthing.  Thanks

> > > > C Chang

> > > --
> > >  -----------------------------
> > > * http://pipers.hypermart.net *
> > >  -----------------------------
> > Bricklen:
> >    Thanks for your answer.  As I said, there is no exception in the
> > Trigger where an insert of extra long string casued the error.  Since
> > there is no handler, so the trigger failed and subsequently SQLLDR did
> > not finish and there was nothing in sqlldr error file.  HOwever, my
> > question is whether there is any process in sqlldr to handle this, even
> > there is an exception in PL/SQL. Just in case. So I will not get a Dr.
> > Waston error for DOS mode.

> > C Chang

> --

>  -----------------------------
> * http://pipers.hypermart.net *
>  -----------------------------

--

 -----------------------------
* http://pipers.hypermart.net *
 -----------------------------

 
 
 

1. Errors thrown by CONVERT not being handled.

Problem domain:

I have a stored procedure which does data scrubbing and validation
before inserting/updating a table.

I want to be able to report unrecoverable errors or inconsistancies in
the data so I pretty much cast and check every single field.

An example of what this SP is doing would be

CREATE PROC spFoobar (



)
AS








  BEGIN
    EXEC spErrorHandler



int'
    RETURN(0)
  END


    SELECT sProductGroupID  = NULL




  BEGIN
    EXEC spErrorHandler



datetime'
    RETURN(0)
  END

EXEC spInsertUpdate_ProductGroup



RETURN(0)

Problem:

If either of the CONVERT functions fail, the whole procedure stops

and act appropriately.

2. web communities on database-servers

3. SQL Loader error: SQL*Loader-282

4. Trying to automate the 'Auto-Enter, Calculate Field"

5. Error Trying to connect to DB threw a dsn on Client computer

6. HELP: looking for statistical information of DWH vendors!

7. Oracle SQL*Loader Duplicate record handling.

8. Need help with this error when running a custom stored procedure

9. Help to back up SQL DB to Access2000 DB

10. Error handling under SQL 6.5 and SQL 7.0, @@error doesn't work

11. Scripting User Defined Function using SQL-DMO throws an error

12. Error connecting SQL Database throw Enterprise Manager