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 > How to log an sql statement

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-05-04, 05:15
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
How to log an sql statement

Dear All,

I am testing on migration from one database to other. I have a file which contains all the database changes (insert/update/delete) that need to be run.
Is there anyway i can log all these statements in to a file. When i run this file and if any of these statement fails i can come to know where the error occured. Thanks in advance.

Regards,

lloyd
Reply With Quote
  #2 (permalink)  
Old 08-05-04, 16:48
artemka artemka is offline
Registered User
 
Join Date: May 2004
Location: New York
Posts: 248
dbaccess "dbname" filename.sql 2>/yourdir/filename

will record the errors

2 means error output
Reply With Quote
  #3 (permalink)  
Old 08-05-04, 23:39
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Hi,

Thanks for your feedback.
Reply With Quote
  #4 (permalink)  
Old 08-07-04, 12:41
bull_abraham bull_abraham is offline
Registered User
 
Join Date: Feb 2004
Posts: 32
dbaccess -e <database name> <file.sql> 1>> < log file> 2>> < log file>

-Abraham
Reply With Quote
  #5 (permalink)  
Old 08-08-04, 23:53
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Hi Abraham,

Thanks for the query...
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