Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Database Administration >> Tracking errors

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: Tracking errors
 vidhu  Posted: May 07, 2008 03:08:34 AM

 Total Post: 7
 Joined: Apr, 2008






 Suppose my procedure is having 100 select statements and among them one select statement is creating error how to get which line of select statement is having error.with out using dbms_output.put_line.

 Mohammed Taj
Posted: May 07, 2008 03:21:29 AM  

 Total Post: 634
 Joined: Jul, 2007






 
When you compile that procedure that time error message with line display.


 vidhu
Posted: May 07, 2008 03:42:10 AM  

 Total Post: 7
 Joined: Apr, 2008






 
Thank U Taj for ur instant reply.

But my problem is not while compileing the proc.This proc compiled without any error but at runtime due to some data problem a particular select statement is failed how to track which one is failed.


 http://sharear.blogspot.com
Posted: May 07, 2008 05:29:51 AM  

 Total Post: 48
 Joined: Apr, 2008






 
please attach the full error message.

 Murtuja
Posted: May 07, 2008 07:32:57 AM  

 Total Post: 588
 Joined: Jan, 2006






 
You are facing logical error in your procedure so you need to put lot of dbms_output staments in your procedure and start debugging.

 Murtuja
Posted: May 08, 2008 02:47:26 AM  

 Total Post: 588
 Joined: Jan, 2006






 
Hi,

Do you have any updates regarding this issue ?



 vidhu
Posted: May 08, 2008 05:25:09 AM  

 Total Post: 7
 Joined: Apr, 2008






 
Hi Murtuja,

Actually this question is an interview question.

Even i said the same answer i will be putting Dbms_output.Put_line and track the error but the interviewer said,that proc will be having 100 select statements its not best way to use dbms_output on each line he needs a much better and easy way of identifying the statement.

Thanks for ur interest.



 Murtuja
Posted: May 08, 2008 05:59:31 AM  

 Total Post: 588
 Joined: Jan, 2006






 
Hi,

When select statement failed to fetch any records then "when_no_data_found" exception is raised and you can catch it.

Just a thought.

 vidhu
Posted: May 08, 2008 06:19:55 AM  

 Total Post: 7
 Joined: Apr, 2008






 
Ya i agree but even that also will not give from which select statement control moves to the exception.

Even i said this....

I said all the possibilities which i know even after that also that interviewer was not satisfied.

Thats why i am asking any possibilities are there to arrive this.

Thanks



 Murtuja
Posted: May 08, 2008 06:31:49 AM  

 Total Post: 588
 Joined: Jan, 2006






 
It's a really difficult question !!!

Suppose we use exit statement randomly and find out where is the problem

First Put exit statement in the middle of procedure and execute it...If no error then we are confirm that there is no error in the first part of procedure

Then put exit somewhere in the second part..that's how we can come to nearby problematic select statement.


 vidhu
Posted: May 08, 2008 06:34:35 AM  

 Total Post: 7
 Joined: Apr, 2008






 
May be the way how u said....

Anyhow thanks for ur interest in answering.

If u find any best way for this just give an update...



 Murtuja
Posted: May 08, 2008 07:17:49 AM  

 Total Post: 588
 Joined: Jan, 2006






 
Hi,

Exceptions Handling only can be answer to this question.It's good practise to put lot of EXCEPTION section in a code.

Read this link

http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/errors.htm#i7014

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Mohammed Taj634
  Murtuja Khokhar588
  Jayanta Sur479
  Vigyan Kaushik385
  Ramesh Jois226
  neeraj sharma189
  snehalatha p166
  Gitesh Trivedi157
  Gopu Gopi149
  Kushal ratnaker136






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software