tag:blogger.com,1999:blog-8695792360854388052024-03-06T11:13:24.455+10:00Random Insights into OracleInsights<br>
a. an understanding of relationships that sheds light on or helps solve a problem.<br>
b. (in psychotherapy) the recognition of sources of emotional difficulty.<br>
c. an understanding of the motivational forces behind one's actions, thoughts, or behavior; self-knowledge.Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.comBlogger78125tag:blogger.com,1999:blog-869579236085438805.post-12195142448546574502018-10-15T13:05:00.001+10:002018-10-16T00:07:59.221+10:00Export from APEX 5.1 after you have upgraded to APEX 18.2<div dir="ltr" style="text-align: left;" trbidi="on">
I just wrapped up an upgrade for one of the development environments from APEX 5.1 to APEX 18.2 when the phone rang:<br />
<br />
<blockquote class="tr_bq">
I need to export some changes I was doing in APEX 5.1, an issue has suddenly changed from low priority to high priority. The work in only in DEV, and I don't have a recent export!! Is APEX 18.2 backwardly compatible with APEX 5.1?</blockquote>
I wouldn't like to try exporting from APEX 18.2 back to APEX 5.1 - that's fraught with danger.<br />
But it is possible to do an export from an old APEX schema provided you haven't dropped the schema, here's how..<br />
<br />
<pre style="border: 1px solid rgba(0, 0, 0, 0.0980392); box-sizing: border-box; color: #2b2b2b; font-family: monospace, serif; font-size: 15px; hyphens: none; line-height: 1.6; margin-bottom: 24px; max-width: 100%; outline: 0px; overflow: auto; padding: 12px; vertical-align: baseline; word-wrap: normal;"><code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">variable name varchar2(255)
variable contents clob
declare
l_files apex_050100.wwv_flow_t_export_files;
begin
l_files := apex_050100.wwv_flow_export_api.get_application(p_application_id => &APPLICATION_ID. );
:name := l_files(1).name;
:contents := l_files(1).contents;
end;
/
set feed off echo off head off flush off termout off trimspool on
set long 100000000 longchunksize 32767
col name new_val name
select :name name from sys.dual;
spool &name.
print contents
spool off
</code></pre>
Surprisingly easy!!!<br />
So now the developer imports the application into the TEST environment, which is still APEX 5.1, finalizes the change and make an emergency release to promote to UAT and PROD.</div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com2tag:blogger.com,1999:blog-869579236085438805.post-88140607268817216532018-10-01T21:34:00.001+10:002018-10-01T21:34:31.128+10:00ORA-28014: cannot drop administrative users<div dir="ltr" style="text-align: left;" trbidi="on">
Just so I don't forget :)<br />
<br />
<pre style="border: 1px solid rgba(0, 0, 0, 0.0980392); box-sizing: border-box; color: #2b2b2b; font-family: monospace, serif; font-size: 15px; hyphens: none; line-height: 1.6; margin-bottom: 24px; max-width: 100%; outline: 0px; overflow: auto; padding: 12px; vertical-align: baseline; word-wrap: normal;"><code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">SQL> drop user apex_180100 cascade;
Error starting at line : 1 in command -
drop user apex_180100 cascade
Error report -
ORA-28014: cannot drop administrative users
SQL> </code><code style="border: 0px; font-family: monospace, serif; font-style: inherit; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><b style="background-color: #fff2cc;">alter session set "_oracle_script"=true;</b></code><code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">
Session altered.
SQL> drop user apex_180100 cascade;
User APEX_180100 dropped.
</code></pre>
<br />
<div>
<br /></div>
</div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com1tag:blogger.com,1999:blog-869579236085438805.post-83422051077489644572018-01-09T00:01:00.001+10:002018-01-09T00:01:36.424+10:00APEXExportSplitter deprecated in Oracle APEX 5.1.4<div dir="ltr" style="text-align: left;" trbidi="on">
According to the <a href="http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-514-patch-set-notes-4124555.html#GUID-CE4058CA-F50E-4854-9025-C77401E4A5A9" target="_blank">Oracle APEX 5.1.4 patchset notes</a> the APEXExportSplitter Java utility is deprecated.<br />
<br />
That's not a bad thing, because it's simply been included into the APEXExport utility as an extra command option.<br />
<br />
Better yet, it's been bundled into the Oracle SQLcl 17.4 utility.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9m0razwhGCVC_sYEPTQ2UC_N6UoDgxi2_ZYZ3EglDj87pMjdTUrB1prbolmrR93NqSzTg4Zqfe6tmsVag6yRcdMFpJr8WaOlNsgi2x0nCRe4MOsxOrOVbgbhg3xYyUmkylnT9t4nJSA8/s1600/Screen+Shot+2018-01-08+at+11.23.30+pm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="886" data-original-width="1600" height="354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9m0razwhGCVC_sYEPTQ2UC_N6UoDgxi2_ZYZ3EglDj87pMjdTUrB1prbolmrR93NqSzTg4Zqfe6tmsVag6yRcdMFpJr8WaOlNsgi2x0nCRe4MOsxOrOVbgbhg3xYyUmkylnT9t4nJSA8/s640/Screen+Shot+2018-01-08+at+11.23.30+pm.png" width="640" /></a></div>
In the screenshot above you can see the following commands run from within SQLcl.<br />
<br />
<pre style="border: 1px solid rgba(0, 0, 0, 0.0980392); box-sizing: border-box; color: #2b2b2b; font-family: monospace, serif; font-size: 15px; hyphens: none; line-height: 1.6; margin-bottom: 24px; max-width: 100%; outline: 0px; overflow: auto; padding: 12px; vertical-align: baseline; word-wrap: normal;"><code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">!sql -version</code></pre>
This issues a host command to show the SQLcl version being used.<br />
<br />
<br />
<pre style="border: 1px solid rgba(0, 0, 0, 0.0980392); box-sizing: border-box; color: #2b2b2b; font-family: monospace, serif; font-size: 15px; hyphens: none; line-height: 1.6; margin-bottom: 24px; max-width: 100%; outline: 0px; overflow: auto; padding: 12px; vertical-align: baseline; word-wrap: normal;"><code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">apex</code></pre>
Typing apex lists the apex applications owned by the current user.<br />
<br />
<br />
<pre style="border: 1px solid rgba(0, 0, 0, 0.0980392); box-sizing: border-box; color: #2b2b2b; font-family: monospace, serif; font-size: 15px; hyphens: none; line-height: 1.6; margin-bottom: 24px; max-width: 100%; outline: 0px; overflow: auto; padding: 12px; vertical-align: baseline; word-wrap: normal;"><code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">!mkdir test</code></pre>
This issues a host command to create a new directory.<br />
<br />
<br />
<pre style="border: 1px solid rgba(0, 0, 0, 0.0980392); box-sizing: border-box; color: #2b2b2b; font-family: monospace, serif; font-size: 15px; hyphens: none; line-height: 1.6; margin-bottom: 24px; max-width: 100%; outline: 0px; overflow: auto; padding: 12px; vertical-align: baseline; word-wrap: normal;"><code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">cd test</code></pre>
Within SQLcl change to the newly created directory.<br />
<br />
<br />
<pre style="border: 1px solid rgba(0, 0, 0, 0.0980392); box-sizing: border-box; color: #2b2b2b; font-family: monospace, serif; font-size: 15px; hyphens: none; line-height: 1.6; margin-bottom: 24px; max-width: 100%; outline: 0px; overflow: auto; padding: 12px; vertical-align: baseline; word-wrap: normal;"><code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">apex export -applicationid 200 -skipExportDate -split</code></pre>
The bit we are interested in; the command to export an application from the database, and split it into seperate files in one statement.<br />
<br />
<br />
<pre style="border: 1px solid rgba(0, 0, 0, 0.0980392); box-sizing: border-box; color: #2b2b2b; font-family: monospace, serif; font-size: 15px; hyphens: none; line-height: 1.6; margin-bottom: 24px; max-width: 100%; outline: 0px; overflow: auto; padding: 12px; vertical-align: baseline; word-wrap: normal;"><code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">!ls -l</code></pre>
Proving the f200.sql file was created, and then split into components in the f200 directory.<br />
<br />
To see the full syntax available simply type "apex export" to view the help.<br />
<br />
<pre style="border: 1px solid rgba(0, 0, 0, 0.0980392); box-sizing: border-box; color: #2b2b2b; font-family: monospace, serif; font-size: 15px; hyphens: none; line-height: 1.6; margin-bottom: 24px; max-width: 100%; outline: 0px; overflow: auto; padding: 12px; vertical-align: baseline; word-wrap: normal;"><code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">cardiac_own@orcl> apex export
-applicationid: ID for application to be exported
-workspaceid: Workspace ID for which all applications to be exported or the workspace to be exported
-instance: Export all applications
-expWorkspace: Export workspace identified by -workspaceid or all workspaces if -workspaceid not specified
-expMinimal: Only export workspace definition, users, and groups
-expFiles: Export all workspace files identified by -workspaceid
-skipExportDate: Exclude export date from application export files
-expPubReports: Export all user saved public interactive reports
-expSavedReports: Export all user saved interactive reports
-expIRNotif: Export all interactive report notifications
-expTranslations: Export the translation mappings and all text from the translation repository
-expFeedback: Export team development feedback for all workspaces or identified by -workspaceid to development or deployment
-expTeamdevdata: Export team development data for all workspaces or identified by -workspaceid
-deploymentSystem: Deployment system for exported feedback
-expFeedbackSince: Export team development feedback since date in the format YYYYMMDD
-expOriginalIds: If specified, the application export will emit ids as they were when the application was imported
-split: Split the exported file
-splitFlat: Split with no directory strucure
-splitUpdate: Generate update.sql file while splitting
-splitNoCheckSum: Overwrite all files
Application Example: apex export -applicationid 31500
Workspace Example: apex export -workspaceid 9999
Instance Example: apex export -instance
Export All Workspaces Example: apex export -expWorkspace
Export Feedback to development environment:
apex export -workspaceid 9999 -expFeedback
Export Feedback to deployment environment EA2 since 20100308:
apex export -workspaceid 9999 -expFeedback -deploymentSystem EA2 -expFeedbackSince 20100308
</code></pre>
Happy new year! Now, I've got some command scripts to update...<br />
<br /></div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com2tag:blogger.com,1999:blog-869579236085438805.post-84109748038503389332017-04-11T21:23:00.000+10:002017-05-24T16:55:05.567+10:00Auto-dismiss APEX Universal theme success messages<div dir="ltr" style="text-align: left;" trbidi="on">In the APEX 5.1.1 Universal Theme demonstration application, a code snippet is included showing how to automatically dismiss Success messages via JavaScript using the apex.theme42.configureSuccessMessages API.<br />
Trouble is it <b>only works in some circumstances</b>, as can be seen in screenshot from a demonstration application below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://apex.oracle.com/pls/apex/f?p=105931" target="_blank"><img alt="" border="0" height="388" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLUWIdrrtcBK5SLP83f8y_nNVXoqXFKZRx51Fex3VoDl_UsKQM1xLHcSbkT-XhXz8zroR2QCIfUTd1xgeYnlWH5xC84OIUb97S9vByNc9ZQPEuXGNHs8IFKcH6Xe6q3eZCuhh55HnqfdA/s640/autodismiss-demo.png" title="" width="640" /></a></div><br />
You can try the <a href="https://apex.oracle.com/pls/apex/f?p=105931" target="_blank">demo application</a> to observe the issue, and a solution that works right now. You can download the application, which probably works on earlier versions of the Universal theme - I haven't tested it.</div>Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com6tag:blogger.com,1999:blog-869579236085438805.post-7639616264660252362017-03-01T11:54:00.002+10:002017-03-01T11:54:28.717+10:00APEX 5.1 - Goodbye Component View<div dir="ltr" style="text-align: left;" trbidi="on">
In Oracle APEX 5.1 it's possible to remove the Component View from the Page Designer.<br />
<br />
From the Page Designer open the browsers console window and type the following code:<br />
<br />
<pre style="border: 1px solid rgba(0, 0, 0, 0.0980392); box-sizing: border-box; color: #2b2b2b; font-family: monospace, serif; font-size: 15px; hyphens: none; line-height: 1.6; margin-bottom: 24px; max-width: 100%; outline: 0px; overflow: auto; padding: 12px; vertical-align: baseline; word-wrap: normal;"><code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">$("#componentView,[aria-controls='componentView']").remove();pageDesigner.storeTabsLayout();
</code></pre>
<div>
<code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">This is a per user preference, and persists across APEX sessions.</code></div>
<div>
<code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></code></div>
<div>
<code style="border: 0px; font-family: monospace, serif; font-style: inherit; font-weight: inherit; hyphens: none; line-height: 1.6; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">For more details see <a href="http://hardlikesoftware.com/weblog/2016/12/" target="_blank">John Snyders' blog</a>, I've just repeated it here so I don't forget.</code></div>
</div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com0tag:blogger.com,1999:blog-869579236085438805.post-37219698893922514952017-01-04T22:59:00.000+10:002017-01-04T22:59:50.771+10:00Oracle ACE Alumnus - so long, and thanks for all the fish<div dir="ltr" style="text-align: left;" trbidi="on">
The Oracle ACE program has morphed once again, with ACEs at all levels now required to fill out their contributions in the ACE Program app (written in Oracle APEX of course).<br />
<br />
The level of detail includes:<br />
<ul style="text-align: left;">
<li>type of activity (presentation, book, article, blog, forum activity, tweets etc.)</li>
<li>substantiation (conference links, presentation links, book ISBN etc)</li>
<li>analytics where relevant (blogs, tweets)</li>
</ul>
<br />
Meaning the Oracle ACE program website is out of date:<br />
<blockquote style="color: #666666;">
<a href="http://www.oracle.com/technetwork/community/oracle-ace-faq-100746.html#4">What expectations does Oracle have of an Oracle ACE?</a><br />
The Oracle ACE designation is given to individuals as recognition of his/her past contributions.<br />
Oracle's only future expectation is that the recipient maintains his/her level of community activity.</blockquote>
Currently to maintain an ACE status requires 200 points of activity for a year.<br />
I did look at entering my activity, but quickly decided it just wasn’t worth the time and effort to do so.<br />
<br />
Here is how I calculated what I would need to do to generate 200 points using my typical activities:<br />
<br />
<pre><code>A new presentation takes about 100 hours to write and prepare.
A decent blog post takes about 2-4 hours to write, a cynical one to rort the system takes a few minutes.
2 presentations (2*100 hours) presented 3 times (20 points each) => 200 hours, 120 points
16 blogs (16*3 hours) (5 points each, unless mention "Cloud" for 15 points ) => 64 hours, 80 points
So roughly:
6 weeks to produce content (spread over months of evenings and weekends)
1 week to present content (travel, accommodation)
Direct cost to present content (lost income, travel and accomodation expenses) => 2 weeks salary
Indirect cost to family and work/life balance - incalculable.
Plus the time taken to record activities; all this effort for something that is just a nice accolade.
</code></pre>
<br />
I don’t get any financial benefit for presenting, either directly or indirectly, it’s just my way of <b>giving back</b> to the Oracle community and sharing my insights. Similarly with blogging, I only blog when I’ve got something worth sharing.<br />
<br />
I believe the ACE program contributions criteria will have the following impacts:<br />
<ul>
<li>large reduction in the number of ACEs (probably the intent)</li>
<li>a number of disenchanted and disgruntled ex-ACEs</li>
<li>rules driven behaviour to maintain status at the cost of quality/integrity</li>
<li>ACEs predominantly coming from consulting/training firms with a direct financial incentive.</li>
</ul>
<br />
Overall I think I’m better off to not bother with the ACE program, hence I've now converted to an Oracle ACE Alumnus. <br />Instead I'll contribute when I have something worth sharing, and use the time/money recouped with my wife and family.<br />
<br />
So in the words of Douglas Adams, "so long, and thanks for all the fish".<br />
<br />
<br /></div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com2tag:blogger.com,1999:blog-869579236085438805.post-80989752748307070102017-01-02T15:28:00.000+10:002018-10-01T21:38:09.470+10:00Always read the latest documentation<div dir="ltr" style="text-align: left;" trbidi="on">
Something that stuck in my mind from a presentation I saw several years ago was:<br />
<br />
<blockquote class="tr_bq">
Always read the latest documentation, even if you're not using that version<br />
<br />
- Connor McDonald</blockquote>
<br />
So just before Christmas APEX 5.1 was released, giving me some <a href="https://docs.oracle.com/database/apex-5.1/index.htm">new APEX 5.1 documentation</a> to read over the break. Yeah - "get a life" I hear you thinking.<br />
<br />
Where I'm currently working we're already pretty current (Oracle 12.1 database, APEX 5.0), so I'm hoping I can convince the DBA to upgrade to APEX 5.1 reasonably soon. For me the case to upgrade is pretty simple - the application was built in 5.0 using declarative development as much as possible, has legacy features switched off, and only went live a few weeks ago, so not much data or users just yet.<br />
<br />
Obviously reading the latest documentation is completely relevant in this situation, but why would you read the latest documentation if you're unlikely to upgrade for some time?<br />
<br />
Here's a couple of reasons:<br />
<br />
<ul style="text-align: left;">
<li>documentation improves with new releases just like code does, so you will often see better examples, improved content, or features that were previously un(der)documented.</li>
<li>by knowing whats in newer versions of APEX, you can make better decisions on how to build your application and thus future proofing todays solutions</li>
<li> APEX 5.1 has quite a few <a href="https://docs.oracle.com/database/apex-5.1/HTMRN/toc.htm#GUID-657FF369-756E-4F31-96F9-B2D92C3DE084">deprecated features</a> and <a href="https://docs.oracle.com/database/apex-5.1/HTMRN/toc.htm#GUID-CC4B5D70-22FD-45CA-8F6F-C34A91F1B5BD">desupported features</a>, so knowing what they are allows you to start pro-actively removing them from your application now, even before an official application upgrade project kicks off.</li>
</ul>
<div>
I'm sure you can think of more/better reasons, so now you have no excuse - get reading!!</div>
<div>
<br /></div>
</div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com2tag:blogger.com,1999:blog-869579236085438805.post-75664557459087756212015-05-07T09:42:00.003+10:002015-05-07T09:42:51.717+10:00APEX 5.0 Universal theme migration guide<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjonaj7Whqelz2FOyJBL-ZCNvsl_6W4-sjIj45w7EG1hhJC1ktJcxhnNODTs2VnJ7zcKN9UsfwWaNRspTNK9zgWNxjKLbhB_kHZr7IpzuGFMUXuXiYB4mr-ozCamckFCius9W-4GkWbpPQ/s1600/universal-theme-migration.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjonaj7Whqelz2FOyJBL-ZCNvsl_6W4-sjIj45w7EG1hhJC1ktJcxhnNODTs2VnJ7zcKN9UsfwWaNRspTNK9zgWNxjKLbhB_kHZr7IpzuGFMUXuXiYB4mr-ozCamckFCius9W-4GkWbpPQ/s1600/universal-theme-migration.png" height="111" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Looking for information on migrating to the APEX 5.0 Universal Theme?</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
There's no place better to start than the <a href="https://apex.oracle.com/pls/apex/f?p=42:2000:::NO:RP::">APEX 5.0 Universal theme migration guide</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
</div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com0tag:blogger.com,1999:blog-869579236085438805.post-15805378887128496102015-03-25T16:01:00.000+10:002015-03-25T16:01:14.055+10:00Oracle APEX - Performance tuning sequences<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8mLsNrXVEDF4rjYPM06qYb7kwQMOVyceRdzd3wJOHwE0cgHow2FT-9Ghyphenhyphen1UC8VypgzunZKw6bznQBz1KKDr0j_C3bJhaviw86f89lWUClhp-J0UjQlPdPhB7DXtCLEcwdiWjMLwAvqOo/s1600/performance.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8mLsNrXVEDF4rjYPM06qYb7kwQMOVyceRdzd3wJOHwE0cgHow2FT-9Ghyphenhyphen1UC8VypgzunZKw6bznQBz1KKDr0j_C3bJhaviw86f89lWUClhp-J0UjQlPdPhB7DXtCLEcwdiWjMLwAvqOo/s1600/performance.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
I've been recently reading about performance issues for sequences with cache values set too low.<br />
<br />
<ul style="text-align: left;">
<li>Daniel Morgan <a href="http://www.morganslibrary.org/">www.morganslibrary.org</a>, covers it in his ACE Director Performance Tuning Bootcamp presentation</li>
<li>Tom Kyte says "you would be amazed what setting a sequence cache via alter sequence to 100,000 or more can do during a large load -- amazed."</li>
<li>Simon Pane from Pythian goes into great detail in a blog post <a href="http://www.pythian.com/blog/performance-issues-with-the-sequence-nextval-call/">performance issues with the sequence nextval call</a>. He also show to detect when sequences are impacting performance.</li>
</ul>
<br />
With APEX 5.0 nearing general release, I thought it would be interesting to see what the cache value was set to for WWV_SEQ. In case you don't recognize the sequence, it's used by the APEX engine as part of a calculation to generate globally unique ids for APEX items.<br />
<br />
A quick check on <a href="http://apex.oracle.com/">apex.oracle.com</a> reveals the APEX team have been thinking about it also:<br />
<br />
<pre class="brush: sql">select sequence_owner, cache_size, last_number
from all_sequences
where sequence_name = 'WWV_SEQ';
</pre>
<br />
<table border="0" cellpadding="5" cellspacing="5" summary=""><tbody>
<tr><th id="SEQUENCE_OWNER">SEQUENCE_OWNER</th><th id="CACHE_SIZE">CACHE_SIZE</th><th id="LAST_NUMBER">LAST_NUMBER</th></tr>
<tr><td headers="SEQUENCE_OWNER">APEX_050000</td><td headers="CACHE_SIZE">100</td><td headers="LAST_NUMBER">6939179</td></tr>
<tr><td headers="SEQUENCE_OWNER">APEX_040200</td><td headers="CACHE_SIZE">20</td><td headers="LAST_NUMBER">719290506</td></tr>
</tbody></table>
<br />
Interesting to see the cache size was set to the default value of 20 in APEX 4.2 and is now set to 100 in APEX 5.0. That's the "sweet spot" identified in Simon Panes blog also.<br />
<br />
So, if you have an active Oracle APEX 4.2 instance, it may be worthwhile investigating..</div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com1tag:blogger.com,1999:blog-869579236085438805.post-28614568741346584372015-02-02T08:48:00.000+10:002016-05-29T11:49:32.303+10:00APEX 5 EA 3 - Universal theme<div dir="ltr" style="text-align: left;" trbidi="on">
Oracle APEX 5 early adopter 3 just came out.<br />
<br />
I've been taking the Universal Theme Sample Application for a quick test drive.<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEnPqeqyIIwTIEgMs23Az-vjouWFT76_Ag-XpHw6Gl1GkW-ZoOMylL-LvxFJyS9OiruYxja7OSbKrkxyjjfAKHfAzvm_UwQDOzfaOIqsFIP_GUk8ggkF_WGXsPlZvvTCI56N7kWTTjB0w/s1600/Screen+Shot+2015-02-01+at+2.36.38+pm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEnPqeqyIIwTIEgMs23Az-vjouWFT76_Ag-XpHw6Gl1GkW-ZoOMylL-LvxFJyS9OiruYxja7OSbKrkxyjjfAKHfAzvm_UwQDOzfaOIqsFIP_GUk8ggkF_WGXsPlZvvTCI56N7kWTTjB0w/s1600/Screen+Shot+2015-02-01+at+2.36.38+pm.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
I'm <b>truly impressed</b> by what I've seen so far, and a little sad at the same time..<br />
<br />
Oracle APEX developers typically come from a database development background, so have strong database design and PL/SQL skills, with relatively few of them having strong web design skills.<br />
<br />
In some respects, this has held back the adoption of Oracle APEX in organisations. Developers have been able to quickly build useful and functional web applications using the provided themes with relative ease.<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1pvNX-ZAFmtBfMpiGBUqeM5CiIwMA6iGVAGvtE3RuI2_RScsaMjoN13VXyOjdIxjH_AhZ3uTD-p_Dxt9d97_pomTqiWwuPTNGdrdEao3KjoERmreMexhFhFGhjYf3y4ZMLopwDu2lMTQ/s1600/lada.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="123" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1pvNX-ZAFmtBfMpiGBUqeM5CiIwMA6iGVAGvtE3RuI2_RScsaMjoN13VXyOjdIxjH_AhZ3uTD-p_Dxt9d97_pomTqiWwuPTNGdrdEao3KjoERmreMexhFhFGhjYf3y4ZMLopwDu2lMTQ/s1600/lada.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Functional Lada</td></tr>
</tbody></table>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl4MG3xsvQd4Sq-ujWVOuhsfMd44V1VOXKkREUYpEMm_oFh7RU-qfc2Hs2SCBRL-1-mTDy418axwMZhCfh6wdu4oo0FldL5QngYH0jlKER7DZLYZp9x31CG-RSmz5Vw87C7lmYp8LVC1o/s1600/bugatti.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto; text-align: center;"><img border="0" height="128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl4MG3xsvQd4Sq-ujWVOuhsfMd44V1VOXKkREUYpEMm_oFh7RU-qfc2Hs2SCBRL-1-mTDy418axwMZhCfh6wdu4oo0FldL5QngYH0jlKER7DZLYZp9x31CG-RSmz5Vw87C7lmYp8LVC1o/s1600/bugatti.png" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sexy Veyron Super Sport</td></tr>
</tbody></table>
<div class="separator" style="clear: both;">
</div>
Trouble is "functional" websites don't evoke the same emotional experience as a "sexy" website, just like a functional car like a Lada doesn't evoke the excitement and desire of a super car like a Veyron (pinched from Joel Kallmans' blog).<br />
<br />
Out there in "user-land" functional and practical websites don't engage our customers in the same way a visually appealing and well thought out interface does. The visual appeal of any website plays a vital role in user satisfaction. A visually appealing website give the user a positive first impression, and builds the desire to work with it.<br />
<br />
Now thanks to the Universal Theme, having a "sexy" website is within the reach of every APEX developer. It looks fantastic out of the box, chock full of the latest UI components and highly configurable with little or no knowledge of CSS. With Oracle APEX 5.0 everyone can build web applications that are both functional and sexy.<br />
<br />
To the APEX development team, I tip my hat to you and say very well done.<br />
<br />
So why do I feel a little sad; it's always been a fun putting together a great UI for an application to transform it from functional to appealing. I won't get to do that so much now, it looks great already.<br />
<br /></div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com2tag:blogger.com,1999:blog-869579236085438805.post-29997823635682550392014-02-27T22:23:00.000+10:002014-02-27T22:23:52.724+10:00Oracle APEX Listener is no more..<div dir="ltr" style="text-align: left;" trbidi="on">
Just noticed the Oracle APEX Listener is no more.. it's now known as <a href="http://www.oracle.com/technetwork/developer-tools/rest-data-services/overview/index.html" target="_blank">Oracle Rest Data Services</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.oracle.com/technetwork/developer-tools/rest-data-services/overview/index.html" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx3IDflYS54b-NRJ6eSENvxyJ1_akGuXq9Xf6nwjjxKWjFNcoRH-WPaP-b4gA0tVOOlPQ3uIsK4-Zmm3kt8_8iH9gv5foHNx4Q7VNAeZSHOiJVq6xndd8SbaADhAmDdxfXvskmOGyEn7o/s1600/rest-data-services-2145235.png" /></a></div>
<br />
<br />
Notable items on the website:<br />
<ul style="text-align: left;">
<li><span style="font-family: arial, helvetica, sans-serif; font-size: 12px;">Can be used for Application Express </span><u style="font-family: arial, helvetica, sans-serif; font-size: 12px;">or any Oracle web-toolkit application</u></li>
<li><span style="font-family: arial, helvetica, sans-serif; font-size: 12px;">Apache Tomcat support is back</span></li>
<li><span style="font-family: arial, helvetica, sans-serif; font-size: 12px;">Default context path has changed from /apex to /ords, but you can change it back to /apex easily.</span></li>
</ul>
<div>
<span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: 12px;"><br /></span></span></div>
</div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com0tag:blogger.com,1999:blog-869579236085438805.post-71119173647326022982013-09-17T19:35:00.001+10:002013-09-17T19:35:51.454+10:00APEX 4.2.3 is out now.<div dir="ltr" style="text-align: left;" trbidi="on">
Just noticed <a href="http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html" target="_blank">APEX 4.2.3</a> is available, with <a href="http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-423-patch-set-notes-2015119.html" target="_blank">patch release notes</a>.<br />
<br />
Haven't had much time to look at it yet, but noticed Twitter Bootstrap 3.0 is included.</div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com0tag:blogger.com,1999:blog-869579236085438805.post-46708786575359906432013-06-29T07:29:00.000+10:002013-06-29T22:08:44.808+10:00Why go to conferences<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.kscope13.com/templates/ks13-home/images/ks13logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.kscope13.com/templates/ks13-home/images/ks13logo.png" /></a></div>
<br />
KScope13 has just wrapped up, and it's been a really enjoyable conference. I've learnt a lot, caught up with some friends, and had lots of fun also.<br />
<br />
I thought I'd share some of the reasons I go to conferences.<br />
<br />
<br />
<ol style="text-align: left;">
<li><b>To learn something new</b><br />I always try to find at least one or two things that will justify the time/expense of attending a conference to my employer. If you bring back something that solves an issue you have in your business, or a new approach which improves the way you work, or solves a performance bottleneck, then you've justified the trip to your manager. So hopefully next year, you'll get to go again.<br /></li>
<li><b>To validate the way you work</b><br />Often due to the specialized nature of your work, even in large organizations, there may only be a few people in your organization doing what you do. So even when your part of a large IT team, there's really very few people you can bounce ideas off, or discuss in depth the approach your taking to solve a business problem.<br />It's really nice to be able to talk to like minded people, or hear from the experts that the issues and challenges you face, are the same ones they face. And perhaps more importantly, the approach you've taken to solve those issues is both sensible, and similar to what other people are also doing.<br /></li>
<li><b>To network with others in person</b><br />These days with online forums we're often communicating with people from all around the world. It's really nice to meet them face to face. I've been fortunate to have met several members of the Oracle team, as well quite a few high profile presenters in person. It constantly amazes me how much personality comes across in emails and forum posts, and when you finally meet them, you feel like you already know them.<br />Sharing a meal and a few drinks (sometimes quite a few) at conference events really builds those relationships. That can really help when you hit a roadblock, and need to ask for help; it's also nice when you can pay that forward by helping someone else out also.<br /></li>
<li><b>To raise your profile</b><br />In these uncertain times you never quite know what the future is going to hold for you. So getting your name known in the Oracle community may have longer term benefits; it may open new opportunities for you.<br /></li>
<li><b>To give something back</b><br />I've been volunteering and presenting at conferences for over 10 years now; it's my way of giving something back to the Oracle community, sharing my knowledge and helping in a small way to make sure the Oracle community is a strong and vibrant community.</li>
</ol>
<div>
So that's some of the my reasons why I go to conferences, please feel free to comment and add your reasons.</div>
</div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com2tag:blogger.com,1999:blog-869579236085438805.post-68734311864454263132013-01-06T19:00:00.000+10:002013-01-08T07:45:35.391+10:00Never write down your New Year resolutions<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdFqo16hibPPSCCsyIuSOdJySk-WR8xQEzI5zsbRDWkjSOv2jlkm0uT7wdaICmnHHvHaAEHFnB8l5IbjH4oCbCScuaxvUyvtYvgAsYu3kUUYwzwqOG7REjuD1D_2P7RhVd94dlmgRk8_4/s1600/sandman.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdFqo16hibPPSCCsyIuSOdJySk-WR8xQEzI5zsbRDWkjSOv2jlkm0uT7wdaICmnHHvHaAEHFnB8l5IbjH4oCbCScuaxvUyvtYvgAsYu3kUUYwzwqOG7REjuD1D_2P7RhVd94dlmgRk8_4/s320/sandman.jpg" width="320" /></a></div>
It's a brand new year, and I'm back from a short holiday, refreshed, re-invigorated and ready to make some positive changes in 2013.<br />
<br />
Now you should never write your New Year's resolutions down, particularly where somebody else might see it.<br />
<br />
After all, <a href="http://online.wsj.com/article/SB10001424052748703478704574612052322122442.html" target="_blank">88% of all resolutions end in failure</a>, so do you really want to leave a record to remind yourself at the end of the year of all the things you promised to do, and never managed to achieve?<br />
<br />
Despite that, here's my list of personal goals for the year.<br />
<div class="separator" style="clear: both;">
</div>
<br />
<h4 style="text-align: left;">
1. Start playing pennant squash again </h4>
Late last year I started playing squash socially against one of the young guys at work after not touching a racquet in more than 10 years. While I was left barely able to walk, and redder than a ripe cherry by the end of the first match - I really enjoyed it. We've played several times since, each time the quality of the match has noticeably improved and I'm running around the court with much less effort.<br />
<br />
We are getting pretty serious now, both armed with new racquets, and gearing up to play in a competition in March. Between now and the competition start we need to join a club, play a few grading games and get match fit. To that end, I've bought a pedometer and am trying to do <a href="http://www.10000steps.org.au/library/why-10000steps-a-day/" target="_blank">10,000 steps a day</a> - squash is the only sport I know of that specifically covers vomiting in the rules.<br />
<br />
<h4 style="text-align: left;">
2. Rebuild the AUSOUG website</h4>
This is something I volunteered to do, and have been working in most evenings over the last year, but not published yet. The aim is to go live in late February.<br />
<br />
So far, I've built a content management system in APEX to maintain the website, produce eBulletins, schedule events, process conference paper submissions and the like. All that has been straight forward.<br />
<br />
The website itself is built using Oracle Portal 10.1.4 which is much more challenging (read annoying). It's quite amazing that there are so many similarities with APEX, yet it is such a dog of a product.<br />
<br />
<h4 style="text-align: left;">
3. Write an article or two for a User Group magazine</h4>
It's a real challenge facing all the Oracle user groups these days to get people to submit articles. So I'm going to do my bit - what about you?<br />
<br />
If you're interesting in submitting an article just email me at the address below, I'll pass it on to the AUSOUG editor. We share articles with UKOUG and ODTUG, so you can get published all around the world.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijAgoG_PyjSJ5QtOEZ6joU-sa9KBgOFKUcDAD4DtcaMrVxg1Szf4C8neDTHtdfot8bcOcGGN8dt0TuFSgbt7dgdkK94Kaugqk5YZuNRaIgn8aC54-lNSzyZSMJVKd3GTimpX-9A6v0NA4/s1600/email.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijAgoG_PyjSJ5QtOEZ6joU-sa9KBgOFKUcDAD4DtcaMrVxg1Szf4C8neDTHtdfot8bcOcGGN8dt0TuFSgbt7dgdkK94Kaugqk5YZuNRaIgn8aC54-lNSzyZSMJVKd3GTimpX-9A6v0NA4/s1600/email.gif" /></a></div>
<div class="separator" style="clear: both;">
</div>
<h4 style="text-align: left;">
4. Do a series of blogs on integrating Twitter Bootstrap into APEX</h4>
I've been using <a href="http://getbootstrap.com/" target="_blank">Bootstrap</a> with APEX 4.0 (and also Oracle Portal) for about a year now, and am keen to see how much easier it is to implement in the latest APEX 4.2.1 release, which now supports grid based layouts.<br />
<br />
Topics I plan to blog on:<br />
<ul style="text-align: left;">
<li>Basic integration into page templates</li>
<li>Specific templates like standard reports, possibly IRR styling</li>
<li>List templates combined with Bootstrap components (Navbar, toggable tabs)</li>
<li>Plugin integration (AJAX enabled carousel)</li>
<li>whatever else I encounter along the way.</li>
</ul>
<div>
Anyway, that's enough resolutions from me - hope you have a great year.</div>
<div>
</div>
</div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com1tag:blogger.com,1999:blog-869579236085438805.post-71837622406837611202012-10-23T21:58:00.000+10:002012-10-23T21:58:10.036+10:00Responsive Design in Oracle APEX - not just APEX 4.2<div dir="ltr" style="text-align: left;" trbidi="on">
One of the hottest topics in web design in 2012 has been Responsive Design - the ability for a web page to dynamically re-size to fit on a desktop, tablet or mobile phone.<br />
<br />
The reason it is such a hot topic is simple; there is no such thing as a standard screen size any more. You can't even pick a common denominator such as 1000 pixels wide and say "that will cover most computers, from laptops up to the massive dual screen desktop you told your boss you couldn't be without".<br />
<br />
Sometime in the near future mobile devices will out-number desktops. According to which source you read it's somewhere between 2014 and 2016. Which means you should start factoring it into your applications today.<br />
<br />
I'm really excited that APEX 4.2 supports declarative responsive design, but it may be a while before I get to use it. In the mean time, there's no reason why you can't build it into your applications in older APEX versions today. It just requires a little more thought and ingenuity.<br />
<br />
That's part of what I'm presenting on at the <a href="http://www.ausoug.org.au/2020/">AUSOUG 2020 Foresight Conference</a> in Perth next week.<br />
<br />
Here's a couple of screenshots from a very simple responsive application written in APEX 4.0.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7d1hHhrUPZduU5U7jra6RBQStXyiC3gJy4CBOOGKL0eWEHagh73Gqd5l-qSgy5oqn6P_3eb05vrt-gQnQmj11b7okowV7rkY36cAgeY5t2TZYfmL-Qnj0khjZPpqX5-quRAVeiZSfySc/s1600/ScreenShot001.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="495" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7d1hHhrUPZduU5U7jra6RBQStXyiC3gJy4CBOOGKL0eWEHagh73Gqd5l-qSgy5oqn6P_3eb05vrt-gQnQmj11b7okowV7rkY36cAgeY5t2TZYfmL-Qnj0khjZPpqX5-quRAVeiZSfySc/s640/ScreenShot001.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both;">
And here's the same page on a mobile phone</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU3qRbrvyX9I5m557oVJsFNvgzBCr2ZYeG3L31okYVxkk8pqVlnGVQAiQ6IhRIYcLLH-DTBxGgF1XOVQu6WPWenvrwWXegk2K9d-J5kqKlH49sftQC3CwY7jL9sIDgCLIy37kzlbBlCTA/s1600/ScreenShot002.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU3qRbrvyX9I5m557oVJsFNvgzBCr2ZYeG3L31okYVxkk8pqVlnGVQAiQ6IhRIYcLLH-DTBxGgF1XOVQu6WPWenvrwWXegk2K9d-J5kqKlH49sftQC3CwY7jL9sIDgCLIy37kzlbBlCTA/s320/ScreenShot002.png" width="213" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both;">
What's that charming expression about "eating your own dog food".</div>
<br /></div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com5tag:blogger.com,1999:blog-869579236085438805.post-35681687871697848552012-05-31T13:27:00.002+10:002012-05-31T13:29:56.787+10:00Loading images into Oracle XDB<div dir="ltr" style="text-align: left;" trbidi="on">
There are a number of different ways to load images (and other filetypes) into Oracle XDB. You can use FTP, WebDAV or PL/SQL.<br />
<br />
For APEX installations using the Embedded PL/SQL Gateway (EPG) images are loaded onto the server, and then loaded into XDB using PL/SQL script <b>apxldimg.sql</b>. With a couple of minor edits to change destination folders, the apxldimg.sql script can be re-purposed for your own applications.<br />
<br />
The script creates a database directory, and then reads a XML file (default is imagelist.xml) to identify the directories to create and files to upload.<br />
<br />
To generate your own imagelist file, you can use the following Windows batch script from a command window directing the output to a filename.<br />
<br />
imagelist.bat > imagelist.xml<br />
<br />
<br />
<pre class="brush:js" style="background-color: white;">@echo off
@REM *****************************************************************
@REM * File: imagelist.bat
@REM * Author: Mark Lancaster May 2012
@REM * Purpose: For APEX applications using the Embedded PL/SQL Gateway.
@REM Generate XML list of directories and files suitable
@REM for loading into Oracle XDB.
@REM
@REM Refer APEX file "apxldimg.sql" for example usage.
@REM
@REM Direct output to a file e.g. imagelist.xml
@REM *****************************************************************
setlocal enabledelayedexpansion
echo ^<upload^>
echo ^<directories^>
REM list directories with relative path
for /F "tokens=*" %%c in ('dir /ad /b /s') do (
set abspath=%%~fc
call set "relpath=%%abspath:%cd%\=%%"
set relpath=!relpath:\=/!
echo ^<directory^>!relpath!^<^/directory^>
)
echo ^<^/directories^>
echo ^<files^>
REM list files with relative path and leading slash
for /F "tokens=*" %%c in ('dir /a-d /ogn /b /s') do (
set abspath=%%~fc
call set "relpath=%%abspath:%cd%\=%%"
set relpath=!relpath:\=/!
echo ^<file^>^/!relpath!^<^/file^>
)
echo ^<^/files^>
echo ^<^/upload^>
</pre>
<br /></div>Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com2tag:blogger.com,1999:blog-869579236085438805.post-35586666294855567542011-10-03T15:09:00.000+10:002011-10-03T15:10:03.023+10:00Not happy Jan - follow up<div dir="ltr" style="text-align: left;" trbidi="on">
A while ago I posted <a href="http://oracleinsights.blogspot.com/2011/08/apex-41-not-happy-jan.html">Not Happy, Jan!</a> about the changed behavior of list templates for hierarchical lists.<br />
<br />
The changed behavior in APEX 4.1 meant my atypical hierarchical template which produced JSON instead of HTML lists no longer worked.<br />
<br />
I've re-implemented the template to handle APEX 4.1. To see it in action, and how it works go to <a href="http://apex.oracle.com/pls/otn/f?p=PLAYPEN:2025">http://apex.oracle.com/pls/otn/f?p=PLAYPEN:2025</a><br />
<br />
<br /></div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com3tag:blogger.com,1999:blog-869579236085438805.post-36318240393511264032011-09-27T22:05:00.000+10:002016-05-29T12:32:28.879+10:00Dynamic Actions - Changed behavior in APEX 4.1<div dir="ltr" style="text-align: left;" trbidi="on">
APEX 4.1 Dynamic Actions have a changed behavior over 4.0 version when executing a <b>Static Assignment</b> or <b>JavaScript Expression</b> against <b>multiple elements</b>.<br />
<br />
Reading that back makes it sound sufficiently obscure that it may not be an issue for you. Hopefully not, but let's run through the changed behavior, the reasons behind it, how to detect it and how to resolve it.<br />
<br />
Firstly, some background.<br />
As part of a demo on dynamic actions, I set the value of 3 items using a dynamic action, as shown below:<br />
<img alt="apex_4_0.png" src="https://mail.google.com/mail/?ui=2&ik=72c87f2b45&view=att&th=13286997f83f6b83&attid=0.1&disp=emb&realattid=ii_132868d202fa246f&zw" title="apex_4_0.png" /><br />
<br />
This worked perfectly fine until I upgraded to 4.1, where the first items' value was set, and the remaining item values are set to null.<br />
<br />
Comparing the Dynamic Actions JavaScript for setValue (JavaScript Expression) code for 4.0 to 4.1 reveals why the change occurs.<br />
<br />
<div>
<b>apex_dynamic_actions_4_0:</b><br />
<pre class="brush:js">setValue : function(){
...snipped...
} else if (lSetType === 'JAVASCRIPT_EXPRESSION') {
lResult = eval(lJavaScriptExpression);
if (lResult){
this.affectedElements.each(function() {
$s(this, lResult);
});
}
}
},
</pre>
</div>
<b>apex_dynamic_actions_4_1:</b><br />
<div>
<pre class="brush:js">setValue : function(){
...snipped...
} else if (lSetType === 'JAVASCRIPT_EXPRESSION') {
lJSExpression = eval(lJavaScriptExpression);
this.affectedElements.each(function(i){
// Set the value to the first affected element, null the rest.
lValueToSet = (i===0?lJSExpression:'');
$s(this, lValueToSet, null, lSuppressChangeEvent);
});
}
},
</pre>
</div>
<div style="background-color: white;">
As the comment indicates, the changed behavior is by design.<br />
<br />
<span class="Apple-style-span" style="color: #990000; font-size: large;">Reasons behind the change</span><br />
Anthony Rayner from the APEX development team was kind enough to explain the reasoning behind the change:</div>
<blockquote>
<span class="Apple-style-span" style="background-color: white; font-family: "arial" , sans-serif; font-size: 13px;"><span class="Apple-style-span" style="color: #666666;">This is indeed changed behaviour as you describe, introduced in 4.1. I don't know if you've seen this already, but we added a section to the <a href="http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21672/toc.htm#CACFHAFB" saprocessedanchor="true" target="_blank">release notes on just this</a>. I have copied this below for your convenience:</span></span><br />
<blockquote>
<h3 style="background-color: white; font-family: Tahoma, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<span class="Apple-style-span" style="color: #666666;">4.9 Dynamic Action Set Value with Multiple Affected Elements</span></h3>
<div style="background-color: white; font-family: Tahoma, sans-serif; font-size: small; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<span class="Apple-style-span" style="color: #666666;">In dynamic actions, prior to Application Express 4.1, it was possible to use the Set Value action to set multiple Affected Elements, but only to the same value, not different values. In Application Express 4.1, we introduced the following new capabilities to set multiple values from dynamic actions:</span></div>
<ul style="background-color: white; font-family: Tahoma, sans-serif; font-size: small; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<li style="margin-left: 15px;"><span class="Apple-style-span" style="color: #666666;">Action 'Set Value' > Set Type 'SQL Statement' - You can now define a SQL Query to return between 1 and 100 columns, which is used to set the 'Affected Elements' in the order defined (1st column is used to set 1st affected element, and so on). Previously, this only supported querying for 1 column, but could be used to set multiple affected elements to that same 1 column value.</span></li>
<li style="margin-left: 15px;"><span class="Apple-style-span" style="color: #666666;">Action 'Execute PL/SQL Code' - A new 'Page Items to Return' attribute that sets any page item values on the page to their updated values in session state.</span></li>
</ul>
<div style="background-color: white; font-family: Tahoma, sans-serif; font-size: small; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<span class="Apple-style-span" style="color: #666666;">With the introduction of some built-in options to retrieve multiple values, Application Express no longer supports the ability to retrieve 1 value that could then be used to set multiple page items. This was done for simplicity and usability. If you had defined a 'Set Value' dynamic action that set multiple Affected Elements to the same value, here is how you can fix this, according to the 'Set Value' dynamic action's 'Set Type':</span></div>
<ul style="background-color: white; font-family: Tahoma, sans-serif; font-size: small; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<li style="margin-left: 15px;"><span class="Apple-style-span" style="color: #666666;">Static Assignment - Define additional 'Actions' for each Affected Element, setting them all to the same value.</span></li>
<li style="margin-left: 15px;"><span class="Apple-style-span" style="color: #666666;">JavaScript Expression - Define additional 'Actions' for each Affected Element, setting them all to the same value.</span></li>
<li style="margin-left: 15px;"><span class="Apple-style-span" style="color: #666666;">SQL Statement - Alter your SQL Statement such that it selects the same column value, with different column aliases for each Affected Element.</span></li>
<li style="margin-left: 15px;"><span class="Apple-style-span" style="color: #666666;">PL/SQL Expression - Consider changing this over to use the 'Execute PL/SQL Code' action type, in conjunction with the 'Page Items to Return' attribute. The 'PL/SQL Code' would need to ensure the page item's value is updated in session state, such that 'Page Items to Return' returned the updated value.</span></li>
<li style="margin-left: 15px;"><span class="Apple-style-span" style="color: #666666;">PL/SQL Function Body - Consider changing this over to use the 'Execute PL/SQL Code' action type, in conjunction with the 'Page Items to Return' attribute. The 'PL/SQL Code' would need to ensure the page item's value is updated in session state, such that 'Page Items to Return' returned the updated value.</span></li>
</ul>
</blockquote>
<span class="Apple-style-span" style="color: #666666;"><br />
So really this change was prompted by the introduction of support for setting multiple different values from 1 'Set Value > Set Type (SQL Statement)'. This introduced a 'positional' notation of sorts for this set type, whereby affected elements map, by position to values returned from the SQL Statement. We felt with this introduction, that it would be simpler not to continue to support the setting of multiple affected elements to the same value, but rather that if this is desired, that one of the above techniques should be used instead, depending on set type. We felt this in the long run was simpler and more intuitive and that hopefully this would have minimal impact when upgrading from 4.0.</span></blockquote>
<div style="background-color: white;">
Hmm, that makes the reasoning behind the change a lot clearer. I really like the idea of being able to use a single dynamic action to update a bunch of fields at once.<br />
<br />
For example, you could change the shipping method for goods delivery. Using a Dynamic Action with a "PL/SQL Code" action type you could update the shipping charges, subtotal amount, expected delivery date and terms & conditions all at once. Nice!<br />
<br /></div>
<div style="background-color: white;">
<span class="Apple-style-span" style="color: #660000; font-size: large;">How to detect if this impacts you</span></div>
<div style="background-color: white;">
Running the following query in 4.0 or 4.1 will identify any dynamic actions that are affected:</div>
<div style="background-color: white;">
<br /></div>
<pre class="brush: sql">select a.workspace
,a.application_id
,a.application_name
,a.page_id
,a.page_name
,a.attribute_01
,a.dynamic_action_name
,a.action_name
,a.action_sequence
,a.dynamic_action_event_result
,a.affected_elements
from APEX_APPLICATION_PAGE_DA_ACTS a
where a.action_code = 'NATIVE_SET_VALUE'
and a.attribute_01 in ('JAVASCRIPT_EXPRESSION','STATIC_ASSIGNMENT')
and a.affected_elements_type = 'Item'
and instr(a.affected_elements, ',') > 0;
</pre>
<div>
<br />
<span class="Apple-style-span" style="color: #660000; font-size: large;">Adjusting for the changed behavior</span><br />
In my example I already have the value I want to assign, the most appropriate alternative here is to use a JavaScript Expression. Instead of defining a single Dynamic Action to affect multiple items, just create multiple actions each updating a single item as shown below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV_BeL5xbGW7n-yHKnjY-D2hcSrKbht99Hx55FjIxoazn16fYcRorLQ38gsgcS_56RNi4Al0EAk2lswfDVtwn7ZtOUeSPvg5NKeuPiDzqT580t12jdIOgY41GfAw9Bv00jJiihOYuRusE/s1600/screenshot016.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV_BeL5xbGW7n-yHKnjY-D2hcSrKbht99Hx55FjIxoazn16fYcRorLQ38gsgcS_56RNi4Al0EAk2lswfDVtwn7ZtOUeSPvg5NKeuPiDzqT580t12jdIOgY41GfAw9Bv00jJiihOYuRusE/s1600/screenshot016.png" /></a></div>
<br /></div>
</div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com2tag:blogger.com,1999:blog-869579236085438805.post-83400099982911204792011-09-11T22:28:00.000+10:002011-09-11T22:28:31.407+10:00APEX CSS Repository: How to include background images easily using Data URIsOne of the challenges with loading CSS files into the APEX CSS Repository is dealing with references to background images. <br />
In the screenshot from my <a href="http://apex.oracle.com/pls/otn/f?p=playpen">demo site</a>, I'm using a series of background images for the toolbar items.<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj-s7ewKNJnYSxNpkxNJ4ANNp86JB2ArXf5gaZpfj0O23I67yNZQNaY-2scZp20IALIIPc7jB3Ds85k-FG_mV8-I8OzEEs5ccYTq2LHKfb1TDeLyhJ_KAMuaroOVn433iEBiDzXSGY9ic/s1600/screenshot013.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj-s7ewKNJnYSxNpkxNJ4ANNp86JB2ArXf5gaZpfj0O23I67yNZQNaY-2scZp20IALIIPc7jB3Ds85k-FG_mV8-I8OzEEs5ccYTq2LHKfb1TDeLyhJ_KAMuaroOVn433iEBiDzXSGY9ic/s1600/screenshot013.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<br />
Typically when you are hosting your own web-server, your web assets (images, CSS and JavaScript files) are loaded onto the web-server.<br />
The CSS file will contain references to background images like:<br />
<pre class="brush: css">.ico-add {
background-image: url( ../images/icon/add.gif ) !important;
}
.ico-delete {
background-image: url( ../images/icon/delete.gif ) !important;
}
</pre>
<br />
The CSS rules reference the background-image by specifying a relative path to the image location.<br />
<br />
If you loaded the CSS file into the APEX CSS Repository, you need to adjust the path to the image location to use an absolute path like:<br />
<pre class="brush: css">.ico-add {
background-image: url( /ux/playpen/resources/images/icon/add.gif ) !important;
}
.ico-delete {
background-image: url( /ux/playpen/resources/images/icon/delete.gif ) !important;
}
</pre>
<br />
Adding a path alias to your web-server config to resolve the path on the server completes the task:<br />
<pre class="brush: js"><Context path="/ux" docBase="C:\playpen\web\ux" reloadable="true" crossContext="true" />
</pre>
<br />
<span class="Apple-style-span" style="color: #990000; font-size: large;"><b>It's more complicated on Hosted APEX websites</b></span><br />
On a hosted APEX website like <b>apex.oracle.com</b> you don't have access to the web-server so you need to load the files into the APEX Repository. Let's also assume you don't have access to 3rd party web-server to host the files either :)<br />
<br />
So now your images, JavaScript and CSS files are loaded into the Repository and the page templates have been updated to include the JavaScript and CSS files by using the <b>#APP_IMAGES#</b> or <b>#WORKSPACE_IMAGES#</b> substitution tags:<br />
<br />
<pre class="brush: html"><html>
<head>
<title>#TITLE#</title>
#HEAD#
<link rel="stylesheet" href="#WORKSPACE_IMAGES#playpen.css" type="text/css">
</head>
</pre>
Ideally, you would like to use the <b>#APP_IMAGES#</b> or <b>#WORKSPACE_IMAGES#</b> substitution tags within the CSS file:<br />
<pre class="brush: css">.ico-add {
background-image: url( #WORKSPACE_IMAGES#add.gif ) !important;
}
.ico-delete {
background-image: url( &WORKSPACE_IMAGES.delete.gif ) !important;
}
</pre>
But APEX 4.1 and earlier versions do not substitute either the hash tag or substitution variable alternatives shown.<br />
<br />
This leaves two less desirable options:<br />
<ul>
<li>embed the stylesheet directly in the page template, which resolves the substitution tags but adds overhead to every page, or,</li>
<li>replace the #WORKSPACE_IMAGES# reference with it's resolved name in the CSS file<br />
e.g. #WORKSPACE_IMAGES#add.gif becomes http://apex.oracle.com/pls/otn/wwv_flow_file_mgr.get_file?p_security_group_id=441224701954687600&p_fname=add.gif<br />
This makes the application less transportable.</li>
</ul>
<div>
<br /></div>
<div>
<span class="Apple-style-span" style="color: #990000; font-size: large;"><b>Data URIs to the Rescue</b></span></div>
Data URIs provide a way for data to be included inline in a web page as though it was an external resource. The data URI format <a href="http://tools.ietf.org/html/rfc2397">RFC 2397</a> is pretty simple:<br />
<pre style="background-attachment: initial; background-clip: initial; background-color: #efefef; background-image: initial; background-origin: initial; font-family: monospace; line-height: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: hidden; padding-bottom: 1em; padding-left: 1.5em; padding-right: 1.5em; padding-top: 1em;"><code style="font-family: monospace; font-style: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">data:[<MIME-type>][;charset=<encoding>][;base64],<data>
</code></pre>
<br />
Encoding our previous example looks like:<br />
<pre>.ico-add {
background-image: url(data:image/gif;base64,R0lGODlhEAAQAOZ3AHe8YHO6XDSBLIe4cF+eUKDZlq/fppfVi6vUnLTZparUnW61WFaYSJbUi4/CfTmFMH2+Z73ktpbTiXeuY0CJNnnBZNTrz4e4cbXbqI7MhHzDa7jdr1OWRZXUimyqWkKNNrvcr3i0ZIm+eIrCec7pyVCZQXy6ZKbQloXNeZPNiKDZlWirU3DBY0KLOODy3LbdrESMOrLbqInIf42+e53YknG+X3rGa2WrVYHMdXS3XLfgr7PZpZfMhTSCLMXowJTTirfaqrTapqXbm2+1WLXfrKbPlm+1WX25a3WsYT2INGajVmuqWH6yaXyxZzeEL0OPOHqvZUeOPLPdqYO1bZnRi5jMinm9bsvmw37Hb6TOlGmlWH25an28Zn7BabTdqobJejyHMozLgV2cTY7Sg5LFgICzatzx2K/fpX+5bXS3W5jMh4rPfYbJfNfu0oS2bmqsW77itleeRXK5W5jLhpfHhXC4Wf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAHcALAAAAAAQABAAAAengHeCg4SFhnduZU0Th4MXWVcWJBtoWocDIC4RQgVnPiMEhQNAZjQpGQ0dYzpHDIR0bSo/MnZ2KBpYRHGDUy8GYWxWtW8AAVRkUYJMcAdftc92dV0KLYJQUms40LV1EAhJgkhVEjYsN9x1cjwzD4MrXhU1ANwLOUFPhEpbMcV1RkNpdnjoUUhMCAxquJiYk2CJgEMcSjg4UUTEh4eN7sCgAMZJxo+DAgEAOw==) !important;
}
.ico-delete {
background-image: url(data:image/gif;base64,R0lGODlhEAAQAOZwAPaEbPqdi7dKK+6Sj+BpavGdlvCMd/eTfvmSfvnLxPm5r9pkYfJ3Y99qavqjke2TjupcUMZVQsxbTPWmofi2qONuY8tZSbxQMviMdvSOgbxLMNFeU+l/eOl7cL5PNsFNM/3c2PNzXfupnPiUf/qah/q6rulbT/KtqvzHuupmXOqDff3b1PCRf89hU8RQNNpjX+R4cfivpOZaUu5mUvCFcNZgVPjDvvWjn/aroverocxSPPqTf/SinvN5Y++GfuljW/iGcPqrneNrYeh6deBlXPzUzfSgnuJwZrhKKuZWTOJ7dcBTOvaCaPCDe+6MgddiXN1qaPBkVu6KdfnTzPGcluZYTNxkY7pLLtBPPt5qZ8dXRfWvpb5TONddUfOno71RNeZWUO6EffeRfrhOLttpZPWsofGOevS0qttWS+ZZTtljXeddWe5qXuxfVOlZTf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAHAALAAAAAAQABAAAAeigHCCg4SFhnBQVgtqh4MNDzZTCWdHG4cEJyAlDgEiKB0ShQReKyQsZiMIGBQVWoQqRQEHUgC1AD0xWINZW0EGbcDBDBkcS4JkCjs0b8zNbmwFHoIvOUBMzc4pVBeCT05iIW7i4yZNSleDaDhRM+NuVTI3LoQtQmVtEG5pSWA8NUiFLBCZ4OPHmjBGugg4FEHHkAEDYHxY2AgOly8axlTcOCgQADs=) !important;
}
</pre>
<br />
While it looks much more complicated and bloated, Data URIs provide a performance benefit because they reduce the number of HTTP requests, allowing pages to load faster.<br />
<span class="Apple-style-span" style="background-color: white; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;"></span><br />
<div style="margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<br />
Most modern browsers support data URIs:<br />
<ul>
<li>Firefox 2+</li>
<li>Opera 7.2+ - data URIs must not be longer than 4100 characters</li>
<li>Chrome (all versions)</li>
<li>Safari (all versions)</li>
<li>Internet Explorer 8+ - data URIs must be smaller than 32k</li>
</ul>
For IE6 and IE7 you need to use a separate browser dependent CSS file, but the rapid decline in usage for these legacy browsers will remove the issue over time.</div>
<br />
<span class="Apple-style-span" style="color: #990000; font-size: large;"><b>How to encode Data URIs in your CSS file</b></span><br />
I'm using <a href="http://github.com/nzakas/cssembed">CSSEmbed</a> by Nicholas C. Zakas, a Java command line utility that reads in a CSS file, identifies the images referenced within, converts them to data URIs, and outputs the resulting style sheet.<br />
The basic syntax is:<br />
<span class="Apple-style-span" style="background-color: white; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;"></span><br />
<pre style="background-attachment: initial; background-clip: initial; background-color: #efefef; background-image: initial; background-origin: initial; font-family: monospace; line-height: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: hidden; padding-bottom: 1em; padding-left: 1.5em; padding-right: 1.5em; padding-top: 1em;"><code style="font-family: monospace; font-style: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">java -jar cssembed-x.y.z.jar -o <output filename> <input filename></code></pre>
To learn more about the utility see Nicholas's blog on <a href="http://www.nczonline.net/blog/2009/11/03/automatic-data-uri-embedding-in-css-files/">Automatic data URI embedding in CSS files</a>.Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com3tag:blogger.com,1999:blog-869579236085438805.post-70291505494605235012011-08-20T10:34:00.000+10:002011-08-21T17:09:15.870+10:00Oracle Real World Performance DayI've just got back from attending the <b>InSync11 Oracle Real World Performance Day</b> held in Sydney, Australia.<br />
<br />
<span class="Apple-style-span" style="color: #990000;"><b>Absolutely inspiring day</b></span>, with 3 renowned Oracle performance experts in Tom Kyte, Andrew Holdsworth & Graham Wood sharing the stage the entire day, giving their insights from the developer, dba and system architect perspectives.<br />
<br />
The format was very conversational, with a discussion about the principles behind a topic, examples the presenters have encountered and then demonstrations of how changing values or coding approaches impacts performance. There is nothing quite like seeing a live demonstration of row by row processing compared with set based processing, or how setting open_cursors too high can bring down performance.<br />
<br />
Materials from the presentations are available:<br />
<br />
<ul>
<li><a href="http://asktom.oracle.com/pls/apex/z?p_url=ASKTOM%2Edownload_file%3Fp_file%3D9232377018220753074&p_cat=realworld.zip&p_company=822925097021874">Tom Kytes slides</a></li>
<li><a href="https://apex.oracle.com/pls/apex/f?p=44785:24:0::::P24_CONTENT_ID,P24_PREV_PAGE:5565,24">Real World Performance Series Videos</a></li>
</ul>
<div>
The day started with a data warehouse story of an ETL performance issue, with the networking team, dba and BI teams in a room, each saying their piece of the puzzle was fine; the database was idling, network was performing fine and the ETL process hadn't changed, but overall performance had recently degraded...</div>
<div>
<br /></div>
<div>
<span class="Apple-style-span" style="color: #990000;"><b>Deja vu</b></span>, at this point a DBA colleague from work and I looked across at each other - we had been it this exact position a few months earlier. The discussion from the experts around this was insightful; if only they had been present when we were tearing our hair out trying to solve the issue.</div>
<div>
<br /></div>
<div>
The day only got better from there on. Tom even mentioned the <a href="http://joelkallman.blogspot.com/2011/04/application-express-40-and-library.html">APEX 4.0 and Library Cache Latch Contention issue in Oracle DB 11.2.0.2</a>.</div>
<div>
<br /></div>
<div>
If you get the opportunity to attend a <b>Real World Performance Day</b> as they tour the globe, I highly recommend it.</div>
Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com0tag:blogger.com,1999:blog-869579236085438805.post-73798333977803168922011-08-02T10:46:00.000+10:002011-08-02T10:46:55.624+10:00APEX 4.1: Not happy, Jan!<a href="http://www.youtube.com/watch?v=2akt3P8ltLM">"Not happy, Jan!"</a> is a line from a popular TV advertisement that entered the Australian vernacular.<br />
The advertisement showed a manager expressing her displeasure towards the fleeing figure of one of her staff, as she ran having neglected to book an ad in the upcoming year's Yellow Pages.<br />
<br />
While I'm looking forward to using the new APEX 4.1 release and welcome the many new features available, my "Not happy, Jan!" moment came when the recently upgraded <a href="http://apex.oracle.com/">apex.oracle.com</a> website broke my application navigation.<br />
<br />
For a number of years, I've been using hierarchical list templates to output JSON rather than HTML. This has been very useful allowing me to generate data for a JavaScript tree component using the APEX builtin conditional list entries and authorization to control displaying tree nodes.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEZjUlp8nYg9Zv24fi4fKSc0_uuxDvfcTPV5ylBHUCtEXH0fdUtrhzlnnZoIYRIfFbe5KvZVFBEQeOmJZ2m3f7KiXzcDCjyj2G7ChUlJM4gIgt1-2H_HHpQPkOMr4k-EGUca5E5HDirWU/s1600/not_happy.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEZjUlp8nYg9Zv24fi4fKSc0_uuxDvfcTPV5ylBHUCtEXH0fdUtrhzlnnZoIYRIfFbe5KvZVFBEQeOmJZ2m3f7KiXzcDCjyj2G7ChUlJM4gIgt1-2H_HHpQPkOMr4k-EGUca5E5HDirWU/s1600/not_happy.png" /></a></div>
<br />
Changed functionality now means that the "Between Sub List Items" template attribute is not output unless the corresponding "Sub List Template" attribute contains a "</li>" tag.<br />
<br />
Why is this necessary?<br />
I guess its to do with changed functionality to support dynamic SQL lists or mobile themes, but couldn't the developer just leave the template field blank for some templates?<br />
<br />
Its possible to code around the issue using plugin functionality, but for now my site is broken until I update it.<br />
<br />
I think the APEX team are terrific and do a really great job, but perhaps they got this one wrong.Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com5tag:blogger.com,1999:blog-869579236085438805.post-40970448983845548282011-07-18T21:18:00.000+10:002011-07-18T21:18:35.521+10:00Packt Publishing discounts on Oracle books<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.packtpub.com/sites/default/files/oracle%20apex%20ext%20jigsaw2.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://www.packtpub.com/sites/default/files/oracle%20apex%20ext%20jigsaw2.jpg" /></a></div>
Just noticed that Packt Publishing are celebrating the publication of its <a href="http://www.packtpub.com/article/50th-oracle-book-offer">50th Oracle book</a>.<br />
<br />
They are offering some attractive discounts on all their Oracle books.<br />
<br />
<br />
<ul>
<li>Buy any Oracle print book and get 20% off</li>
<li>Buy any Oracle eBook and get 30% off</li>
</ul>
<br />
There is also a competition to win a year's free subscription to their online library, so a good time to pick up a book or two.<br />Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com1tag:blogger.com,1999:blog-869579236085438805.post-22657701823749569112011-06-18T13:04:00.000+10:002011-06-25T21:51:51.888+10:00Updated Code Bundle for "Oracle Application Express 4.0 with Ext JS"For those of you patiently waiting for the updated code bundle, its <a href="https://www.packtpub.com/support?nid=6752">finally available</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLgp9a3oddPQ9HCGzPow9w6uhKA6ro-mQEy0qk8rO8rM03Dx2yPtpm2uCgP7rWmiVSoHDEmkWFptpnFmcqtq5EEWbETtmyr4w6nn_OaMqP1xkos4AdDaIG1kjCZFglfwP2hu1gWHg4UJA/s1600/playpen_app.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLgp9a3oddPQ9HCGzPow9w6uhKA6ro-mQEy0qk8rO8rM03Dx2yPtpm2uCgP7rWmiVSoHDEmkWFptpnFmcqtq5EEWbETtmyr4w6nn_OaMqP1xkos4AdDaIG1kjCZFglfwP2hu1gWHg4UJA/s1600/playpen_app.png" /></a></div>
<br />
The bundle includes the template application shown above.<br />
All you need to do is install the application, including the supporting objects, and then upload the web assets and Ext JS library to your web server.<br />
<br />
When you download the code, just extract the highlighted code bundle, the other folder is the original code bundle which can be discarded (I don't know why they included it).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijhpIQv-yqzGzgrNsjPyT6vFtsdCsk0QrrUVkxAF9uUSpffdgW251rckEBxf1FKgNdP2v1_Y6XzOPcEuxyWhu1UjmEJIS5kVh3hHf3E8SEAJ7Y2eRoIm4cL-ApQr3OfeSH6c5sFs05cWY/s1600/screenshot003.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijhpIQv-yqzGzgrNsjPyT6vFtsdCsk0QrrUVkxAF9uUSpffdgW251rckEBxf1FKgNdP2v1_Y6XzOPcEuxyWhu1UjmEJIS5kVh3hHf3E8SEAJ7Y2eRoIm4cL-ApQr3OfeSH6c5sFs05cWY/s1600/screenshot003.png" /></a></div>
<br />
One last change...<br />
<br />
Add the following CSS rules to the playpen-book.css file:<br />
<br />
<pre class="brush: css">.ux-table input[type="text"] {
background-color: #FFFFFF;
background-image: url(/ux/extjs/resources/images/default/form/text-bg.gif);
background-repeat: repeat-x;
border: 1px solid #B5B8C8;
padding: 2px 3px 0;
line-height: normal;
}
.ux-table input[type="text"] {
height: 18px;
vertical-align: middle;
}
</pre>
<br />
Gremlins, they're everywhere.Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com10tag:blogger.com,1999:blog-869579236085438805.post-46269903750478672912011-03-31T20:56:00.000+10:002011-03-31T20:56:40.917+10:00Book Released: Oracle Application Express 4.0 with Ext JS<table><tbody>
<tr><td><a href="https://www.packtpub.com/oracle-application-express-4-0-with-ext-js/book" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://www.packtpub.com/sites/default/files/Oracle%20Apex%204.0%20with%20Ext%20JS.jpg" width="276" /></a>
</td><td valign="top">I'm very happy to announce that my book <a href="https://www.packtpub.com/oracle-application-express-4-0-with-ext-js/book">Oracle Application Express 4.0 with Ext JS</a> is now officially published.<br />
<br />
A printed copy turned up in the mail recently, and I'm very pleased with the final result.
<br />
<br />
<br />
<div style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
The <a href="https://www.packtpub.com/toc/oracle-application-express-40-ext-js-table-contents">table of contents</a> for the book as well as a <a href="https://www.packtpub.com/oracle-application-express-4-0-with-ext-js/book">sample chapter</a> is available on the Packt website.</div>
<div>
<br /></div>
</td></tr>
</tbody></table>
<div>
<br />
<br />
<a href="http://sueharper.blogspot.com/">Sue Harper</a> blogged about the three phases of book writing:<br />
<br />
<ul>
<li>before the book - Seems like a good idea</li>
<li>during the book - Not a good idea, will this ever end? Who's idea was this anyway?</li>
<li>after the book - That was easy ... what's next?</li>
</ul>
<br />
After spending most evenings and weekends writing until midnight for the last 15 months, I've definitely done the first two phases, but haven't quite reached the last phase yet.<br />
<br />
<span class="Apple-style-span" style="color: #660000; font-family: Verdana, sans-serif;"><b>Still to do</b></span><br />
The code bundle available to download on the Packt website includes code from each of the chapters.<br />
I will be updating it in the next couple of weeks to:<br />
<br />
<ul>
<li>include the Ext JS library, so the stand-alone examples work when the bundle is unzipped</li>
<li>add the APEX TEMPLATE application, CSS, JavaScript and image files used in the book</li>
<li>include a few extras that didn't make it into the book.</li>
</ul>
<div>
I'll write another blog post when the updated code bundle is available.</div>
<div>
<br /></div>
<div>
Then after that my demo site definitely needs an overhaul, it's looking sadly neglected...</div>
</div>Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com26tag:blogger.com,1999:blog-869579236085438805.post-46374658800159514882011-03-10T23:50:00.000+10:002011-03-10T23:50:36.620+10:00Bookmarklets to extend APEX 4.0APEX allows you to add help text for your pages at a page level, and also an item level.<br />
Your only given a plain textarea to add your text, as you can see in the following screenshot.<br />
<b><span style="color: #cc0000;">Hint APEX team</span></b>: can we change this in the next version?<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW-0tJYmulKK0BQ5g7fjxImaIM4RK2AwPdVvUAW2AGAH7T5TW-lxhCyj1WuO4Q4I626rUToM1b-_1mWYCnSKbYzp1QvUE9yhNcJzCcKaRFkpTax1TIYneUQWRW58c5UpTp725OyO4fn7U/s1600/screen1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW-0tJYmulKK0BQ5g7fjxImaIM4RK2AwPdVvUAW2AGAH7T5TW-lxhCyj1WuO4Q4I626rUToM1b-_1mWYCnSKbYzp1QvUE9yhNcJzCcKaRFkpTax1TIYneUQWRW58c5UpTp725OyO4fn7U/s1600/screen1.png" /></a></div>
<br />
One way to replace the textarea with the APEX Rich Text Editor is to use a <a href="http://en.wikipedia.org/wiki/Bookmarklet">Bookmarklet</a>, which allows you to embed JavaScript code in a browser bookmark.<br />
Then simply click the bookmarklet to convert the textarea to a Rich Text Editor when needed:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNfckIfiMmhe20NU-MQX4kVTFrJitrrkaL8haiRYJlBq1eXZ9-uzqVFfEUStIisg5Xbs8EgImWCQa-NCT-IWiFhmGaIrC3hDSs3ovqQPtd23tWq2ej8kF_LPAunWYVgFFdC5tva3lrpY0/s1600/screen2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNfckIfiMmhe20NU-MQX4kVTFrJitrrkaL8haiRYJlBq1eXZ9-uzqVFfEUStIisg5Xbs8EgImWCQa-NCT-IWiFhmGaIrC3hDSs3ovqQPtd23tWq2ej8kF_LPAunWYVgFFdC5tva3lrpY0/s1600/screen2.png" /></a></div>
<br />
<br />
Simply drag the following links onto your browser bar to save the bookmarklets:<br />
<ul>
<li><a href="javascript:(function(){function%20getScript(url,success){var%20script=document.createElement('script');script.src=url;var%20head=document.getElementsByTagName('head')[0];var%20done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){done=true;success();}};head.appendChild(script);}function%20run(){apex.widget.ckeditor3("#F4000_P4301_HELP_TEXT",{"language":"en","toolbar":"Basic","toolbarStartupExpanded":true,"skin":"kama"});}if(!window.CKEDITOR){getScript('/i/libraries/ckeditor/3.2/ckeditor.js',function(){run();});}else{run();}})();">Page Level Help</a></li>
<li><a href="javascript:(function(){function%20getScript(url,success){var%20script=document.createElement('script');script.src=url;var%20head=document.getElementsByTagName('head')[0];var%20done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){done=true;success();}};head.appendChild(script);}function%20run(){apex.widget.ckeditor3("#F4000_P4311_ITEM_HELP",{"language":"en","toolbar":"Basic","toolbarStartupExpanded":true,"skin":"kama"});}if(!window.CKEDITOR){getScript('/i/libraries/ckeditor/3.2/ckeditor.js',function(){run();});}else{run();}})();">Item Level Help</a></li>
</ul>
The source code for the Page Level Help bookmarklet is:<br />
<pre class="brush: js">javascript: (function(){
function getScript(url, success){
var script = document.createElement('script');
script.src = url;
var head = document.getElementsByTagName('head')[0];
var done = false;
/* Attach handlers for all browsers*/
script.onload = script.onreadystatechange = function(){
if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
done = true;
success();
}
};
head.appendChild(script);
}
/* Code to execute after script loaded */
function run(){
apex.widget.ckeditor3("#F4000_P4301_HELP_TEXT", {
"language": "en",
"toolbar": "Basic",
"toolbarStartupExpanded": true,
"skin": "kama"
});
}
/* Main */
if (!window.CKEDITOR) {
getScript('/i/libraries/ckeditor/3.2/ckeditor.js', function(){
run();
});
}
else {
run();
}
})();
</pre>
<br />
All we are doing is adding the ckeditor.js file when it's not present, and then converting the specified page item to use the basic CKEditor. <br />For the advanced version replace <b>"toolbar": "Basic"</b> with <b>"toolbar" : "Full"</b>.<br />
<br />
You may need to adjust the item reference if your not using Application Express 4.0.2.00.07, or a translated version.<br />
<br />Mark Lancasterhttp://www.blogger.com/profile/06316329564169609358noreply@blogger.com2