Re: How to Log errors while executing ingres sql command
- From: "Steve McElhinney" <stevem@xxxxxxx>
- Date: 20 Feb 2006 03:56:19 -0800
Ajay,
The sql UNIX command sends E_ errors to channel 1 (Standard output).
Try:
sql database_name < sql_file >> log_file 2>&1
Steve
Ajay Dalvi wrote:
Hi all,
I am using ingres sql command to execute the sql commands
(create/insert/delete),
While executing ingres 'sql' command, all the errors that raises gets
displayed on standard
output with error number in format E_<>.
On linux, I am executing this comand through shell script. I want to log
the errors which
raises by sql, I have tried this by following way:
sql database_name < sql_file 2>> log_file
But the errors are not getting logged in to specified log file.
Just for comparision, in postgres database, we can do this as
psql database_name -f sql_file 2>>log_file.
In this case , errors gets logged properly in specified log file.
So can any one please tell me how I can achieve the same behaviour in
ingres.
-Ajay
--
This message has been scanned for viruses and
dangerous content by Extenprise mailscanner, and is
believed to be clean.
--=-IaOMdECR87RpHGMGiew5
Content-Type: text/html; charset=utf-8
X-Google-AttachSize: 1474
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/1.1.8">
</HEAD>
<BODY>
<FONT SIZE="3"><TT>Hi all,<BR>
I am using ingres sql command to execute the sql commands<BR>
(create/insert/delete),<BR>
While executing ingres 'sql' command, all the errors that raises gets<BR>
displayed on standard<BR>
output with error number in format E_<>.<BR>
<BR>
On linux, I am executing this comand through shell script. I want to log<BR>
the errors which<BR>
raises by sql, I have tried this by following way:<BR>
<BR>
sql database_name < sql_file 2>> log_file<BR>
<BR>
But the errors are not getting logged in to specified log file.<BR>
<BR>
Just for comparision, in postgres database, we can do this as<BR>
<BR>
psql database_name -f sql_file 2>>log_file.<BR>
<BR>
In this case , errors gets logged properly in specified log file.<BR>
<BR>
So can any one please tell me how I can achieve the same behaviour in ingres.<BR>
<BR>
-Ajay</TT></FONT><BR>
<BR>
</BODY>
<br />--
<br />This message has been scanned for viruses and
<br />dangerous content by
<a href="http://www.extenprise.net/"><b>Extenprise mailscanner</b></a>, and is
<br />believed to be clean.
</HTML>
--=-IaOMdECR87RpHGMGiew5--
.
- References:
- [Info-ingres] How to Log errors while executing ingres sql command
- From: Ajay Dalvi
- [Info-ingres] How to Log errors while executing ingres sql command
- Prev by Date: Re: [Info-ingres] FW: [Users] How to Log errors while executing ingres sql command
- Next by Date: Re: [Info-ingres] Copydb command problem for taking bacup of the sequences
- Previous by thread: [Info-ingres] How to Log errors while executing ingres sql command
- Next by thread: [Info-ingres] FW: [Users] How to Log errors while executing ingres sql command
- Index(es):
Relevant Pages
|
Loading