Quantcast
Channel: ODTUG Aggregator
Viewing all 2258 articles
Browse latest View live

Build Options on Report Columns

$
0
0
Let's say you're experimenting with a report (IR or classic) column and you would only like it to appear in you development environment.

What options do you have for hiding that column in other environments?

  1. Don't migrate the change - use your source control processes to only move it when it's ready. This isn't always practical, nor the intent, particularly since you can programatically set the status.

  2. Add server condition on database name - we can use an expression such as
    sys_context('userenv','db_name') = 'dev'This isn't bad, I have a common function I call for this sort of thing. But it's quite granular.

  3. Build Options - under-utilised silent catalyst that can help us turn a group features off/on at the flick of a switch.
In Oracle APEX 5.1, Build Options are an attribute of each column, in addition to just about every other component in the builder.

APEX 5.1 Column Attributes

Prior to APEX 5.1, column definitions were one of few components that don't have a declarative option. However, we still have the magic of dictionary views.

Pre 5.1 Build Option on Column
So we can query the application's build options and determine if the relevant record is switched on.
select null
from apex_application_build_options
where build_option_name like 'My build option'
and build_option_status = 'Include'
and application_id = :APP_ID
Again, you could put this in a re-usable function/view, not that you would need it often.

Neat.

Oracle APEX Security: Where Do I Start?

$
0
0

Oracle APEX Security: Where Do I Start?

When someone asks if an application is secure, it seems like a pretty straightforward question and many would expect a straightforward answer: yes or no. For any developer working with any technology stack, the reality implied by that question is all too clear. It is often quite a complicated question and possibly a loaded one at that. This is especially true for web based applications. There are multiple layers to consider, such as the database, front-end (web server) and platform or frameworks to consider.  Then, there is the application in question itself. So when someone asks if an Oracle APEX  application is secure, here are some of the aspects to that question that should probably be addressed and explained, as well as some tips and suggestions on how to go about uncovering any potential flaws in the system.

Securing the APEX Application

First and foremost, most inquirers are asking about the application itself and nothing backend or tech stack related. At this level, there are quite a few things developers can do to ensure their application is secure as well as to reassure their customers. Included with Oracle APEX is the APEX advisor which can be used to scan the app. It will report any errors, bad practices and security issues it comes across. Then there are third-party tools like APEXSec which is used at Oracle and we use it at Insum as well. It will also scan the target application, much like the APEX advisor, and report any and all security flaws in a very thorough manner. Once these tools or alternatives have been used, the results can be used to both correct any issues and to reassure the customer of the hardened nature of the app.

 

securing-the-apex-application

 

Obscuring the Database

After securing the application, it will be time to tackle two other major aspects to application security: data and access to the application (or the database and the web-server). For the database, suffice it to say that the best practices should be implemented, such as encrypting or hashing sensitive data, using up to date algorithms and protecting any and all keys related to the process.

Another important aspect to this facet is to ensure permissions in the database are open only enough for the proper functioning of the application and no more. While this is a very simple and shallow answer to a rather complex and deep aspect to the security question, it is important to remember that the database itself should be hidden away in a private network with no way to access it outside that network. Proper care should also be taken to make sure that the server on which it resides is hardened as well. Other aspects in the context of Oracle APEX are not as critical, since most data breaches would only be possible or practical via the application itself with flaws such as SQL injection, which our first point should have uncovered in the first place. But, one can never be too careful when it comes to securing their data.

Protecting the Middle-Tier

After the database, there is the front-end. In an ideal architecture, the front-end would actually include a web tier, acting as a reverse proxy located in some sort of DMZ in a private network, and an app tier hidden behind it in the same private network as the database. As you may be aware, APEX can be accessed via a few different servers. The options presented to us by Oracle are the EPG or embedded PL/SQL Gateway, OHS or Oracle HTTP server with mod_plsql and finally we have ORDS or the Oracle RESTful data Services app. ORDS is the Oracle recommended solution and for production environments only OHS and ORDS should ever be considered, both for performance and security. Since version 4.2 of APEX and version 2.0 of ORDS, RESTful services have been an integral part of what makes APEX such a powerful and attractive tool. So for that reason and because it is the recommended solution by Oracle, we will be looking at ORDS in terms of security concerns at this level of the stack. ORDS can be deployed in a container (app-server) or can be run in stand-alone mode. Again, for production, standalone should not be used. So finally we are left with deploying ORDS in an app-server, of which the supported solutions are Glassfish, Tomcat and of course Weblogic.

Security wise all three share the same concerns and no major differences among the three require special attention. At this level, encrypting the connections using HTTPS (SSL) should be a top priority as well as following some standard hardening practices relating to whatever flavour of app-server was chosen. Those steps being things like removing or changing any default index pages, and closing access to any admin pages etc… ORDS itself comes quite solid out of the box, but making sure the print debug to screen option is set to false (which is the default value..didn’t mean to make you panic!) and all the other options are set up to your needs obviously needs to be done.

 

securing-the-apex-web-server

 

Locking Down the Web Server

Finally, we come to the web-server. This machine is the door through which all traffic must pass when coming from the internet to access your application. It is both the hardening of the application itself, which we discussed first, and this step which probably have the most impact on securing your application. The reverse proxy must filter the requests discarding anything not white listed. It should encrypt all communications with SSL (HTTPS) and it should contain as little information as possible about anything in the backend.

 

apache server project

 

Following hardening guidelines here is most important. Having a server with Apache correctly set up with a minimum encryption key of SHA-256 for the HTTPS certificate is of utmost importance. This is the front line to your network and the gatekeeper for all communications between you and your customers or users. The good news is that hardening guides for Apache and other web servers are a plenty and with minimum effort a great deal of security can be applied.

Those are the four areas to cover in order to secure an APEX application summarized, and although this post does not go into details, I hope it can help to create a roadmap to a better more secure APEX application deployment and infrastructure.

The post Oracle APEX Security: Where Do I Start? appeared first on Insum.

Open a windows directory from inside your APEX application (IE, Firefox, Chrome)

$
0
0
Back in 2010 I wrote about a solution for IE only: Open Windows directory with APEX (IE only)

The request itself appears at least once a year in one of my projects.
Nowadays I do not propose the workaround from 2010. It just doesn't fit in modern browsers.

Today I got another request to open a directory and this time I searched for 10 minutes and found a suitable solution working in IE, Firefox and Chrome.

As in 90% of each cases Stackoverflow showed me the way how I could to do it:
Stackoverflow Question: Open local folder from link

This solution creates a downloadable URL file including the target directory. The browser allows you to open directories from local files.

Unfortunately in Firefox and Chrome you need to download the LINK first and then execute it.



In IE you can open it directly.



This workaround is 100% HTML only and it is easy to integrate into APEX:
DECLARE
L_BLOB BLOB;
L_CLOB CLOB;
L_DEST_OFFSET INTEGER := 1;
L_SRC_OFFSET INTEGER := 1;
L_LANG_CONTEXT INTEGER := DBMS_LOB.DEFAULT_LANG_CTX;
L_WARNING INTEGER;
L_LENGTH INTEGER;
BEGIN

-- create new temporary BLOB
DBMS_LOB.CREATETEMPORARY(L_BLOB, FALSE);

-- Create file source including the target directory
SELECT '[InternetShortcut]'||CHR(13)||'URL=file:///D:' INTO L_CLOB FROM DUAL;

-- tranform the input CLOB into a BLOB of the desired charset
DBMS_LOB.CONVERTTOBLOB( DEST_LOB => L_BLOB,
SRC_CLOB => L_CLOB,
AMOUNT => DBMS_LOB.LOBMAXSIZE,
DEST_OFFSET => L_DEST_OFFSET,
SRC_OFFSET => L_SRC_OFFSET,
BLOB_CSID => NLS_CHARSET_ID('WE8MSWIN1252'),
LANG_CONTEXT => L_LANG_CONTEXT,
WARNING => L_WARNING
);

-- determine length for header
L_LENGTH := DBMS_LOB.GETLENGTH(L_BLOB);

-- first clear the header
htp.flush;
htp.init;

-- create response header including the filename ending with .url
OWA_UTIL.MIME_HEADER( 'application/internet-shortcut', FALSE);
htp.p('Content-length: ' || L_LENGTH);
htp.p('Content-Disposition: inline; filename="URIShortcut.url"');
htp.p('Set-Cookie: fileDownload=true; path=/');

OWA_UTIL.HTTP_HEADER_CLOSE;
-- download the BLOB
WPG_DOCLOAD.DOWNLOAD_FILE( L_BLOB );

-- stop APEX
APEX_APPLICATION.STOP_APEX_ENGINE;

END;

APEX 4 to APEX 5 Migration Tip: Tree Regions

$
0
0
If you're moving your applications to APEX 5 you've probably read about deprecated features. One of the notes there is about the deprecation of jsTree Region.

It doesn't matter if you've turned on legacy JavaScript or jQuery Migrate you'll still get some errors by using old implementation so you have to move them to new APEX tree.

Most probably you'll get error in JS Console like this one:


The reason of this is that $.curCSS() method is removed in jQuery 1.8 and it's not added into jQuery Migrate library.

The next thing you'll probably notice is that there's no icons in new tree.

Old legacy tree:


New APEX tree:


FontAwsome Tree Icons


You can easily use FontAwsome icons there. To do this set Icon Type property to fa in Tree Attributes:


Next step is to modify SQL query of Tree region and set icon column to fa-folder-o



If you want a bit more, for example to have special icon for expanded folder you have to add additional CSS to you page (preferably to CSS file):


.a-TreeView.is-collapsible>.a-TreeView-content>span.fa:before{
content:"\f115"
}


After those modifications your tree should look like this:



APEX Tree Icons


There's also a way to use APEX font icons for the new APEX tree. Unfortunately, CSS classes are not included by default so you have to add it manually.

In case that you want to use APEX font icons you have to set Icon Type property to a-Icon:


Also you have to modify CSS class in icon column of source SQL query to icon-tree-folder:


The last thing is to add CSS classes (preferably to CSS file and not to inline CSS code page property):

/* line 583, ../scss/core/IconFont.scss */
.a-Icon.icon-tree-folder:before,
.a-TreeView-node.is-expandable>.a-TreeView-content>.a-Icon.icon-tree-folder:before {
content:"\e0da";
}

/* line 588, ../scss/core/IconFont.scss */
.a-Icon.icon-tree-folder-open:before,
.a-TreeView-node.is-collapsible>.a-TreeView-content>.a-Icon.icon-tree-folder:before {
content:"\e0d7";
}

With APEX font icons your tree should look like this:

Returning selected node value dynamically


If you need to return node value dynamically without submitting page the easiest way to do it is to call $s function inside your SQL query:



Expand tree on page load

To expand tree on page load you have to call: 


apex.widget.tree.expand_all('treeID');

where treeID is value of attribute property Static Tree ID of tree region.
Just put this code into page property Execute when Page Loads.

Edit: You can expand/collapse tree declaratively by using Dynamic Actions Expand/Collapse tree.

Enjoy!

Tested on APEX 5.0.4.00.12 



Vancouver Oracle Developer Day Highlights

$
0
0

Vancouver Oracle Developer Day Highlights

On October 27th, we hosted a Vancouver Oracle Developer Day in conjunction with the BC Oracle Users Group (BCOUG) and ODTUG.

Our goal was to bring some well-known speakers to Vancouver to talk about the latest trends and tools for developing with the Oracle Database and Oracle Cloud, and to raise awareness around some of powerful application development tools that are becoming more and more popular, such as Oracle Application Express (APEX) and the Oracle JavaScript Extension Toolkit (JET). It’s hard to always keep on top of the latest developments within the Oracle stack, and we wanted to give people an easy way to get up to speed quickly.

The event turned out to be even better than we expected. Over a 100 people in attended, and we received a ton of positive feedback. There was a wide range of topics covering the full development stack, from the front end to the back end, and so there was something for everyone.

vancouver-oracle-developer-apex

 

After introductions from BCOUG and ODTUG, Peter Watkins, Executive Director of Commercialization Initiatives with the Office of the CIO of the BC Government, kicked things off with an overview of the BC Developers’ Exchange . It’s a new initiative to explore the idea of enabling an ecosystem of co-creation, commercialization and rapid adoption of innovation between the B.C. technology industry and the B.C. public sector. The goal is to make it easier for the B.C. public sector – provincial ministries, Crown agencies and municipalities – to work with and leverage the expertise of the tech sector, by creating a “marketplace” that matches technology entrepreneurs with specific public sector technology needs. And the good part? Developers can contribute and get paid for their work due to a streamlined procurement process developed as part of the initiative.

Next, Frank Hoogendoorn, VP of Business Development at Insum, gave a short talk highlighting the importance of speed when it comes to developing and deploying technical solutions in order to stay relevant and ahead of the competition.  Expanding on the idea of Bimodal IT developed by Gartner, Frank stressed the need for organizations to develop rapid IT solution delivery capabilities, and to explore the tools that enable quick application development and deployment, such as Oracle APEX.

vancouver-oracle-apex-bimodal-it

 

We then had presentations by David Peake, Product Manager of Oracle APEX, who highlighted a few of the many great new features that will be part of the APEX 5.1 release (we all can’t wait for editable data grids), and by Dan McGahn who spoke about integrating Oracle with Node.js, which opens a whole world of new possibilities. Martin D’Souza finished the morning session highlighting many of the great developer tools available in Oracle Open Source Utils, and new open source package developed by the Oracle Community, which is guaranteed to save you a ton of time as an Oracle developer.

During the lunch session, Adrian Png and Monty Latiolais demonstrated how quickly a very useful, real world application could be built with Oracle APEX.  Using Open511 data collected by DriveBC as part of the DataBC initiative, Monty and Adrian built an APEX application that leveraged LeafletJS, an open source JavaScript library for mobile friendly interactive maps, to show all the traffic incidents recorded by DriveBC. In addition to being able to mine the data with an Interactive Report, users could also submit their own traffic incidents.  The application will actually be made public soon, along with a blog post describing in detail how it was built. You’ll even be able to download all the source code, so stay tuned!

vancouver-oracle-apex-5.1

 

In the afternoon session, we heard about some of the new features of Oracle 12cR2 from Liron Amitzi from DBAces and Monty Latiolais from Insum, and then learned all about Oracle JET from John Brock, the Senior Product Manager for Oracle JET  who drove up from Seattle to spend the day with us. Both sessions sparked a lot of interest and some great questions from the audience.

We finished the afternoon session with a series of “Lightning Talks”, where a number of APEX applications were shown, which demonstrated the wide variety of applications that could be developed with Oracle APEX, from street mapping to visio like workflow mapping, and even the 3D visualization of commercial office space.

oracle-developer-day

The day ended with a happy hour, where we all could relax a little and talk about what we learned. All in all, it was a great day, and we’re looking forward to hosting similar events in other cities. So, stay tuned!

We asked the speakers and the people who attended from Insum to share a few thoughts:

Patrick Cimolini

The day was a great success. The formal presentations were informative and entertaining; applause to the presenters. The Oracle JET presentation introduced me to a product that I will need very much in the near future. The informal networking was fun, warm, and friendly; meeting new friends is always a welcome addition to my life. Sharing technical anecdotes over coffee is both fun and a great way to learn about the hard-nosed realities of our business. The event was well organized and I look forward to a repeat in the near future.

Adrian Png

The biggest highlight was the huge turnout and the positive feedback we got from the attendees about the event. I have been privileged to work with organizations that value training and networking with the community. I have had the opportunity to travel and meet experts in the field at conferences, but I know, not everyone gets that chance. And so I am grateful that we managed to have a great list of speakers visit us in Vancouver, to share recent developments and their knowledge. It was also an opportunity for our attendees to network with the experts, but also for us Insum-ers in Vancouver to meet them. I was also pleasantly surprised that we have folks coming in from as far as Kamloops and Victoria joining us for the jam-packed, one-day event. This is only the beginning and I certainly look forward to help build a strong Oracle Developer community in British Columbia!

Frank Hoogendoorn

It’s no secret that I’m a big fan of Oracle APEX, so the highlight of the day for me was seeing the “light switch on” for many people who saw for the first time just how much you can do with APEX in such a short period of time. Why am I a big fan of APEX? Because it helps you go fast. To quote Dave Girouard, the former President of Google Enterprise Apps, “…speed is the ultimate weapon in business. All else being equal, the fastest company in any market will win. Speed is the defining characteristic – if not the defining characteristic – of any leader in virtually every industry you look at.”  For companies with an Oracle database, APEX provides a very easy way to bring rapid application development and deployment capabilities to the organization. So, it was a pleasure to hear people talk through the possibilities of how they could use APEX once they saw what what the tool could do.

Martin D’Souza

It was great to see so many people at the Vancouver Oracle Dev Day. What was even better was that we got to introduce APEX to many people. It seems as though not many people in the audience used APEX and I hope that after the day they were convinced that it is a great tool and something to start looking into. I had several questions pertaining to working in teams, version control, and release processes for APEX. We will be blogging about all these topics soon so stay posted!

Monty Latiolais

It was certainly a thrill to be able to participate in the Vancouver Oracle Developer Day in part because it was such a diverse crowd. In attendance, we had developers, DBA’s, business users, and everything in between. That made for great questions and great conversation. As much as we’re able to do remotely these days, there’s still nothing like meeting and networking face to face.

Dan McGhan

Presenting at the Oracle Developer Day was a lot of fun! The venue, the Cinematheque, set the stage for something different (and some huge slides too). I spoke about node-oracledb, the glue between Node.js and Oracle Database while others covered topics from DBA work to front-end JavaScript development – there was truly something for everyone. It was also great to see so much open source technology included, from node-oracledb & Oracle JET to some of the many projects that are part of OraOpenSource.

David Peake

I thought the Oracle Developer Day put on by Insum in Vancouver was a huge success. For a first time event getting over 100 people from numerous companies and diverse experience with Application Express was excellent. There was a nice variety of sessions which ensured there was something for every attendee to learn more about. Great organization, great turn out, great content meant every one went home happy!

Liron Amitzi

Oracle Developer Day was the first full day conference I spoke at here in Vancouver. Being part of BCOUG, it was a pleasure to see all these people come to hear the technical content the conference offered. Even though I’m new here, I realized that I’m starting to know more and more people and it was great to talk to everyone. The sessions were excellent (those that I understood anyway) and it was a great fun to meet everyone including Frank, Martin, Monty, Adrian, Dan, Peter and David (some for the first time). I know how difficult it is to organize such a conference and the guys at Insum did an excellent job. For me, the highlight of the day was just all the chats I had during the day and after the conference at the pub (even though I had to sometimes defend the DBAs out there). It was simply a great combination of fun and knowledge with great people!

The post Vancouver Oracle Developer Day Highlights appeared first on Insum.

DOAG 2016 und weitere APEX Events im November

$
0
0
Das größte deutschsprachige Oracle Event des Jahres steht vor der Tür.
Die DOAG Konferenz vom 15. bis zum 18.11.2016.

Wie schon in den letzten Jahren, bin ich auch dieses Jahr wieder mit dabei.
Mein Vortrag zum Thema "SVG in APEX" findet am Mittoch dem 16.11. um 13:00 Uhr statt.


Den Vortrag halte ich nicht allein. Sebastian Reinig (Syntegris) ein sehr talentierter junger APEX-Consultant hält den Vortrag mit mir Zusammen. Sebastian hat auf Grundlage meines RaphaelJS Vortrags aus dem Jahr 2014 eine technische Erweiterung geschrieben, die unbedingt auf der DOAG gezeigt werden muss. Der Vortrag richtet sich an alle Entwickler die aus Ihrer individuellen Geschäftsanwendung die User Experience (UX) auf ein neues Level heben wollen. In diesem Vortrag werden anhand realer Business-Cases die Möglichkeiten von SVG aufgezeigt. Wichtig war vor allem die Betrachtung aus Sicht Aufwand und Nutzen.

An dieser Stelle möchte ich auch gern auf den MT AG Vortrag zum Thema "Der APEX GENERATOR" verweisen. Der rein marketingtechnisch schon richtig was her macht! :)



Meine Partner von APEX-EXPERTS sind natürlich auch dabei. Markus Hohloch hält einen Vortrag zu Jasper Reports und Denes Kubicek zu Maps in APEX.

Ich persönlich freue mich auch auf die internationalen Gäste: Mathias Magnusson, Ilmar Kerm und Joel Kallman mit denen ich unbedingt ein APEX Event im Norden Europas besprechen muss.

Die APEX Open Mic Night findet wie gewohnt wieder am Mittwochabend statt, wo wieder spannende und lustige Kurzvorträge zu erwarten sind aus der Community.

Wusstet ihr, dass sich Studenten ebenfalls noch bei der diesjährigen DOAG bewerben können?

Nach der DOAG ist vor dem APEX Meetup Frankfurt.
Dieses findet das nächste Mal bei der DB Systel im Silberturm statt.
Nur mal so: Die DB Systel hat ein fast 20 köpfiges APEX Team rund um kleine und mittelgroße Projekte.

Jeder ist willkommen und ich halte auch einen Vortrag der als Diskussionsgrundlage zum Thema "Dashboards" dienen soll.

Auch mal wichtig zu erwähnen: Moritz (MT AG) und Sabine (its-people) organisieren dieses tolle lokale Event immer und immer wieder.


Und zu guter Letzt noch ein mal der Hinweis auf den APEX 5 Best Practices Kurs von Denes und Dietmar vom 21-23.11.2016. Ein Kurs den ein jeder APEX Neuling besucht haben sollte.


Wir sehen uns auf der DOAG und hoffentlich auch in meinem Vortrag...



Oracle Cloud – Backup Software Appliance Part 2 of 2

$
0
0

In the first part of this series, we went through installing Oracle Linux 7 Update 2. In this part of the series, we will configure the Oracle Linux UEK OS, configure the docker image, and configure OSCSA (Oracle Storage Cloud Software Appliance).

First add the UEKR4 channel to the /etc/yum.repos.d/ repository:

[ol7_UEKR4]
name=Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/UEKR4/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

We need to boot the Linux Host Using the UEK4 Kernel. The UEK version that ships from Oracle Linux 7 update 2 is UEK 3 Release 8.

We need to remove the UEK 3.8 first. You will encounter errors about the packages that the 3.8 kernel is dependent on. If you see such errors similar to what you see below, you can ignore them.

[root@oscsa yum.repos.d]# rpm -qa |grep -i kernel
kernel-uek-firmware-3.8.13-98.7.1.el7uek.noarch
kernel-uek-3.8.13-98.7.1.el7uek.x86_64
kernel-tools-3.10.0-327.el7.x86_64
kernel-3.10.0-327.el7.x86_64
kernel-tools-libs-3.10.0-327.el7.x86_64
abrt-addon-kerneloops-2.1.11-34.0.1.el7.x86_64
[root@oscsa yum.repos.d]# rpm -e kernel-uek
warning: file /lib/modules/3.8.13-98.7.1.el7uek.x86_64/modules.symbols.bin: remove failed: No such file or directory
warning: file /lib/modules/3.8.13-98.7.1.el7uek.x86_64/modules.softdep: remove failed: No such file or directory
warning: file /lib/modules/3.8.13-98.7.1.el7uek.x86_64/modules.devname: remove failed: No such file or directory
warning: file /lib/modules/3.8.13-98.7.1.el7uek.x86_64/modules.dep.bin: remove failed: No such file or directory
warning: file /lib/modules/3.8.13-98.7.1.el7uek.x86_64/modules.builtin.bin: remove failed: No such file or directory
warning: file /lib/modules/3.8.13-98.7.1.el7uek.x86_64/modules.alias.bin: remove failed: No such file or directory
[root@oscsa yum.repos.d]# rpm -qa |grep -i kernel
kernel-uek-firmware-3.8.13-98.7.1.el7uek.noarch
kernel-tools-3.10.0-327.el7.x86_64
kernel-3.10.0-327.el7.x86_64
kernel-tools-libs-3.10.0-327.el7.x86_64
abrt-addon-kerneloops-2.1.11-34.0.1.el7.x86_64

[root@oscsa yum.repos.d]# rpm -e kernel-uek-firmware-3.8.13-98.7.1.el7uek.noarch

Now we can install UEK 4:

[root@oscsa yum.repos.d]# yum install kernel-uek
Loaded plugins: langpacks, ulninfo
ol7_UEKR3                                                                                                                         | 1.2 kB  00:00:00     
ol7_UEKR4                                                                                                                         | 1.2 kB  00:00:00     
ol7_latest                                                                                                                        | 1.4 kB  00:00:00     
(1/2): ol7_UEKR4/x86_64/updateinfo                                                                                                |  32 kB  00:00:00     
(2/2): ol7_UEKR4/x86_64/primary                                                                                                   | 8.9 MB  00:00:03     
ol7_UEKR4                                                                                                                                        208/208
Resolving Dependencies
--> Running transaction check
---> Package kernel-uek.x86_64 0:4.1.12-61.1.16.el7uek will be installed
--> Processing Dependency: kernel-firmware = 4.1.12-61.1.16.el7uek for package: kernel-uek-4.1.12-61.1.16.el7uek.x86_64
--> Processing Dependency: dracut-kernel >= 033-360.0.3 for package: kernel-uek-4.1.12-61.1.16.el7uek.x86_64
--> Processing Dependency: linux-firmware >= 20160604-44.git57b649d9.0.2 for package: kernel-uek-4.1.12-61.1.16.el7uek.x86_64
--> Running transaction check
---> Package dracut.x86_64 0:033-359.0.1.el7 will be updated
--> Processing Dependency: dracut = 033-359.0.1.el7 for package: dracut-network-033-359.0.1.el7.x86_64
--> Processing Dependency: dracut = 033-359.0.1.el7 for package: dracut-config-rescue-033-359.0.1.el7.x86_64
---> Package dracut.x86_64 0:033-360.0.3.el7_2.1 will be an update
---> Package kernel-uek-firmware.noarch 0:4.1.12-61.1.16.el7uek will be installed
---> Package linux-firmware.noarch 0:20150904-43.git6ebf5d5.0.1.el7 will be updated
---> Package linux-firmware.noarch 0:20160604-44.git57b649d9.0.2.el7 will be an update
--> Running transaction check
---> Package dracut-config-rescue.x86_64 0:033-359.0.1.el7 will be updated
---> Package dracut-config-rescue.x86_64 0:033-360.0.3.el7_2.1 will be an update
---> Package dracut-network.x86_64 0:033-359.0.1.el7 will be updated
---> Package dracut-network.x86_64 0:033-360.0.3.el7_2.1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================================
 Package                                Arch                     Version                                              Repository                    Size
=========================================================================================================================================================
Installing:
 kernel-uek                             x86_64                   4.1.12-61.1.16.el7uek                                ol7_UEKR4                     42 M
Installing for dependencies:
 kernel-uek-firmware                    noarch                   4.1.12-61.1.16.el7uek                                ol7_UEKR4                    2.0 M
Updating for dependencies:
 dracut                                 x86_64                   033-360.0.3.el7_2.1                                  ol7_latest                   311 k
 dracut-config-rescue                   x86_64                   033-360.0.3.el7_2.1                                  ol7_latest                    49 k
 dracut-network                         x86_64                   033-360.0.3.el7_2.1                                  ol7_latest                    90 k
 linux-firmware                         noarch                   20160604-44.git57b649d9.0.2.el7                      ol7_latest                    31 M

Transaction Summary
=========================================================================================================================================================
Install  1 Package  (+1 Dependent package)
Upgrade             ( 4 Dependent packages)

Total download size: 75 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7Server/ol7_latest/packages/dracut-033-360.0.3.el7_2.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY 
Public key for dracut-033-360.0.3.el7_2.1.x86_64.rpm is not installed
(1/6): dracut-033-360.0.3.el7_2.1.x86_64.rpm                                                                                      | 311 kB  00:00:00     
(2/6): dracut-config-rescue-033-360.0.3.el7_2.1.x86_64.rpm                                                                        |  49 kB  00:00:00     
(3/6): dracut-network-033-360.0.3.el7_2.1.x86_64.rpm                                                                              |  90 kB  00:00:00     
Public key for kernel-uek-firmware-4.1.12-61.1.16.el7uek.noarch.rpm is not installed                                   ] 1.8 MB/s | 8.7 MB  00:00:37 ETA 
(4/6): kernel-uek-firmware-4.1.12-61.1.16.el7uek.noarch.rpm                                                                       | 2.0 MB  00:00:03     
(5/6): kernel-uek-4.1.12-61.1.16.el7uek.x86_64.rpm                                                                                |  42 MB  00:00:24     
(6/6): linux-firmware-20160604-44.git57b649d9.0.2.el7.noarch.rpm                                                                  |  31 MB  00:00:26     
---------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                    2.8 MB/s |  75 MB  00:00:27     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Importing GPG key 0xEC551F03:
 Userid     : "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>"
 Fingerprint: 4214 4123 fecf c55b 9086 313d 72f9 7b74 ec55 1f03
 Package    : 7:oraclelinux-release-7.2-1.0.5.el7.x86_64 (@anaconda/7.2)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Updating   : dracut-033-360.0.3.el7_2.1.x86_64                                                                                                    1/10 
  Updating   : linux-firmware-20160604-44.git57b649d9.0.2.el7.noarch                                                                                2/10 
  Installing : kernel-uek-firmware-4.1.12-61.1.16.el7uek.noarch                                                                                     3/10 
  Installing : kernel-uek-4.1.12-61.1.16.el7uek.x86_64                                                                                              4/10 
  Updating   : dracut-network-033-360.0.3.el7_2.1.x86_64                                                                                            5/10 
  Updating   : dracut-config-rescue-033-360.0.3.el7_2.1.x86_64                                                                                      6/10 
  Cleanup    : dracut-config-rescue-033-359.0.1.el7.x86_64                                                                                          7/10 
  Cleanup    : dracut-network-033-359.0.1.el7.x86_64                                                                                                8/10 
  Cleanup    : linux-firmware-20150904-43.git6ebf5d5.0.1.el7.noarch                                                                                 9/10 
  Cleanup    : dracut-033-359.0.1.el7.x86_64                                                                                                       10/10 
  Verifying  : dracut-033-360.0.3.el7_2.1.x86_64                                                                                                    1/10 
  Verifying  : dracut-network-033-360.0.3.el7_2.1.x86_64                                                                                            2/10 
  Verifying  : kernel-uek-firmware-4.1.12-61.1.16.el7uek.noarch                                                                                     3/10 
  Verifying  : kernel-uek-4.1.12-61.1.16.el7uek.x86_64                                                                                              4/10 
  Verifying  : dracut-config-rescue-033-360.0.3.el7_2.1.x86_64                                                                                      5/10 
  Verifying  : linux-firmware-20160604-44.git57b649d9.0.2.el7.noarch                                                                                6/10 
  Verifying  : dracut-config-rescue-033-359.0.1.el7.x86_64                                                                                          7/10 
  Verifying  : dracut-033-359.0.1.el7.x86_64                                                                                                        8/10 
  Verifying  : linux-firmware-20150904-43.git6ebf5d5.0.1.el7.noarch                                                                                 9/10 
  Verifying  : dracut-network-033-359.0.1.el7.x86_64                                                                                               10/10 

Installed:
  kernel-uek.x86_64 0:4.1.12-61.1.16.el7uek                                                                                                              

Dependency Installed:
  kernel-uek-firmware.noarch 0:4.1.12-61.1.16.el7uek                                                                                                     

Dependency Updated:
  dracut.x86_64 0:033-360.0.3.el7_2.1                     dracut-config-rescue.x86_64 0:033-360.0.3.el7_2.1 dracut-network.x86_64 0:033-360.0.3.el7_2.1
  linux-firmware.noarch 0:20160604-44.git57b649d9.0.2.el7

Complete!

Generate a new grub.cfg file:

[root@oscsa ~]# grub2-mkconfig > grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.1.12-61.1.16.el7uek.x86_64
Found initrd image: /boot/initramfs-4.1.12-61.1.16.el7uek.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-327.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-327.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-09ec9b0ef1b542bcbde9147e2e5d21e8
Found initrd image: /boot/initramfs-0-rescue-09ec9b0ef1b542bcbde9147e2e5d21e8.img
done

Move the updated grub.cfg file to the grub2 directory:

[root@oscsa ~]# mv grub.cfg /boot/grub2
mv: overwrite ‘/boot/grub2/grub.cfg’? y

We need to disable SELinux in the Host. SELinux is currently not supported and should be disabled.

[root@oscsa grub2]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 

Then we need to reboot the server
[root@oscsa grub2]# reboot

After the reboot, let’s make sure that SELinux is disabled:

[root@oscsa ~]# sestatus
SELinux status:                 disabled

Let’s also make sure that we are booting off the new UEK 4 kernel release:

[root@oscsa ~]# uname -a
Linux oscsa.viscosityna.com 4.1.12-61.1.16.el7uek.x86_64 #2 SMP Fri Oct 21 14:23:20 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux

We need to edit the /etc/yum.repos.d/public-yum-ol7.repo file on the host and enable the channels for adding and optional_latest:
• Change the value of enable to 1 in addons.
• Change the value of enable to 1 in optional_latest.

Here’s what these sections should look like:

[ol7_optional_latest]
name=Oracle Linux $releasever Optional Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/optional/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol7_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

Handling Dialog Cancel Event

$
0
0
If you ever had to handle a modal dialog close to trigger some action on the parent page, you probably used a dynamic action using the "Dialog Closed" event.

When closing a modal dialog there are two ways to do it.
  1. Close
  • Using an after submit process of type "Close Dialog";
  • Using a dynamic action with a "Close Dialog" action;
  • Branching to a page that has a "Normal" page mode.
  • Cancel
    • Using a dynamic action with a "Cancel Dialog" action;
    • Clicking on the top right "X" icon/button.

    When using a branch to close the modal dialog, the modal dialog will close then it's parent will branch to the specified page.

    Except when using the branch method, when you close the modal dialog, Apex will trigger a "Dialog Close" event. Then, on the parent page, you will be able to handle it using a dynamic action "Dialog Closed" event.
    The thing is that the cancel methods will not trigger any event on the parent page. So, by default, you won't be able to handle the dialog close when it was cancelled.

    One way to have both the close and cancel method trigger an even on the parent page would be to override the dialog close event (Apex is using jQuery's  UI Dialog Widget).

    So what we will do is this.

    You will need to define the following JavaScript function (either on the parent pages, on page 0 or in your JavaScript global library file)
    function customEvent(event, data){
    apex.event.trigger(document, event, data);
    }

    Then, under the modal dialog page attributes, in the dialog section, set the "Attributes" to:
    close: function() { customEvent('customDialogClose', {modalPageId: 'MODAL_CLOSE_FIXED'});}

    What this will do is that it will trigger (on the parent page) the event "customDialogClose".
    The second parameter is a data attribute that could be used to differentiate modals between each other. It can can be useful if you are calling more than one on the parent page or if you want to send data back to the parent page.

    Finally, in your parent page you can define a custom dynamic action as follow:
    Event: Custom
    Custom Event: customDialogClose
    Selection Type: JavaScript Expression
    JavaScript Expression: document

    One thing to note is that the default close event will still be triggered when using the close method.

    You can have a look at my Demo Application

    APEX 5.1 Chart Column Mapping

    $
    0
    0
    If you've played with the D3 chart plugins you can find in the Sample Charts Packaged Application, you may have noticed the ability to nominate a column from your query as the series name.

    APEX 5.1 Column Mapping

    APEX 5.1 provides this built into the framework. Combined with some rather granular attribute control at series and axis levels, I think it will be harder to find tweaks that haven't been made declarative.

    And if you do, there is a section in the chart attributes for JavaScript code. This also means if you do need to start hacking your chart, you're just adding to the existing attributes.

    OracleJET Custom JavaScript

    Compare this with the XML API for AnyChart 6.x where once you start using XML, say goodbye to most of your declarative attribute settings.

    The ability to nominate a series column is optional, bringing more flexibilty to the SQL that no longer needs to conform to positional columns. I'm not sure yet if this will impact how often I use pivot/unpivot, but I'm sure it will help.

    This post was brought to you by the result of last minute presentation screenshot prep and a prompt from this tweet, so thank Peter.

    Signing up for scary stuff

    $
    0
    0

    So I subscribe to the idea that the only way to improve is to dive in on the deep end. Sink or swim.

    With that in mind I sent in an abstract to RMOUG and actually got it accepted. Now, this is a conference I used to attend every year when I lived in Denver. I know the quality they have in most presentations nad I know that lots of people with “important” names in the community attends. I have to up my game and give myself a chance to be embarrassed. It scares and motivates me in equal amounts.

    Talking about that feeling, I watched the quick presentation at the OOW 2016 – “EOUC Database ACES Share Their Favorite Database Things”. I was impressed by how they managed to keep those presentations to just five minutes and still get a great message across. I figured that would be a great thing to practice. I’m going to the DOAG conference in a week and before it starts there is a day for user group leaders. I’ll attend that and on the agenda there is a 30-minute slot with 4-minute presentations. Even less than they gave the ACED presenters at OOW. Not really knowing what I’m getting myself into, I tossed my name into that ring also.

    Hopefully I get to make a try at that too. There will be just a few days of prep. Maybe that is just as well so I do not find time to chicken out. Standing in front of all the group leaders in Europe with just a couple of evenings to prep will be nerve-wracking. But again, if one wants to improve, one has to test those wings.

    Hopefully I’ll get through those without too many scars. I look forward tremendously to both conferences for the meetings as well as for the chance at possibly present at both conferences.

    Dynamic Modal Dialog Titles in APEX5

    $
    0
    0

    Modal Dialogs in APEX5 use the Modal Page Title attribute as the Title of the dialog.

    Standard Dialog Title

    Standard Dialog Title

    Often, I wish this valuable area of the page could convey more information. So, I thought I could use a Substitution String in the page title, but this doesn’t work that well because the value cannot be changed dynamically. To truly make it dynamic you need to use JavaScript.

    Thanks to the awesome blog post from John Snyders I was able to take this example:

    $("body").on("dialogcreate", ".ui-dialog--apex", function(e) {
        $(this).children(".ui-dialog-content")
            .dialog("option", "hide", {effect: "slideUp", duration: 1000})
            .dialog("option", "show", {effect: "slideDown", duration: 1000});
    });

    That enhances the dialog to open and close with a sliding effect. Into this:

    $("body").on("dialogcreate", ".ui-dialog--apex", function(e) {
        $(this).children(".ui-dialog-content")
            .dialog("option", "title", $v("P50_DIALOG_TITLE"));
    });

    When “dialogcreate” event fires, we override the dialog “title” option with the title we want.
    A Dynamic Action, on Click of our link, will grab the text of the link (via this.triggeringElement.innerText and save it on P50_DIALOG_TITLE. Looks something like this:

    daclicksavetitle
    this.triggeringElement.innerText

    The end result:

    Dynamic Title

    Dynamic Title

    DEMO Here

    Now, I was wondering if I could simply set the attribute via the Dialog Attributes, and you can! Notice that the Dialog is a different page, but the attribute is from an item on the calling page. This means that if you call a dialog from many pages you may want to use a JavaScript variable with the same name.

    dialog_attribute

    Finally, there is one more use case to consider. What if you navigate within the dialog to a different record, for example with Next and Previous buttons? In this case, this code may come in handy:

    apex.util.getTopApex().jQuery(".ui-dialog-content").dialog("option", "title", $v("P55_TITLE"))

    Oracle Apps UX Team Report: Oracle OpenWorld, HCM Cloud, and Strategy Day

    $
    0
    0
    See what the Oracle Applications User Experience (#OAUX) team did during Oracle OpenWorld 2016 in San Francisco in September on the Voice of User Experience blog, or VoX, where we’ve reposted our most recent Storify collection. Here’s a short summary of the big stuff...

    How to check ORDS version from APEX builder

    $
    0
    0
    Probably somebody blogged about this, but I couldn't find it.

    So, if you need to check ORDS version and you only have access to APEX Builder you can do it by running following SQL query in SQL Workshop > SQL Commands:

    select owa_util.get_cgi_env('APEX_LISTENER_VERSION') 
    from dual;

    If you need to check other environment variables you can do it by running following PL/SQL block:

    begin
    owa_util.print_cgi_env;
    end;


    Edit no. 1 (thanks to Robert Schafer):

    You can also query:

    select ords.installed_version 
    from dual


    Edit no. 2 (thanks to Christian Neumuller)

    You can also open Help > About dialog in APEX to see the most important CGI variables and some additional info about APEX and database.

    Tested on APEX 5.0.4.00.12 and ORDS 3.0.*

    DOAG2016 und mehr: Events rund um Application Express

    $
    0
    0

    Ab dem 15. November trifft sich die deutschsprachige Oracle Community zur alljährlichen DOAG-Konferenz in Nürnberg. Application Express ist dort, wie in den Jahren zuvor, ein wichtiges Thema. Im Konferenzplaner bringt die einfache Suche nach APEX bereits 46 Treffer, darunter Vorträge aus dem APEX Entwicklerteam von Joel Kallman oder Patrick Wolf. Aber auch bekannte Sprecher wie Dietmar Aust, Denes Kubicek, Tobias Arnhold und andere sind dabei.

    In die DOAG-Konferenz eingebettet ist der Oracle Cloud Day, eine eintägige Oracle-Veranstaltung am 15. November rund um das Thema Cloud Computing - hier können APEX-Interessierte erfahren, wie sich Daten aller Art und aus unterschiedlichsten Quellen, mit APEX zusammenfassen und visualisieren lassen. Und das sowohl on Premise als auch in der Cloud. 

    Besonders zu erwähnen ist die 3. APEX Open Mic Night, die am Mittwoch, dem 16. November, im Rahmen der DOAG-Konferenz um 20:30 im Raum "Istanbul" stattfinden wird. Fünf Minuten Redezeit erhalten alle Teilnehmer, um der Gruppe eigene, spannende APEX-Projekte zu präsentieren und Erfahrungen auszutauschen. Bier und Fingerfood stehen bereit – einzige Voraussetzung: gute Laune.

    Auch nach der DOAG-Konferenz gibt es Gelegenheiten zum Informationsaustausch. So treffen sich die APEX-Meetup-Gruppen in München und Frankfurt am Freitag, dem 18. November. Das ist besonders für diejenigen, die nicht an der DOAG Konferenz teilnehmen können, eine gute Gelegenheit zum Austausch und zur Diskussion.

    Für 2017 kündigen sich die ersten Veranstaltungen bereits an. Im Januar 2017 gibt es eine Roadshow zum Thema Anwendungsmodernisierung mit Application Express.  Erfahren Sie von den Experten von Oracle und der MT AG in München, Frankfurt, Ratingen oder Hamburg, wie sich "Legacy" Anwendungen mit APEX modernisieren lassen. Dabei gibt es natürlich auch Informationen zum neuen Release 5.1 - die Veranstaltung ist kostenlos, also am besten gleich anmelden.

    Und schließlich steht für Mai 2017 die dritte APEX Connect Konferenz auf der Agenda. Wie im Vorjahr wird sie in Berlin stattfinden und das Treffen für alle (nicht nur) deutschsprachigen APEX-Entwickler sein. Derzeit läuft noch der Call for Papers. Bis zum 21. November können noch Vorträge eingereicht werden. Das lohnt sich: Vortragende haben freien Eintritt zur Konferenz.

    DOAG2016 und mehr ...? Wer ist dabei?


    Integrating APEX with Outlook via Exchange Web Services (EWS)

    $
    0
    0

    Integrating APEX with Outlook via Exchange Web Services (EWS) Here at Explorer our employee holiday booking and approval system is (unsurprisingly!) an APEX application. As well as this though, we also maintain a calendar in outlook which after booking and gaining approval for leave in the APEX application it was the employees responsibility to manually

    The post Integrating APEX with Outlook via Exchange Web Services (EWS) appeared first on Oracle Application Express (APEX) Consultants, developers and APEX training courses UK.

    Oracle APEX is an EXCEL-lent Choice

    $
    0
    0

    Oracle APEX is an EXCEL-lent Choice

    Spreadsheets are a wonderful tool. In the hands of a skilled user, budgets and financial analysis can be created quickly and easily. So easily in fact that it becomes hard to resist the temptation to simply copy everything to another sheet or workbook. In no time, you’re presiding over dozens if not hundreds of spreadsheets – most of which become stale outdated representations of your data.

    If your organization is drowning in spreadsheets, you’re well aware the associated problems…things like

    • Data Security– Face it, laptops have a way of walking
    • Data Validation– Errors in a spreadsheet can go unnoticed for long periods of time
    • Multiple Versions of the Truth– Which spreadsheet is correct?? Yours or mine?
    • Backup and Recovery– C’mon how often are you backing up your machine?? Are you willing to bet your data on it??
    • Lack of Mobility– Spreadsheets generally aren’t suited for smaller mobile devices.

     

    There is a solution out there that addresses each of these issues. If you’re an Oracle shop, you already have the tool in-house. It’s Oracle Application Express (APEX). If you’re not an Oracle shop you can employ a license-free version of the database called Oracle Express Edition. It too, is available free of charge..

    Sound too good to be true? Well, if you can spare 90 seconds, I’ll demonstrate.

     

    This is the main screen of the application builder. Click ‘Create’ to begin.
    [Elapsed time: 5 seconds]

    Oracle APEX is an EXCEL-lent Choice


    Several choices are available. Click the ‘From a Spreadsheet’ hyperlink.
    [Elapsed time: 10 seconds]

    Oracle APEX Application

     

    We can import an entire CSV file or ‘Copy and Paste’. For this exercise, we’re going to ‘Copy and Paste’. Click ‘Next’ to continue.
    [Elapsed time: 20 seconds]

    Oracle APEX Spreadsheet Application

     

    Here you see the window, we’ll use to paste in our spreadsheet data.
    [Elapsed time: 25 seconds]

    Oracle APEX Application Spreadsheet


    I created a simple spreadsheet that lists employees, their salaries and departments. Copy everything on the sheet and paste it into the window.
    [Elapsed time: 45 seconds]

    Oracle APEX Excel Spreadsheet

     

    The data is in place. Click ‘Next’ to continue.
    [Elapsed time: 50 seconds]

    Create APEX application spreadsheet

     

    Based on the data, APEX analyzes the data types and formats. You can edit column names or choose to exclude columns from creation and import. APEX conveniently displays the actual data to help you confirm your choices.
    [Elapsed time: 1 minute]

    Oracle APEX Application Table

     

    APEX will automatically create a database table to house the data from the spreadsheet. You can also modify the actual labels visible on the application.
    [Elapsed time: 1 minute 5 seconds]

    Oracle APEX is an EXCEL-lent Choice

     

    This screen provides the means to name your new application and to specify whether it is “read only”.
    [Elapsed time: 1 minute 10 seconds]

    Oracle APEX is an EXCEL-lent Choice

     

    Should you want to specify a specific APEX theme, you can do so here. I would recommend accepting the default.
    [Elapsed time: 1 minute 15 seconds]

    Oracle APEX is an EXCEL-lent Choice

     

    Nothing left to do now but to ‘Create Application’.
    [Elapsed time: 1 minute 30 seconds]

    Create APEX application from spreadsheet

     

    Application successfully created with time to spare!! Click ‘Run Application’

    Oracle APEX Application Builder

     

    Provide your login credentials.

    Oracle APEX login screen

     

    WOW! Here’s your new application and you did it in less than 90 seconds without writing a single line of code.

    Oracle APEX Interactive Reports

     

    To add new rows, simply click ‘Create’.
    To modify or delete rows, click on the pencil icon which takes you to a detail page.

    Oracle APEX edit screen

     

    Congratulations! You now have a multi-user application that is secure, valid, accurate, recoverable, and available on your mobile devices as shown below.

    oracle apex mobile view

     

    The next installment will explore the functionality provided by interactive reports (IR)
    …and we’ll do it again without writing a single line of code!!

    The post Oracle APEX is an EXCEL-lent Choice appeared first on Insum.

    Splitting reports into columns revisited

    $
    0
    0
    Two years ago I wrote a blog post about splitting a long not wide report into several columns as in the image below.
    That post was based on Theme 25. Lately I got a question about support for Universal Theme. So I created a more generic version of the JQeury code that copies the styling of the existing table:
    function reportToColumns ( tabSelector, numCols )  
    { var numRows = 0;
    var curtable = null;
    // calculate the number of rows per column
    var table = $(tabSelector).addClass('reportColumn');
    var rowsPerCol = Math.ceil( ( $(table).find(' tr').length-1 )/numCols);
    var baseName = 'reportColumn';

    // create table template for columns
    var template = $(table).clone();
    $(template).find('tr').has('td').remove();


    for ( i = 2; i <= numCols; i++)
    { curtable = $(template).clone().attr('id',baseName+i).appendTo( $(table).parent() );
    rows = $(table).find('tr').has('td').slice( rowsPerCol, 2*rowsPerCol).detach();
    $(curtable).find('tbody').append(rows);
    }
    }

    The parameter tabSelector should contain the JQuery selector of the table containing the report.
    For Universal Theme this is:

    '#report_report static id table.t-Report-report'

    in which the report static id should be replaced by the static ID defined for your report region. Actually this code can be used for any HTML table. You can find the table selector using FireBug or Chrome Inspector.
    I personally like to work with Firebug because of its multiline code pane. It is very easy to test JQuery selectors because the code pane remains unaltered while you can see and scroll the console output. I also use this to develop and test my JavaScript.

    Add the class below to your CSS definitions. It makes sure that the columns are displayed next to each other with a distance of 30 px between them.
    .reportColumn {
    display: block;
    float: left;
    margin-right: 30px;
    position: relative;
    }

    You can see it in action here.

    Happy Apexing

    Splitting reports into columns revisited

    $
    0
    0
    function reportToColumns ( tabSelector, numCols )  
    { var numRows  = 0;  
      var curtable = null;
      // calculate the number of rows per column
      var table = $(tabSelector).addClass('reportColumn'); 
      var rowsPerCol = Math.ceil( ( $(table).find(' tr').length-1 )/numCols);  
      var baseName = 'reportColumn';   
      
      // create table template for columns 
      var template = $(table).clone();
      $(template).find('tr').has('td').remove();
      
    
      for ( i = 2; i 
    
    The parameter tabSelector should contain the JQuery selector of the table containing the report.
    For Universal Theme this is:

    '#report_report static id table.t-Report-report'

    in which the report static id should be replaced by the static ID defined for your report region. Actually this code can be used for any HTML table. You can find the table selector using FireBug or Chrome Inspector.
    I personally like to work with Firebug because of its multiline code pane. It is very easy to test JQuery selectors because the code pane remains unaltered while you can see and scroll the console output. I also use this to develop and test my JavaScript.

    Add the class below to your CSS definitions. It makes sure that the columns are displayed next to each other with a distance of 30 px between them.

    .reportColumn {
        display: block;
        float: left;
        margin-right: 30px;
        position: relative;
    }
    

    You can see it in action here.

    Happy Apexing

    Source Article from http://dickdral.blogspot.com/2016/11/splitting-reports-into-columns-revisited.html

    Detect Transport and/or Apply Lag in Data Guard and Send Alerts

    $
    0
    0

    Here’s a simple script that anyone can use to check for lags in Data Guard. Basically, there’s two kind of lags in Data Guard that we want to monitor. The first is the apply_lag which is the amount of time the standby database is lagging behind relative to the primary database due to application of redo data. The second is the transport_lag which provides information about how much redo data is behind (in terms of time) because it is not available or applicable on the standby database. The transport lag can be used to determine bandwidth issues between the primary and stanby database sites.

    You can specify the MIN_THRESHOLD parameter which will be the 2nd parameter that is passed into the dg_check_lag.ksh script (below). For lot of our customers who are on Active Data Guard, we change this script to determine seconds that the transport and apply lag is behind by. It is common for us to send alerts when the transport or apply lag is greater than 30 seconds for Active Data Guard customers.

    $ cat dg_check_lag.ksh
    #!/bin/ksh
    # Script Name:  dg_check_lag.ksh
    # Purpose:      To detect transport or apply lag for Data Guard implementations
    #
    
    . $HOME/.ORACLE_BASE
    
    export DB=$1
    export MIN_THRESHOLD=$2
    export ORACLE_SID=${DB}
    echo $ORACLE_SID
    export ORAENV_ASK=NO
    export PATH=/usr/local/bin:/bin:/usr/bin:$PATH
    
    . oraenv
    export LOGFILE=/tmp/check_lag_${DB}.log
    export FN=`echo $0 | sed s/\.*[/]// |cut -d. -f1`
    
    sqlplus -s /nolog <<EOF
    conn / as sysdba
    col name for a13
    col value for a20
    col unit for a30
    set pages 0 head off feed off ver off echo off trims on
    spool $LOGFILE
    select name||'|'||value from v\$dataguard_stats where NAME IN ('transport lag', 'apply lag');
    spool off
    exit;
    EOF
    
    export ERROR_COUNT=$(grep -c ORA- $LOGFILE)
    if [ "$ERROR_COUNT" -gt 0 ]; then
      cat $LOGFILE |mail -s "DG Transport/Apply error for $DB ... ORA- errors encountered!" DBAs@viscosityna.com
    fi
    
    TLAG=$(cat $LOGFILE |grep "transport lag" |cut -d'|' -f2)
    ALAG=$(cat $LOGFILE |grep "apply lag" |cut -d'|' -f2)
    
    echo "Transport Lag: $TLAG ------ Apply Lag: $ALAG"
    export T_DAYS=$(echo $TLAG |cut -d'' -f1 |sed -e "s/\+//g")
    export T_HRS=$(echo $TLAG |cut -d'' -f2 |cut -d: -f1)
    export T_MINS=$(echo $TLAG |cut -d'' -f2 |cut -d: -f2)
    echo $T_DAYS $T_HRS $T_MINS
    
    export A_DAYS=$(echo $ALAG |cut -d'' -f1 |sed -e "s/\+//g")
    export A_HRS=$(echo $ALAG |cut -d'' -f2 |cut -d: -f1)
    export A_MINS=$(echo $ALAG |cut -d'' -f2 |cut -d: -f2)
    echo $A_DAYS $A_HRS $A_MINS
    
    echo "MIN_THRESHOLD: $MIN_THRESHOLD"
    export ALERT_LOG_FILE=/tmp/check_lag_${DB}.alert
    [ -f "$ALERT_LOG_FILE" ] && rm $ALERT_LOG_FILE
    
    [ "$T_DAYS" -gt 00 ] && echo "Transport Lag is greater than 1 day!!!" |tee -a $ALERT_LOG_FILE
    [ "$T_MINS" -gt $MIN_THRESHOLD ] && echo "Transport Lag exceeeded our threshold limit of $MIN_THRESHOLD mins .. curently behind $T_DAYS day(s) $T_HRS hrs and $T_MINS mins" |tee -a $ALERT_LOG_FILE
    
    [ "$A_DAYS" -gt 00 ] && echo "Apply Lag is greater than 1 day!!!" |tee -a $ALERT_LOG_FILE
    [ "$A_MIN" -gt $MIN_THRESHOLD ] && echo "Apply Lag exceeeded our threshold limit of $MIN_THRESHOLD mins .. curently behind $A_DAYS day(s) $A_HRS hrs and $A_MINS mins" |tee -a $ALERT_LOG_FILE
    
    if [ -s $ALERT_LOG_FILE ]; then
    echo "">> $ALERT_LOG_FILE
    echo "--------- Check to see if MRP is Running -------------">> $ALERT_LOG_FILE
    ps -ef |grep -i mrp |grep -v grep >> $ALERT_LOG_FILE
    
    $SH/alert_notification.ksh $FN `hostname` DB """DG Transport/Apply for $DB is behind ... behind $T_DAYS day(s) $T_HRS hrs and $T_MINS mins" $ALERT_LOG_FILE
    fi

    Stay tuned as I will reveal scripts to monitor gaps in archive log sequences. I use the term gap loosely here as it is not determining the gap from v$archive_gap but looking at the number of applied archive logs on the standby database and comparing the applied archive logs to the maximum sequence number based on the thread number.

    Come visit Viscosity North America for latest updates to local events, white papers and case studies.

    Viewing all 2258 articles
    Browse latest View live