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

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

  2. #2
    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

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

    Thanks a lot for the syntax.

    Regards,

    Lloyd

Posting Permissions

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