Skip to content
August 15, 2016 / doganay

DBA_ERRORS HTML FORMATTING

select '<table border=1><tr><td>OWNER</td><td>NAME</td><td>ERROR</td></tr>' from dual
union all
select '<tr><td>'||owner||'</td><td>'||name||'</td><td>'||error||'</td></tr>'
from
(
select owner, name, LISTAGG(text, '<br>') WITHIN GROUP (order by sequence) ERROR
from dba_errors
group by owner,name
)
union all
select '</table>' from dual


Output:

OWNER NAME ERROR
MYOWNER1 MYSP1 PL/SQL: ORA-01775: looping chain of synonyms
PL/SQL: SQL Statement ignored
PL/SQL: ORA-00942: table or view does not exist
MYOWNER1 MYSP2 PL/SQL: ORA-01775: looping chain of synonyms
PL/SQL: SQL Statement ignored
PL/SQL: ORA-00942: table or view does not exist
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: