'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
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

crontab + sqlplus -> output file -> perl + ftp
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
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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
gudii9Author Commented:
is CRON job is same as crontab. Are they different please advise
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?

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.