Daily Oracle

short Oracle take-away tips that you can put to use in under an hour.

Friday, August 20, 2004

Exception Handling

Picked this up from asktom.oracle.com (http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1932043078402)

exceptions should be caught IF and ONLY IF you

a) expect them
b) can do something about them

eg: when no_data_found -- catch it, deal with it.

other exceptions that you cannot possibly recover from should not be caught and
the job queues will absolutely record the line number and everything exactly
right in the alert log.



Links

How to Code - according to Tom

excerpt from Ask Tom (http://asktom.oracle.com/pls/ask/f?p=4950:8:::NO::F4950_P8_DISPLAYID:8145042756282)


o write as little as you can
o only use packages
o use static sql
o bulk processing
o how to return data to the client
o using %type/rowtype
o properly using authid current user
o how to lookup data correctly
o properly using autonomous transactions
o implicit/explicit cursors

The only coding style thing I have in there is "make the darn procedures fit on
a screen, If I have to page up and down to read a subroutine, it is too long"

Links

Thursday, August 19, 2004

Tuning Resource on the Web

Came across this www.hotsos.com , a tuning resource on the web.
 
Recommended by Tom Kyte (of asktom.oracle.com)
 
Plenty of downloadable documents.
 

Links