LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-06-2006, 11:48 PM   #1
ancys
LQ Newbie
 
Registered: Jul 2006
Posts: 28

Rep: Reputation: Disabled
Regarding log file


hi all

I am calling a procedure within script.Even if the prcoedure is not executed successfully. In log file it is recorded as procedure successfully executed .How to capture errors in log file if the procedure is not executed in unix script

$SQP $clf_user_name/$clf_password@$db_server <<EOF> file_out_before.log
exec BatchImportCursor('$criteriano','$filename')

commit;

EOF

but when i execute procedure in backend it gives me an error invalid sql statemetns or numeric or value error.These error has to be recorded in log file.Any errors in database is not geting recorded in log file.How to record databse errors.


Help please

Last edited by ancys; 09-07-2006 at 05:12 AM.
 
Old 09-07-2006, 05:34 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by ancys
$SQP $clf_user_name/$clf_password@$db_server <<EOF> file_out_before.log
Code:
 $SQP $clf_user_name/$clf_password@$db_server <<EOF> file_out_before.log 2>&1
Try that.


Cheers,
Tink
 
Old 09-07-2006, 10:31 PM   #3
ancys
LQ Newbie
 
Registered: Jul 2006
Posts: 28

Original Poster
Rep: Reputation: Disabled
hi
the above code mentioned does not capture the details in log file
my procedure is like
CREATE OR REPLACE PROCEDURE BatchImportCursor(CRITERIA_NUMBER VARCHAR2 , FILE_NAME VARCHAR2) IS
begin
:
:
exception when others
:
:
end


should i need to place wheneve sqlerror exit 1 like those of codings in script.How to capture oracle errors in script
 
Old 09-08-2006, 03:00 AM   #4
ancys
LQ Newbie
 
Registered: Jul 2006
Posts: 28

Original Poster
Rep: Reputation: Disabled
hi
The above statement worked by setting the serveroutput on.

Thanks
 
Old 09-08-2006, 03:03 AM   #5
ancys
LQ Newbie
 
Registered: Jul 2006
Posts: 28

Original Poster
Rep: Reputation: Disabled
but when i try to load text file into database using sqlloaer

sqlldr username/password@db control=control.ctl log=error.log


if i give table name wrong in control file TAble does not exists does error msg not getting recorded how to solve it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
any ideas to reduce log file size or make log file size managed? George2 Programming 2 08-13-2006 06:55 AM
Opennms Logs - where are web.log, web_rtc.log and webauth.log referenced? not_much_of_a_guru Linux - Networking 0 07-12-2006 10:28 AM
How to control log file size in /var/log? yan Linux - General 2 10-13-2003 05:00 PM
what log file generator that support squid log? heero82 Linux - Software 2 07-11-2003 08:52 PM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 08:38 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration