Generate network graph from command line

I recently wrote on gnuplot, today I tried another command line utility to generate graphs, graphviz, version 2.24.0 on AIX5L.

Pretty straightforward syntax :
echo "digraph Emp {"
sqlplus -s -L scott/tiger << EOF set pages 0 lin 120 hea off feed off select ename ||'->'||
(select ename from emp where empno=e.mgr) || ';'
from emp e where mgr is not null;
echo "}"
)| neato -Tpng | uuencode Emp.png | mailx

(or neato -Tpng -o Emp.png to save locally, or -Tps|lp, etc…)

By Laurent Schneider

Oracle Certified Master

1 comment

  1. That takes me back — I used graphviz in a very similar way to plot the flow of control on DBMS_Scheduler chains before this ability was built into SQL Developer v3. It looked prettier than SQL Developer too.

Leave a comment

Your email address will not be published.