?
Solved

Auto Generate Reports from Oracle DB

Posted on 2012-04-11
7
Medium Priority
?
545 Views
Last Modified: 2012-04-23
Is there a way I can auto generate reports to run a certain day of the week using a script? If so, how can I accomplish this and what reporting tool would be good to use to do this?
0
Comment
Question by:Talitha30
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37834394
As long as the reports are not overly complex, I suggest sqlplus.  It has some pretty powerful reporting capabilities.

Once you create the sqlplus script, you can schedule it with any scheduling tool your system has.

http://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_six.htm#i1081008
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 37834403
business objects will let you do it.

probably most reporting software could be invoked from a scheduler in some fashion.

or, if you're looking for a solution that is entirely within the database you could use a pl/sql procedure to generate your content and email the results as an attachment or inline, the procedure could then be scheduled via dbms_scheduler (10g and above) or dbms_job (9i and lower)

This article gives an example of how to send attachments including a sample that generates a simple csv report but the formatting could be as complex as you want.

http://www.experts-exchange.com/Database/Oracle/A_7749-How-to-send-email-attachments-with-Oracle.html
0
 

Author Comment

by:Talitha30
ID: 37834464
I have created the sql query for my reports in SQL Developer, is there a way to auto generate my report from this tool?
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 74

Expert Comment

by:sdstuber
ID: 37834492
no, sqldeveloper has no command line scripting options.


you can invoke scripts from within it,  but you can't script the invocation of sql developer itself.

however,  if you've written something that sql developer can execute, then you should be able to use sql*plus as slightwv suggested
0
 
LVL 5

Assisted Solution

by:Sanjeev Labh
Sanjeev Labh earned 1500 total points
ID: 37844150
For auto generating reports from an existing sql, the best approach would be by creating a procedure using the sql and write the output onto a file using utl_file in plsql.
For making this procedure run automatically after a definite interval submit a job for this procedure as per interval. Once each run accomplishes you can collect your report from the server where it has been written using UTL_FILE.
Any help regarding usage of UTL_FILE you can find it very easily on the net.
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 37844154
writing to with utl_file would create a report on the database server, not the client's machine.
0
 
LVL 5

Accepted Solution

by:
Sanjeev Labh earned 1500 total points
ID: 37844881
surely on the server. But if has to be run automatically it has to be run through a job, can't be run through client. Hence writing through utl_file on the server. Once written it can easily be downloaded. I do not see any mention by Talitha that it is to be accomplished by client only. Query regarding if SQL developer can auto generate the report then I think it is not possible to auto generate the report running through SQL developer client. Though it can generate report manual while running the query and saving the output in different formats. But this cannot be automated.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question