Is it possible to validate all SQL expressions in application? - oracle

When importing project, there are a lot of bad table names referenced from application, which causes errors. I need to manually rename or create tables accordingly. It would be fine if i find all bad SQL expressions in application with simple few clicks.
How to validate all SQL expressions from pages content body, pages items, etc. to see at what places there are errors?
EDIT:
Here: Table SAMPLE$PROJECT_TASKS does not exist and was not find by Advisor.

Use Advisor. It is located in application's Utilities.
For example:
I created a table named brisime
then I created an interactive report based on that table (it worked OK)
went to SQL Workshop and dropped the table
interactive report doesn't work any more (of course it doesn't)
So, what does the Advisor say? I included only "Is valid SQL or PL/SQL code":
The result is then:
As expected; table doesn't exist, and Advisor found it.
[EDIT]
As of your comment that chart's series query isn't checked by the Advisor: I don't know why - maybe you should ask people who developed Apex (visit OTN Forums).
However, just for testing purposes, I created a page that has two regions:
chart
classic report
Both used the same table as a source. I then dropped the table and ran the page in Debug mode. It shows two separate debug identifiers
chart uses ajax plugin path
classic report uses show path
The Advisor says that report failed on "Is Valid SQL or PL/SQL Code" check, but nothing for the chart. Maybe it is about Ajax, i.e. it isn't checked. On the other hand, maybe it is not the reason, I really can't tell.

Related

Oracle APEX 21.2 - What is the use of "Execution Scope" setting under process in the context of Interactive Grids

I am trying to understand the use of the "Execution Scope" setting found under processes of IG Automatic Row Processing as well as validations with IG mapped as editable region.
I kept logging in these process and tried deleting and updating records, but both the settings seems to work the same
Also
With the above code, I deleted a record and it got deleted without raising the validation.
The same when I have the execution scope as "For created and Modified Rows".
Can someone help me understand this setting?
PS: When I set the "Always Execute" this process also gets executed on Delete although the help text for this setting is conveying entirely different explanation.
Thanks
While in Apex, navigate to any property and check help related to it, e.g.
It describes what it is used for, so - I suggest you read it.
Also, almost everything is covered in documentation, e.g. Understanding page processes.

Oracle Apex: Is it possible to change the default schema at runtime?

We have an Apex application (version 20.1) and our users must be able to change the database schema at runtime via button click (preferably without logging in again).
Currently we are solving this by installing our application multiple times, once per schema.
We recently discovered the function apex_export.get_application. We intend to use this function to bring our frontend under version control (finally!). We would like to deploy our application directly from the exported files. Having a single application, we would not have to mess with the internal component ids from the exported files.
Is it possible to install the application once and change the default schema via Pl/SQL code? Thank you!
I don't think this can be done, but perhaps the following is a reasonable compromise
add all the schemas you need to support to the workspace schema list
Any SQL (and I do mean any) in your app would be prefixed with an application item, eg
Before: select * from my_table
After: select * from &my_schema..my_table
At login time (or when a user selects it) you modify the MY_SCHEMA application item
(I've not tried this...so test/tread carefully)

Cognos session parameters usage

I have setup LDAP authentication and set up "custom properties" in cognos configuration to get a attribute i have defined in the LDAP entry.
For example this custom property is called ORG_NAME, how do i use this ORG_NAME in report studio as a parameter to filter on? I have seen online about mapping with Framework manager.. however the particular reports i am using access the database directly and DO NOT have a framework manager package associated with them, so i need to use the ORG_NAME without using FM....
You can use the same syntax you would use in FM. So, for example:
#sq($account.personalInfo.givenName)#
will return the first name, and so on.
If you feel some burning need to for user-written SQL, instead of using FM, you can include the macro as a query item in your "outer" query (that gets the results from your sql query, Query2 in the image below).

Crystal Reports Data Source in Oracle

I inherited a legacy system using Crystal Reports in VS.NET pulling info from an Oracle11g DB.
The database fields are in "REPORT_DATA", I updated the stored procedure which the code is querying to add a field, however I cannot see that new field in the field explorer.
When I click on "Verify Database" and manage to log into the DB I get a "Remove Table" prompt - "The database table "REPORT_DATA" cannot be found. Proceed to remove this table from the report?"
Of course, there is no REPORT_DATA table and there never was.
When I preview the report or put it on the server it works, so there is some behind-the-scenes magic which I don't understand.
Figured it out.
I had to highlight the server name in the “Current Data Source” area and the name of the server in the “Replace With” area on the Set Datasource Location window. Then click the “Update” button.
Since the report wasn't built on my machine it had to be reconfigured - can't figure out why it still connected to the DB when previewing though.

Hide Parameters in web.show_document() when passing from ORACLE FORM to REPORT

I am new to racle forms and report generation, I have successfully created a report by using the following syntax
web.show_document('http://URL/reports/rwservlet?KEY1&report=reportpage.rdf&destype=cache&desformat=pdf&paramform=no&server=rsnic'||'&transid='|| FS_TEMP || '&user_parameter=' || 'User_data','_blank');
The issue is that when I generate the Report the above link comes in the Browser URL so if anyone changes the "User_data" the report gets changed.
Is there anyway I can hide the User Parameter and its value
To secure the call to web.show_document you first need to make use of the RUN_REPORT_OBJECT.
The Oracle White Paper Integrating Oracle Reports in Oracle Forms Services applications states:
The most secure approach for calling Reports from Forms on theWeb is
to use the Oracle Application Server 10g reports Services in
combination with RUN_ REPORT_OBJECT. Because the user’s database
connection is implicitly passed from Forms to Reports on the server,
there is no risk of interception as if it were passed in a URL.
From page 10 this same document explains with an example on how to use RUN_REPORT_OBJECT.

Resources