Possible to automate/schedule sql developer query?

Semidevil

Diamond Member
Apr 26, 2002
3,017
0
76
im trying to automate some of my tasks and one of the objective is to run a sql developer query and export the result. I'm using the spool function so as soon as I run it, it will automatically export, but is there a way for sql dev to automatically run the sql query on a weekly basis( in the background)?
 

Semidevil

Diamond Member
Apr 26, 2002
3,017
0
76
Thanks. If I'm correct, I believe the two options are for sql server? I'm stuck with oracle sql developer.

I did manage to connect to sqlplus, which is the command line equivalent. However, my query is rather large with lots of variables and pivots, so it won't accept my variable which is more than 240 characters long.

I'm looking to see if the built-in dbms_scheduler can help, but so far I don't see an option for it to automatically run a query, only stored procedures(. I'm not familiar or know how stored procedures work)
 
Jun 18, 2000
11,140
722
126
You can wrap your query in a procedure. Then use package utl_file in your proc to write the resultset to disk.

I'm not sure what you're passing to sqlplus but you can give it a sql file with your query. And pass variables as command line parms.
 

Broheim

Diamond Member
Feb 17, 2011
4,592
2
81
..SSIS...

THE POWER OF CHRIST COMPELS YOU!!

*furiously douses the whole room in holy water*

Debugging SSIS is a nightmare. We've used it for integrations on some of our older projects and have had terrible experiences.
 

HumblePie

Lifer
Oct 30, 2000
14,667
440
126
THE POWER OF CHRIST COMPELS YOU!!

*furiously douses the whole room in holy water*

Debugging SSIS is a nightmare. We've used it for integrations on some of our older projects and have had terrible experiences.

Old SSIS is a PITA, especially as most of it is never written by actual developers. Usually it's a DBA reading something another DBA did and copying it over as they can. SSIS code rarely follows code programming practices.

That being said, SSIS can be written and done very well especially if using current generation SSIS with visual studio.

Just don't go the other way and be a bad programmer writing SSIS. Sql still mostly uses "set" logic based structures and not standard programming structures for data flow. Seen more than a few software coders get screwed up on this aspect of SQL and either just throw it away or screw up with SQL.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |