We are migrating some reports from Oracle Reports to Evisions Argos. And in Oracle reports, there was a "Before Report" trigger, that would get fired before the actual running of the report query. This allowed us to fill some tables before the query and keep the whole business logic in the report itself. Is it possible to do something like this in Argos? Where could you execute PL/SQL code before running the query for the report? Either at the report or the datablock could work for us.
You can add a dataset to the report and call the procedure(enclosed with begin/end) there.
Related
How does a PLSQL script execute?
Currently, I am confused with the AWR report analysis of a PLSQL script.
I see two different SQLIDs, one for the PLSQL SQL script and another for a query executed by the PLSQL.
Is it expected to have two different SQLIDs, or some other process is running the other sql?
Just we are taking small example for Top running session for CPu.
we are checking same sqlid clicked then we are able to data for same.
In OBIEE I have created a direct query that runs stored procedure.
Procedure itself makes insert into a table and at the end another insert into log table.
As mentioned in the tile, from logs I can tell that procedure is executed twice. Is this a normal behavior for direct query in OBIEE?
You have to trace what happens in the logs of both OBI and the database. It's definitely not "normal" as you put it, but as you don't specify which version you are using so it's impossible to say whether you're hitting a bug. By the way, an exact version is "12.2.1.4.200414" and not "12c".
In general, Direct Database Request are at best an exception case for OBIEE as it's an analytical platform and not a SQL interpreter.
Is there a way to restrict how many reports users can generate? We recently had a case where few users generated about 100 reports each which in retrospect bogged up the system.
Forms/Reports version 11.1.1.2.0
Thanks
I don't know whether there's a system-related way to do that, but - as a developer, you could:
create a table which holds information about reports being ran. It would contain columns like (user, date, report name, ...)
insert a row into that table in reports' After Parameter Form trigger
delete a row from it once the report finishes in After Report trigger
write a function that returns number of reports currently running for a specific user
call it in Before Report trigger and - if it exceeds limit you enforce (don't hardcode it - store its value into some table), then stop report's execution and inform the user (use SRW built-in procedures to do that)
Yes, it means that you should edit all reports (RDFs) you have in order to implement those changes.
I have an application which uses Oracle Database. I have several sql updates and selects in the application.
I gathered an AWR report on Oracle Database to diagnose some performance charasteristics of my application.
When I analyze the report by checking the "SQL ordered by Executions" statistics, I found out that one of my update query run 8985 times and row number processed by this query is 8,985. But, I have a select query and it run 8,985 times too but row number processed by this select statement is 8936.
My select query is right after the update query so it is expected that both queries' executed time is equal. What I wonder is, why my select query processed less row than its executed time value.
Thanks
conn / as sysdba
SQL> #$ORACLE_HOME/rdbms/admin/awrrpt.sql
Specify the Report Type
AWR reports can be generated in the following formats. Please enter the
name of the format at the prompt. Default value is 'html'.
'html' HTML format (default)
'text' Text format
'active-html' Includes Performance Hub active report
I have several reports, and on each one of them i have a few tables included.
Lets say 3 tables, tableA, tableB and tableC.
I want to use the following Oracle Function to filter the result set passing also a report parameter:
AND function(tableB.field1, tableB.field2, tableB.field3, {?report_parameter}) = 'S'
Facts to be aware of:
Oracle Functions can only be used on SQL Expressions and/or SQL Commands in Crystal Reports.
SQL Expressions cannot contain report parameters (so, not an option).
Crystal Reports lets you replace a report table with a SQL Command, but does not let you replace several tables to a single SQL Command.
We do not want to re-build all the reports all over again.
We do not want to replace a single table to a SQL Command because it affects performance in a high level since Crystal does not transform the tables and the SQL Command on a single query when executing the report.
This Oracle Function selects data from other tables and therefore can not be rewritten on a Report Custom Function.
The {?report_parameter} is an information that only the application knows. It is filled by the application before exporting the report to the user.
What could I do to work around this?
No knowing exactly why your function requires tables and parameter, I can only give you vague, untested options. None of the options are ideal:
rewrite your Oracle function as 'Custom Function' (CF); reference CF in record-selection formula; filter will be applied WhileReadingRecords (i.e. the function will not be sent to the database)
rewrite your function as a stored procedure that accepts one parameter, but returns a record set (the parameter will be recognized by Crystal Reports); join the other tables to the stored procedure. The stored procedure will need to be written in a manner that will support Crystal Reports' data needs (using result from a stored procedure with parameters as value for gauge chart - crystal reports in asp.net application)