Home » Infrastructure » Unix » Calling EXECUTE command from UNIX script
Calling EXECUTE command from UNIX script [message #97365] Thu, 28 March 2002 01:49 Go to next message
Mick Wall
Messages: 2
Registered: March 2002
Junior Member
Here is my unix script
#!/bin/sh
sqlplus cfs/cfs << EOF

set echo on
spool log/p16_anal_schema.log
EXECUTE dbms_utility.analyze_schema('CFS','COMPUTE');

EOF

the problem is that the sqlplus sessions just sits there until i type quit... then the execute starts.

but if i replace the EXECUTE line with say DESC tablename then the unix script runs, does the command and then exits as i would expect.

anybody and ideas?

Cheers

Mick
Re: Calling EXECUTE command from UNIX script [message #97368 is a reply to message #97365] Thu, 28 March 2002 10:49 Go to previous messageGo to next message
Melissa
Messages: 65
Registered: January 2000
Member
You need to place "quit" before your EOF in your script.

#!/bin/sh
sqlplus cfs/cfs << EOF
set echo on
spool log/p16_anal_schema.log
EXECUTE dbms_utility.analyze_schema('CFS','COMPUTE');
quit
EOF
Re: Calling EXECUTE command from UNIX script [message #97429 is a reply to message #97365] Sat, 04 May 2002 07:08 Go to previous message
shiva prakash
Messages: 2
Registered: May 2002
Junior Member
Hi Mick,

you can try,

echo "set echo on
spool log/p16_anal_schema.log
EXECUTE dbms_utility.analyze_schema('CFS','COMPUTE');" &#124sqlplus cfs/cfs

It won't wait for you to type quit.
Previous Topic: Re: Problem with Oracle installation on Linux
Next Topic: Re: Installing Oracle 8i for Redhat Linux 6x on Redhat Linux 7.1
Goto Forum:
  


Current Time: Tue Apr 23 05:23:29 CDT 2024