Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Location
    India
    Posts
    262

    Unanswered: 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

  2. #2
    Join Date
    May 2004
    Location
    New York
    Posts
    248
    dbaccess "dbname" filename.sql 2>/yourdir/filename

    will record the errors

    2 means error output

  3. #3
    Join Date
    Aug 2003
    Location
    India
    Posts
    262
    Hi,

    Thanks for your feedback.

  4. #4
    Join Date
    Feb 2004
    Posts
    32
    dbaccess -e <database name> <file.sql> 1>> < log file> 2>> < log file>

    -Abraham

  5. #5
    Join Date
    Aug 2003
    Location
    India
    Posts
    262
    Hi Abraham,

    Thanks for the query...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •