running shell script from sqlplus

I have a script which connects to different database servers using sqlplus. Is there a way by which I can run a shell command on that host from sqlplus?

I know about 'host' command but it runs script on the local machine where the original script is running. Is there a way to run command on the remote host to which I am connection thru sqlplus.

Thanks

host remsh yournodename "somecommand someparm1  someparm2"

man remsh

Is there any other way apart from rsh/remsh.. rsh is blocked. When I do it says permission denied.

Thanks,

What are you trying to do? (rather than fixing how you are currently doing it)

I have a script that connects to different databases using sqlplus. It basically pulls rows from all the different servers and creates a repository in a single table on host machine.

Apart from pulling information from each database, I also want a script to get executed on the OS where the database reside.

Is this possible using sqlplus?

Thanks.

If rsh and remsh are "turned off" then, no. Not without privilege.

You do realize that you can access all of the remote Oracle servers without physically running your sql code on those servers. In other words, you can write a block of code on boxa, that runs on boxa, that accesses, in turn, all of the remote Oracle instances that you need to query. You never leave boxa, where you have to run your script.

Ask your DBA to set up tnsnames and make a few other other changes so you can do that. This is standard Oracle. You may already be able to do that now, so ask your DBA "how to"

Yes. That is what I'm doing in my script. But apart from running sql on different boxes I also want to run OS commands on different boxes.

Ok. Your original request wasn't clear to me.

Without remsh or rexec or whatever, you have to login to each box and run the shell command. You do know there are DBMS packages that do a lot things. What does your the script on each remote box do?

...and Oracle can be configured to execute external procedures from a PL/SQL procedure call. The calls can be made from sqlplus, Java, a windows GUI, etc.

...if you turn on a listener, and compile & link an external library.

The problem is what the shell script does.