This isn't really related to privileges. If the source query of an export doesn't work, the export is aborted and the error message is displayed.
Do do you suggest to write the error message into the export file rather than not creating the export file?
I have never seen a tool do that.
If you run a batch of statements, you should investigate the logfile afterwards.
You might want to run SQL Workbench using -abortOnError=true so that the whole script terminates, if an error occurs instead of continuing with the next statement.
You can then check the exit code of SQL Workbench and take appropriate action in case of an error (e.g. send an email).
Regards
Thomas
Darshak schrieb am 06.02.2023 um 09:24:
> Hi,
>
> *e.g. *
> *User does not have privilege to query catalog tables/ views in Oracle.*
> WbExport -type=xlsx
> -file=$[fileName]
> -append=true
> -trimCharData=true
> -SheetName="ORA_TSP_$[DATE]"
> -header=true
> -autoColWidth=true;
> SELECT *
> *FROM DBA_tablespaces*
> ORDER BY TABLESPACE_NAME;
>
> unfortunately, I can not attach log file .
>
> my point is when user does not have *privilege *then error should also be captured in generated file otherwise while running lots of queries from cmdline (batch file) may not notice error at all unless check logfile.
>
> Regards,
> Darshak
>
>
>
> On Wednesday, 1 February, 2023 at 1:24:43 pm UTC+5:30 Thomas Kellerer wrote:
>
> Hmm, SQL Workbench doesn't really use DBA_ views in Oracle. It either uses the ALL_ or USER_ variant.
> And I wouldn't expect a failure to use those, to abort the export.
>
> Can you send me the original export query and the log file with the errors?
>
>
> Regards
> Thomas
>
>
> Darshak schrieb am 31.01.2023 um 06:19:
> > Hi,
> >
> > SQL failure during wbExport is not being captured in generated files.
> > And it may not be noticed while running multiple SQLs from cmdline
> > e.g. in Oracle , wbExport query failed due to missing privileges to access DBA_ views
> >
> > Error is captured in log file.
> >
> > Is there way to capture error in generated file also while running using wbExport ?
> >
> > Regards,
> > Darshak
>
> --
> You received this message because you are subscribed to the Google Groups "SQL Workbench/J - DBMS independent SQL tool" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
sql-workbenc...@googlegroups.com <mailto:
sql-workbenc...@googlegroups.com>.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/sql-workbench/dc1e038a-21cc-4297-b6a3-65916a6b02f5n%40googlegroups.com <
https://groups.google.com/d/msgid/sql-workbench/dc1e038a-21cc-4297-b6a3-65916a6b02f5n%40googlegroups.com?utm_medium=email&utm_source=footer>.