The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Call sqlplus in the shell script beaniebear Shell Programming and Scripting 3 05-13-2008 09:30 AM
help me in sending parameters from sqlplus script to unix shell script Hara Shell Programming and Scripting 2 01-29-2008 03:31 PM
sqlplus and dbms_output.put_line in shell script stuck1 Shell Programming and Scripting 6 12-20-2007 11:40 AM
Shell Script And SQLPLUS maco_home UNIX for Dummies Questions & Answers 6 08-25-2007 12:05 PM
passing parameters from a shell script to sqlplus phani Shell Programming and Scripting 2 03-13-2005 08:41 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-19-2006
dkr123 dkr123 is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 5
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
  #2 (permalink)  
Old 07-19-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
Code:
host remsh yournodename "somecommand someparm1  someparm2"
man remsh
  #3 (permalink)  
Old 07-19-2006
dkr123 dkr123 is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 5
Is there any other way apart from rsh/remsh.. rsh is blocked. When I do it says permission denied.

Thanks,
  #4 (permalink)  
Old 07-19-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
What are you trying to do? (rather than fixing how you are currently doing it)
  #5 (permalink)  
Old 07-19-2006
dkr123 dkr123 is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 5
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.
  #6 (permalink)  
Old 07-20-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
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"
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:21 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0