If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Logging SQL Statements

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-15-04, 06:10
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Logging SQL Statements

Dear All,

I have a script which calls another file which contains a list of insert statements to be loaded into the database.

dbaccess test /export/home/user1/emp 2> emp.log;
dbaccess test /export/home/user1/dept 2> dept.log;
dbaccess test /export/home/user1/leave 2> leave.log;
dbaccess test /export/home/user1/sal 2> sal.log;

The output is written to respective log files, which tells me 1 row inserted for each sql statement. If there is an error in a file and if there are 100 records it becomes difficult to track where the error occured. Is there a way i can log the actual insert clause into a file & if there is an error in that statement i can find out. Thanks in advance.

Regards,

lloyd
Reply With Quote
  #2 (permalink)  
Old 09-15-04, 11:15
fprose fprose is offline
Registered User
 
Join Date: Apr 2003
Location: Phoenix, AZ
Posts: 177
dbaccess -e dbname input.sql 1> output.log 2>&1

Will list the sql and any errors in proper order.
__________________
Fred Prose
Reply With Quote
  #3 (permalink)  
Old 09-15-04, 23:52
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Hi Fred,

Thanks a lot for the syntax.

Regards,

Lloyd
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On