Nitish, you never said
where you at first set the
LD_LIBRARY_PATH and ORACLE_HOME environment variables. It sounds like
you did not have them set anywhere that the AOLserver user could see
on startup, and that you then fixed that by putting them into your
nsd-oracle script. That's fine, problem solved.
But even better would be to put those settings in a system-wide shell
script and then source it as needed. For more info, see my
8i install notes
and search forward for the "Oracle environment variables:" section.
Similar info is also here in the Forums, for Oracle in
Dec. 2002,
and for PostgreSQL in
Sept. 2003.