Re: How to Log errors while executing ingres sql command



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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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_&lt;&gt;.<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql database_name &lt; sql_file&nbsp;&nbsp; 2&gt;&gt; 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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;psql database_name -f&nbsp; sql_file 2&gt;&gt;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--

.



Relevant Pages

  • Re: COBOL stored procedure for DB2
    ... Regarding how you precompile the app, you must specify target mfcob to db2 prep, rather than target ibmcob. ... Have you also confirmed that, prior to executing the CALL statement, the host variables specified within the client app have the appropriate values? ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)
  • Re: COBOL stored procedure for DB2
    ... Have you also confirmed that, prior to executing the CALL statement, the ... The DB2 CREATE PROCEDURE statement. ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)
  • [Info-ingres] RE: [Users] How to Log errors while executing ingres sql command
    ... Check out the archives at info ingres. ... How to Log errors while executing ingres sql ... the output of the sql command will be in ...
    (comp.databases.ingres)
  • Re: Writing update back to MSAccess table?
    ... (with the exception of maybe a using statement on the command, ... value of 'remainreward' successfully, executing this SQL ... The SQL being executed to update this row when the application closes ...
    (microsoft.public.dotnet.languages.csharp)
  • EXEC(sqlstatement) Resultset usage
    ... How do I, from within the same stored procedure, use the result of a sql ... statement after executing it using the EXECcommand? ...
    (microsoft.public.sqlserver.programming)

Loading