'ssh' to the server and run the SQLPlus to send output to text file

I am having issue with database administration team to turn on listener for a particular database to display data in my perl application. So alternatively i would like to connect to the database wth perl through  'ssh' to the server and run the SQLPlus and run couple of queriees and send the the output back to the text file. The perl application uses the same query. How can i achieve this. Any resources, links, ideas highly appreciated. thanks in advance
LVL 7
gudii9Asked:
Who is Participating?
 
tangchunfengCommented:
use crontab to schedule a  job such as hourly job to run sqlplus commands and output to a file
crontab is available on unix,linux
0
 
tangchunfengCommented:
crontab + sqlplus -> output file -> perl + ftp
0
 
gudii9Author Commented:
what is 'crontab' you are referring.

>>crontab + sqlplus -> output file -> perl + ftp

can you please elaborate on this, I am not clear on this


 Please advise
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
gudii9Author Commented:
can you please provide me the sample code, links, resources of the crontab to do that job. Does it SSH also automatically. Or after SSH we have to run the cronjob. please advise
0
 
gudii9Author Commented:
is CRON job is same as crontab. Are they different please advise
0
 
DavidSenior Oracle Database AdministratorCommented:
krontab is the program used to list and/or edit the attributes that are scheduled for the cron daemon to execute -- batch job syntax, if you will.  See http://www.pantz.org/software/cron/croninfo.html for a comparison.

OTOH, ssh is a secure shell executable that connects a local client (PC) to a host server.  It is fairly complex, with one tutorial found at http://support.suso.com/supki/SSH_Tutorial_for_Linux.

You say you want the output sent "back to the text file" without any prior comment about the text file.  I'm confused.  Commonly one might SPOOL the SQL output to a local file, local being whichever place the SQL*Plus session is run from.  In your scenerio, the local SQL session is on the host user account.  Perhaps your intent instead is to execute SQL*Plus on your client PC, connecting to a remote database instance, and to have the output spooled to your local PC?

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.