Mittwoch, 3. Februar 2016

The next page using the wizard

Okay, lets create the form using the page wizard.

Of course, we use the Form wizard,

and especially the Tabular Form wizard to create a single region.
Our form is based on the view maintenance_db.plsql_profiler_runs_vw and we want to be able to update and delete records. We use the column runid as primary key, and keep the existing trigger to handle updates and deletes (No additional functionality inside the page). Also we decide, that it shall be only be possible to update the column RUN_COMMENT.

Please refer to the screenshot for the other seetings. And of course do not associate the page with the Navigation Menu.

And the result looks like:

Like the Profiler runs page. That is not exactly, what I wanted,but maybe I can add the Percent Graph column here and remove the other page. Please notice, that this page already has all the functionality, that we had to create manually in APEX 4.1.

On the other side we will loose the nice functionality connected to the interactive report.

Ever tried to delete a page?

Deleting pages in APEX 5 sucks. But finally I found at least one way to do it!

  • Switch to Utilities/Cross Page Utilities/Delete Multiple Pages
  • Mark the page you want to delete and press Delete Pages

That's it

I would appreciate any hints to do it faster.

Thanks David, I must have been blind!

The next page... 2.0

I added the next (empty) page PLSQL Profiler Run Details. The page will not show up in the Navigation Menu, but as a child of the page Profiler Runs (renamed) in the Breadcrumbs list.

On second thought, it might be better to use the page wizard this time!

Did I mention ...?

I really love the Quick Edit button, that opens the Page designer at the perfect spot for changes.

So, when I want to f.e. edit the graph Attribute, I simply:

  • klick on the Quicke Edit button
  • hover over the header of the Graph column until a blue square surronds it and klick on it
After that the Page Designer will open and the Graph column section of my Interactive Report is selected.

PLSQL Profiler Runs => Adding a Gauge 2.0

Based on what I described in

PLSQL Profiler Runs => Adding a Gauge

I changed the query of the interactive report region to

SELECT runid ,
  related_run ,
  run_owner ,
  run_date ,
  run_comment ,
  run_total_time ,
  ROUND((run_total_time * 100) / max_run_total_time, 0) AS graph
  (SELECT r.runid ,
    r.related_run ,
    r.run_owner ,
    TO_TIMESTAMP(TO_CHAR(r.run_date, 'DD.MM.YYYY HH24:MI:SS'), 'DD.MM.YYYY HH24:MI:SS') AS run_date ,
    r.run_comment ,
    r.run_total_time ,
    (SELECT MAX(run_total_time) FROM plsql_profiler_runs_vw
    ) AS max_run_total_time
  FROM plsql_profiler_runs_vw r

Please notice, that we not have to create some fancy HTML code to display the percentage gauge,

With Apex 5 we only have to set the type of the Graph Attribute to Percent Graph and we are done.

The result looks impressive, doesn't it?

PLSQL Profiler Runs 2.0

By now our lonely page looks pretty much empty, so we will add some content by adding and Interactive Report region to the page (Simple drag it in the Content Body section).

For now it is red, showing that there is an error.

Don't worry, we have just not defined the query to feed the report yet. I use this slightly ajusted query from an old post to solve this issue.

SELECT r.runid ,
  r.related_run ,
  r.run_owner ,
  TO_TIMESTAMP(TO_CHAR(r.run_date, 'DD.MM.YYYY HH24:MI:SS'), 'DD.MM.YYYY HH24:MI:SS') AS run_date ,
  r.run_comment ,
  r.run_total_time ,
FROM plsql_profiler_runs_vw r;

And the result looks imediatly like this:

Hmm, looks like I was a little sloppy on adjusting the Timestamp formats. After some adjustments in Shared Components/Edit Globalization Attributes/Globalization the outcome should be like this:

Ever wanted to change the name of a page and show it in the Navigation menu as well?

I started with a page HOME as in Apex 4.1, but then I decided that I wanted to use the nice Navigation menu on the left hand side, skip the HOME page and start with the PROFILER page instead.

First approach => Update the name and the Title attribute in the page designer from



Naaaa, thats not what I expected.

So in fact we have to change some settings in the applications Shared Components section to change the Navigation Menu and the Breadcrumbs.

So for the Navigation Menu:

  • open the Shared Components page
  • find the Navigation section
  • pick the Navigation Menu link
  • pick the Desktop Navigation Menu list
  • open the entry named Home
  • finally change the List Entry label on the Entry tab to whatever you want in this case to "Profiler"
For the Breadcrumb:
  • open the Shared Components page
  • find the Navigation section
  • pick the Breadcrumbs link
  • pick the Breadcrumb entry from the Breadcrumbs list
  • open the entry named Home
  • finally also change the Short Name to whatever you want in this case to "Profiler"


Dienstag, 2. Februar 2016

Getting started ... 2.0

Well, I have been here before, but this time it is Apex 5. So in our nice new workspace we create a nice new application. In fact a desktop application.

I name the application (again) maintenance dashboard, because I (still) don't want to limit it to profiler handling only.
For now I keep the Theme, because I have no idea how it looks.

And I start with a single empty page by now.

At first there has to be a workspace!

For our nice new application we first want to create a new workspace.

So I create a workspace MAINTENANCE in the existing schema MAINTENANCE and use my existin Admin user to manage it.


Import vs. Recreation

Shall I try to import the old files (quick wins) or shall I start from scratch to have a look on the new features in APEX 5?

Well, I decided to do a little bit of both!

When it comes to the database objects, I decided to follow my own advise and reuse all of the database objects as described here:

Maintenance Dashboard, the final Version

Not including the "Add shared components" and following section(s).

Saying and doing that I discovered some errors in my original scripts and tried to resolve those,
Please give me a hint if I missed something.

For the APEX part, I will start from scratch.

Sonntag, 31. Januar 2016

Cisco Anyconnect and the APEX Admin Sign In aka

Ever tried to use CISCO AnyConnect and APEX the same time? Have fun!

To make it short. If you cannot start APEX with an open VPN connection and the database is located on your own desk-/laptop, add a line to your hosts file in the format:  name expected by listener

How to know, what the listener expects? Run:

lsnrctl status

That will show all of your listners

Moving on to Apex 5

Ok, it has been a while, and I didn't really had the time to drive this any further. But now, I want to take it to the next generation (12c / APEX

Somehow I managed to install Oracle 12c and the newest APEX release on my Laptop.
Being on a business trip I thought this might be the right time to move my old sources to the latest version of APEX, remove some ballast and learn something new.