Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

how can I execute shell command from sqlplus

447396Aug 1 2007 — edited Aug 1 2007
Hi,

Can you please give me an way out how the command below can be executed :

SQL> begin
2 !(k=`expr $k-1`);
3 end;
4 /
!(k=`expr $k-1`);
*
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00103: Encountered the symbol "!" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
<an alternatively-quoted SQL string>

With out a begin-end block it is working :
SQL> !k=2

SQL> !(k=`expr $k-1`)

SQL> !(echo $k)

Unix version :
HP-UX hwhpx013 B.11.23 U ia64 1189652653

Regards,
Koushik

Comments

Cortanamo

Apparently documentation mentions ORDS_METADATA schema. I suppose that exporting it from one to the other instance should be sufficient, plus maybe enabling ORDS for schemas and tables that should be accessable to ORDS. But this looks like a bit of a workaround. Is there really nothing better?

there's 2 pieces, ORDS, and the Services.

ORDS can be moved by simply packing up the WAR file and moving to the new location, or just re-installing it.

The services are defined in the REST-enabled schema.

You can export the modules to PL/SQL scripts, which can then be ran in your new environment.

I'd recommend you Source Control these scripts, so you can track changes, and easily build deployment/upgrade packages.

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 29 2007
Added on Aug 1 2007
14 comments
672 views