select (a.id + 1)
from tab_name a
where not exists
(select 1
from tab_name b
where b.id = (a.id + 1))
and a.id not in
(select max(c.id)
from tab_namec)
order by 1
root.sh script performs many things, namely
It changes or correctly sets the environment variables
copying of few files into /usr/local/bin , the files are dbhome,oraenv,coraenv etc.
creation of /etc/oratab file or adding database home and SID's entry into /etc/oratab file.
root.sh script is located in $ORACLE_HOME directory.