Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: strange sqlplus problem w/ Oracle 7.3.4
Sasha Ostojic (sasha_at_UltimateTech.com) wrote:
: I do the following:
: $ sqlplus user/pass
: SQL> SPOOL $DBPATH/sql/output/tables.lst
: and I immediately get "Segmentation violation(coredump)".
: $DBPATH is an environment variable that is defined, and points to a
: directory that exists.
: Has anybody seen this before? What's going on?
SQL*Plus doesn't evaluate environment variables like this, so you are trying to open a file literally called '$DBPATH/....'.
What confuses people is things like
sqlplus user/pass << EOF
SPOOL $DBPATH/....
EOF
works. However this is because the shell is evaluating the variable
before SQL*Plus sees it, and so SQL*Plus actually sees the full pathname.
The SIGSEGV is a bug (IMHO) - bad error trapping in the SQL*Plus program; I assume the code isn't testing the result of the fopen() [ or open() - I haven't bother to trace this ] and is blindly writing to an unopened file descriptor. I've seen this once before but didn't think it worth raising a TAR over :-)
--
rgds
Stephen
Received on Sat Jan 09 1999 - 12:33:04 CST
![]() |
![]() |