Re: Generated data file contains error messages !!!




"Laura" <lgm@xxxxxx> wrote in message
news:1127479376.522647.119070@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi:
> I have a process that generates a datafile whith a query executed from
> sqlplus:
>
> sqlplus .... << eof > my_data_file
> set ...
> set ..
> select ...
> eof
>
> The problem is that when an oracle error happens, the error message is
> included inside de data file.
> How could I do for obtain de error message in a separated file?
>
SQL*Plus is very simple-minded, so there's not direct way to do it (unless
I'm missing a relatively new feature)

1) use grep, awk and/or other *NIX utilties to post-process the output

2) (more complex) write a PL/SQL procedure that traps errors and either use
UTL_FILE to write to output and errors to different files, or use package
variables (likely PL/SQL tables) to buffer errors, interspersing SQL*Plus
SPOOL commands with calls to your package that output via DBMS_SQL

++ mcs


.



Relevant Pages

  • Re: ORA-03117 resulting from package procedure parameter record types
    ... I am at a client who has recently migrated from Oracle 7.3.4 to Oracle ... number of the package procedures, ... procedure proc1 is ... bind variables fails with the oracle error message "ORA-03117: ...
    (comp.databases.oracle.misc)
  • Re: Package Load Failure
    ... > After some days working fine, I am getting an error message when I try to ... > load my device application project. ... > "Package Load Failure ... > Package 'Smart Device Project Package' has failed to load properly (GUID ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Thoughts about finding viruses in email inboxes
    ... The key I used was the one from the error message. ... I would expect the gpg key for package verification to ... The problem was/is being able to authenticate the d/l server. ...
    (Ubuntu)
  • Re: Thoughts about finding viruses in email inboxes
    ... The key I used was the one from the error message. ... I would expect the gpg key for package verification to ... The problem was/is being able to authenticate the d/l server. ...
    (Ubuntu)
  • Re: Windows NT Service Pack 6.0 is required
    ... I have made a package via the packaging wizard from office XP developer ... This setup program runs in one computer but gives the error message as is ... requires Windows NT 4.0 Service Pack 6 or later. ... Tony Toews, Microsoft Access MVP ...
    (microsoft.public.access.developers.toolkitode)