There are several ways to do this. I guess it really depends on how you want to approach the problem.
If it can be done outside of the database with cron as the scheduler:
-Perl is a great tool for this
-So is java
-write a tiny script that logs on, executes a query, and exits. Redirect the output to a file. ie
test.sql
select count(*) Num_Sessions from v$session;
exit
Setup cron to fire this off:
sqlplus uname/password@db @test.sql >test.txt
You can use tail and head to chop off the server info.
If you want this done in the database with dbms_jobs, you can use utl_file. (
http://oradoc.photo.net/ora817/DOC/a...ile.htm#998101)
These are just a few ideas.
--Brice