PL/SQL is also a language, and background development is often used.
At present to do to a function, about the "report task scheduling", said to understand is to do a few reports, daily statistics of new data, used in the PC page display, I have been pondering over a few days, summed up three kinds of programs.
Development environment: Ssm+oracle (spring,spring mvc,mybatis + Oracle).
1, in PL/SQL, each report develops a corresponding storage process, each stored procedure creates a new dbms_job, and executes according to the relevant requirements.
2, in PL/SQL, each report develops a corresponding storage process, create a new "report information table" to save the stored procedure information, and then create a new additional stored procedure "Report task scheduling process", in this stored procedure calls the report corresponding stored procedure, Periodically call the stored Procedure "report task scheduling process" Through Spring's timed task (quartz).
Note: in stored procedure = =, the report Task Scheduler process calls the report stored procedure as follows
V_command: = ' BEGIN ' | | V_rpt_pro | | '; END; '; ( assuming already declared v_command VARCHAR2); )
EXECUTE IMMEDIATE V_command
USING in-param1, out- v_param2, out -v_param1, out-v_param2; --The parameter type and delivery order must be consistent with the stored procedure
3, in PL/SQL, a new package,package bady inside the development report corresponding to the storage process, loaded into main inside, a new dbms_job, scheduled to execute the JOB.
Analysis:
The first scenario is easier to understand, but more cumbersome and not well maintained.
The second scenario, the process is: Spring calls the report task scheduling process, the report task scheduling process calls the report's stored procedure, so that you do not have to create a new dbms_job, but also based on the parameters passed in to determine when to invoke which report stored procedures, As long as you modify the spring configuration, you can modify common business, ease of management, function and business is also good to expand and maintain.
The third scenario, the use of packages and unified management of stored procedures, but also better maintenance and expansion, and only need to create a new job to call main can, in the development of efficiency, management and maintenance, is also a good choice.
After analyzing the above three kinds of programs, according to the actual situation, decided to use the second solution, the reason is: the system is b/s mode, a lot of functions need to operate on the page and management, with the second solution can be very intuitive maintenance and management.
Oracle Report Development Scenarios