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

Master-Detail in Tree preview (نمايش درختي جداول وابسته بهم)

$
0
0

English Version : http://saeedhassanpour.blogspot.co.uk/2015/09/master-detail-in-tree-preview.html

در اين مطلب به شما نشان داده مي شود كه چطور بدون اينكه ساختار جداولي براي نمايش درختي ايجاد شده باشد يا اينكه ساختار جداول خود را تغيير بدهيد بتوان آنها را بصورت درختي نمايش داد. بطور معمول در Oracle APEX و ساير ابزارها بايد در جدول حتما فيلدي به نام فيلد پدر وجود داشته باشد تا بتوان آنرا بصورت درختي نمايش داد ولي در دو مثال زير نشان داده خواهد شد كه به چه صورت مي توان دو جدول Master-Detail يا سه جدول Master-Detail-Detail را بصورت درختي نمايش داد.


Oracle APEX Multifactor Authentication

$
0
0

Multifactor Authentication

Why have I written two blog entries on Authentication?

The United States Office of Personnel Management is notifying 2.7 million people  that their data were stolen. The blame lays at the feet of the people responsible for these data. While the ultimate responsibility rests with the executives who did not fund investment into data security, I shoulder that responsibility daily.

I ask myself, what am I doing to improve (and challenge) our security posture. I have been asking: is there a better way? The question resulted in 21OCT15 blog entry exploring APEX native authentication versus custom authentication. From that, I’ve adopted apex_util.strong_password_check. Great utility and it can be used with custom authentication.

The next step in improving our security posture is to be able to offer two-step, or multifactor authentication within APEX applications.

Topics

Conclusion

Not every Oracle APEX application requires MFA, but maybe having it at hand will encourage me to use it where appropriate. For example, I’ve wanted a password vault in APEX to store the dozen of passwords related to our infrastructure. One might use MFA for critical administrative functions in the same way Google does. Google asks me for a two-step process when modifying company settings, but I get access to email more easily.

With the tools and building blocks at hand, I am more likely to include it where needed.

Building Blocks

  1. Ability to Send SMS messages from APEX
  2. Means to generate and store SMS messages
  3. Means to validate SMS messages

Sending SMS Messages

Patrick Wolf wrote a blog entry 4MAY2007 entitled Sending an SMS message to a phone. I picked this nugget up and even used the same vendor: ESendex. It works brilliantly. The vendor took a few weeks to adopt support for my back-woods mobile carrier in the US. I dropped Patrick’s work into a package. Whether you use Patrick’s or write one of your own using APEX_WEB_SERVICE.MAKE_REST_REQUEST with another vendor, it will take time and effort to confirm you are able to send SMS messages from APEX. A quick search for “SMS rest api” gave me a fair number to pick from. You’ll need this working and fees paid before marching on.

Generate MFA Text

You’ll need a means of generating text for your message and a means of storing the texts, then comparing the text. My approach was to create a global temporary table. These data disappear and I am not passing session items around.

CREATE GLOBAL TEMPORARY TABLE VLT_SMS (
 MSG_TEXT  VARCHAR2(20 BYTE), 
 VALID_TIL  TIMESTAMP (6) 
 ) ON COMMIT PRESERVE ROWS ;

Then we need a method for dropping data into this table that limit options and establish criteria for a successful validation:

  1. Generate a random set of 6 digits
    • to_char(round(dbms_random.value(‘100000′,’999999’),0))
  2. A time limit – I sent 10 minutes, easy to titrate as needed.
    • current_timestamp + interval ’10’ minute
  3. Limit valid texts, delete old failed efforts – easily accomplished in a global temporary table.
procedure generate_mfa_text (
  P_SMS_NUMBER    varchar2
  ) 
as
  l_msg_text      varchar2(6);
  l_timestamp     timestamp;
  l_select_count  number;
begin
  if P_SMS_NUMBER is null then
		raise_application_error (-20000,
			'Error SMS number is null in vlt_mfa_pkg.generate_mfa_text');
  end if;
  -- note: there is a separate procedure that validates the SMS number
  select 
    to_char(round(dbms_random.value('100000','999999'),0)) , 
    current_timestamp + interval '10' minute  
  into
    l_msg_text,
    l_timestamp
  from dual;

  delete from vlt_sms;
  insert into vlt_sms  (
    msg_text,
    valid_til
    ) values (
    l_msg_text,
    l_timestamp
    );
  
    vlt_mfa_pkg.sendSMS(
      P_RECIPIENT   => P_SMS_NUMBER,
      P_BODY        => l_msg_text
      );
end generate_mfa_text;

Validate SMS message

In my trial application which I call “Vault” out of some sense of irony, I validate SMS messages in two places. The first place is on the page where I edit a user’s profile. I put a button that reads: “Validate SMS” with the cute little fa-phone image next to it. Hit that, that process goes. The second place is on a new page cleverly numbered 102. Page 102 follows page 101 in the login process. You fail the MFA, APEX dumps you to the login.

I did all of my exploring and failing at the validate SMS page while editing the user.

You’ll note that I use the current time stamp in the validation process.

I just created a little function in my package.

  • When SMS is valid, returns true and erases the text message from the table
  • When SMS is not valid, I just get a false.
function valid_mfa (
  P_MSG_TEXT IN VARCHAR2
  )  return boolean
as
  l_timestamp     timestamp;
  l_select_count  number;
  l_return        boolean := false;
BEGIN
  l_timestamp := current_timestamp;
  select count(*) into l_select_count
  from vlt_sms
  where
    msg_text = P_MSG_TEXT 
    and valid_til > l_timestamp;
  if l_select_count = 1 then
    l_return := true;
    delete from vlt_sms;
  end if; -- l_select_count
return l_return;
END valid_mfa;

Validate SMS Number

The user profile table needs to store the SMS number as well a means of knowing if it has been validated. I opted for a field in the user profile table called “sms_valid_date”. If  “sms_valid_date” not null, then the SMS number has been validated.

On the user profile page in an APEX application, there a few key elements:

  1. A validate SMS button
  2. A text item for the message the user types
  3. A process to validate
declare l_valid_text boolean;
begin
	l_valid_text := vlt_mfa_pkg.valid_mfa(
		:P92000_MSG_TEXT
		);
if :P92000_USER_PK is not null then
	if l_valid_text then
		update vlt_user set
			sms_valid_date = sysdate
			where user_pk = :P92000_USER_PK;
	else
		update vlt_user set
			sms_valid_date = NULL
			where user_pk = :P92000_USER_PK;
	end if; -- valid text
end if; -- user not null
return l_valid_text;
end;

Integration

Now when I am at the login process, I have all the bits and pieces I need.

  • Ability to send SMS
  • Generated and stored text with a time limit
  • A validated SMS number
  • A means of knowing the SMS number is valid

In my APEX application, I created a page 102, on that page I have three six items:

  1. P102_LOGIN_ATTEMPTS (hidden)
  2. P102_USER_PK (hidden)
  3. P102_SMS_NUMBER (hidden)
  4. P102_VALID_TIL (display only)
  5. P102_MSG_TEXT (text field)
  6. P102_MESSAGE (display only)

I have two buttons:

  1. Cancel (submit page as CANCEL)
  2. Validate (submit page as VALIDATE)

Pre-Rendering

At pre-rendering the page, you’ll need to generate and send the text message and initialize a few items. Because you’ve just come from the login page, normally 101, the username must be retrieved manually. The first steps include identifying the user, getting the SMS number and initializing the attempt counter. Because I am super nice and I wanted confirm the time process, I displayed the time on the page. This will likely disappear.

declare
	l_select_count		number;
	l_valid_date		date;

BEGIN
select count(user_pk) into l_select_count
	from vlt_user 
	where upper(user_name) = upper(v('APP_USER'));
if l_select_count = 1 then
	select
		user_pk,
		sms_number,
		sms_valid_date
	into 
		:P102_USER_PK,
		:P102_SMS_NUMBER,
		l_valid_date
	from vlt_user 
	where upper(user_name) = upper(v('APP_USER'));
end if; -- select count = 1

if l_valid_date is null then
	:P102_message := 'Mobile Number has never been validated. ';
end if;
if :P102_SMS_NUMBER is not null then
	vlt_mfa_pkg.generate_mfa_text(
		P_SMS_NUMBER	=> :P102_SMS_NUMBER
		);
	select to_char(localtimestamp + interval '10' minute, 'HH12:MI AM') 
		into :P102_VALID_TIL
		from dual;		
else
	:P102_message := 'Mobile Number/SMS number does not exist';
end if; -- sms not null
if :P102_LOGIN_ATTEMPTS is null then
	:P102_LOGIN_ATTEMPTS := 0;
end if; -- init login_attempt counter

END;

P102_MSG_TEXT

This page item has a validation process that is a PL/SQL function body that returns a boolean.

declare l_valid_text boolean;
begin
	l_valid_text := vlt_mfa_pkg.valid_mfa(
		:P102_MSG_TEXT
		);
	:P102_LOGIN_ATTEMPTS := :P102_LOGIN_ATTEMPTS + 1;

return l_valid_text;
end;

Validate Button

We want to limit the user to 3 attempts. After trying all sorts of bad ideas, the simplest approach was to disable the Validate button. Therefore, the validate button has a condition on it. It is a PL/SQL function body.

return :P102_LOGIN_ATTEMPTS < 3 and :P102_SMS_NUMBER is not null;

Branching

On a successful validation, then call your normal home page. When button Validate is pressed, branch to page 1.

On cancel, then force the user to log out. This trick I stole from the APEX application navigation bar list (application | shared components | lists). The call is a URL to &LOGOUT.

Cancel logs out

Make it work!

One last step tells APEX to hit Page 102 immediately following the login. Edit application properties, click on User Interface, then edit the Desktop user interface (the pencil icon).  Change the Home URL to:

f?p=&APP_ID.:102:&SESSION.

as shown here.

Alter Login Destination

Secret Hint for Oracle APEX Multifactor Authentication

Hey, once you get the SMS process working, disable the send SMS process while doing all of the testing and debugging in the application. Make it simple for yourself. Put a classic report on your apex page that displays the results of the global temporary table that holds the SMS message.

The SMS vendors may provide a few free pings, but you’ll use a few dozen implementing these processes. You don’t need to continue to pay for them. Before deployment, delete your report from Page 102 and your user profile page. And un-comment the send SMS feature.

</qed>

The post Oracle APEX Multifactor Authentication appeared first on Oracle Blog .

LDAP- oder SSO-Login am APEX Workspace - mit APEX 5.0

$
0
0

Eins der weniger bekannten neuen Features in APEX 5.0 ist die Möglichkeit, einen LDAP- oder Single Sign On Server zum Login am APEX Workspace zu nutzen.

Für APEX-Anwendungen selbst ist dies schon immer möglich: man kann seine Anwendung mit einem beliebigen Authentifizierungsschema versehen, so dass keine eigene Passwortverwaltung mehr nötig ist. Genau dies ist jetzt auch für APEX-Workspaces möglich - standardmäßig ist dort Application Express Accounts als Authentifierungsverfahren eingetragen. Dies kann nun auf Database User, einen LDAP-Server, auf Oracle Single Sign On oder auf ein anderes Verfahren umgestellt werden 

Es gibt allerdings einige Dinge zu beachten; was genau, beschreibt unser aktueller Tipp

Meetups Are Taking Off -- Don't Miss Out!

$
0
0
Over the past several months, the EPM Community has been feverishly working to bring meetup events to your neighborhood. White Plains MeetupThe White Plains, New York, meetup was held on September 30 at Copper Face Jacks on Mamaroneck Avenue. Many thanks to Gary Crisci and others for a great job

Product Manager's Corner

$
0
0
In inaugurating the first Product Management Corner article and on behalf of Oracle EPM Development, I'd like to extend our sincerest thanks to the ODTUG community for your continued and growing support for Oracle Enterprise Performance Management. The annual Kscope conference gets better and better

EPM Community Newsletter

$
0
0
Blogs Galore! is becoming a newsletter favorite. Once again, Jennifer Anderson at The Hearst Corporation has compiled a list of some of her favorite blogs on topics of interest to our EPM Community.

Blast from the Past

$
0
0
When Jennifer Anderson approached me about writing an article for "Blast from the Past," a new section of the ODTUG EPM Newsletter, I thought to myself, "Wow, this is awesome." I immediately grabbed my notepad and started brainstorming, trying to come up with some really cool and interesting topics

مشارکت ایران اپکس در پروژه ترجمه پیغام های اوراکل اپکس

$
0
0

پیغام های درونی اوراکل اپکس به ۱۰ زبان مختلف (از جمله فرانسوی، آلمانی، کره ای و ایتالیایی، اسپانیایی، ژاپنی، پرتغالی و چینی) ترجمه شده و در دسترس عموم می باشد. این درحالی است که برای نمایش پیغام های درونی به زبان های دیگر نیازمند ترجمه پیغام های داخلی برنامه هایی هستیم که در این فهرست نمی باشند (از جمله زبان فارسی).

چندی پیش پروژه ای در جامعه اوراکل اپکس با نام Translate APEX آغاز شد که هدف آن ترجمه این پیغام های درونی به زبان های مختلف و ارائه رایگان و آسان آن ها به صورت یک فایل اسکریپت بود. در این پروژه که با مشارکت افراد و شرکت های برجسته جامعه اوراکل اپکس از کشورهای مختلف همراه شد، تاکنون ترجمه ها و اسکریپت های ۲۹ زبان مختلف اضافه شده است که می توانید با مراجعه به صفحه اختصاصی این پروژه به آن ها دسترسی پیدا کنید.

ارائه اسکریپت ترجمه پیغام های اوراکل اپکس به زبان فارسی با همکاری تیم شرکت پرتو پردازش فرتاک(ایران اپکس)انجام شد. شما می توانید با مراجعه به وب سایت این پروژه، اسکریپت زبان فارسی را دانلود کرده و در محیط اوراکل اپکس خود اجرا نمایید. این ترجمه برای نسخه APEX 3.0 به بعد مورد استفاده قرار می گیرد.

برای دسترسی به وب سایت این پروژه به این آدرس مراجعه نمایید: www.translate-apex.com

00102


New Tech Journal Article Now Available

$
0
0
How Can I Extract My Essbase Outline to a SQL Database? Chris Rothermel, Rothermel Consulting This article highlights how a utility from Applied OLAP can save time and development work by exporting Essbase outlines to SQL. Having outline information in SQL makes Essbase outline information

PL/SQL Best Practices

$
0
0
A blog after many years :-)

My best practices for PL/SQL are below:
  • Always use Exception Block within each block, function, procedure
  • Send email to your development team for any error which occurs in Production
  • Give top priority to error email
  • Make sure you will never get any error email :-)
  • Write reusable procedures/functions and SQL (If you use APEX you can use List of values)
  • Avoid using Triggers except audit
  • Make sure you add below 6 columns to important tables for Audit.
    1. Created by User
    2. Creation Date
    3. Updated by User
    4. Update Date
    5. User Agent
    6. IP Address
  • Avoid using Stateful Package i.e. do not use package level variables/constants and instead create a DB table which stores all constants. This will avoid causing "ORA-06508: PL/SQL: could not find program unit being called" if you need to do a minor change in package then this could heavily affect where the application has thousands of users.

Thanks to Steven Feuerstein.

Oracle MailChimp Package

$
0
0

MailChimp Logo

Oracle MailChimp Package

Storm Petrel developed an Oracle MailChimp package that integrates with MailChimp, the email/marketing services. The package, written in PL/SQL, is essentially an Oracle interface to your or your customer’s MailChimp data. The package, itself, does not contain any user interface. It is written to augment applications that may benefit from linking to an email marketing tool.

Storm Petrel developed tables that mimic the structures of MailChimp data for accounts, lists, and list members (email addresses). There is also a table that capture errors that may be returned by MailChimp. The package does not venture into the realm of Campaign layout and campaign management. Our decision was to leave those features to the good folks at MailChimp.

We got frustrated with maintaining two mailing lists, one for our internal leads tracking software and one at MailChimp. It should be feel like one list managed from either our internal application or from MailChimp.

If the package is of interest, just let us know at support@stormpetrel.com.

 

</qed>

The post Oracle MailChimp Package appeared first on Oracle Blog .

Upcoming ODTUG Webinars

$
0
0
Below is the list of upcoming webinars. If there is a topic you would like covered that is not on our current list, or if you would like to present a webinar, please email Melissa@odtug.com. Did you miss a webinar? Our Webinar File Library lists all of our webinars and can be filtered by subtopic

APEX Feature Request

$
0
0
Just created a new feature request for APEX at https://apex.oracle.com/pls/apex/f?p=55447:19:::NO:19:P19_ID:50481528500531591330407043519019274105… Extend Interactive Report API - Get IR Query. The feature request is abut the following:

"This API should deliver a couple of different SQL statements for an interactive report. There are several possible requirements I can think of:

1. IR query including visible columns and filter values - actual SQL for the user session,
2. IR query including all columns and the original SQL,
3. get column names of an IR with or without column alias,...

Having this SQL we should be able to run it as EXECUTE IMMEDIATE, without having to replace any binds.

This feature could be included in the actions menu and available as a plugin for dynamic actions - new dynamic action feature (action)."

Please, feel free to go there and vote for it.

George Hrab @TEDx Rethinking Doubt

$
0
0
I realise the Internet is a big place, so if you haven't heard of the TED talks then I recommend you head over and check it out.

They're limited length talks about amazing things people are doing, discovering, and innovating around the world. Ideas worth spreading, is the catch-phrase.

Many talks are about topics that are really beyond our personal purview, but today I listened to one that I think everybody should listen to, especially teenagers. The speaker, George Hrab, addresses something that everyone can apply, every day.



Thanks to one of my heroes, Phil Plait, for pointing this one out. Though considering I periodically listen to George's podcast, I would have heard his golden voice at TEDx at some point. He's also a drummer in a funk band and has released some cool science based music.

Customising APEX 5.0 workspace login

$
0
0
A few years ago Peter Raganitsch showed us how to customise the workspace login page in APEX 4.x.

I think it's even easier in APEX 5.0, though it looks pretty slick already.

Here is the solution I shared on Slack a few weeks ago.
<script type="text/javascript">
$( document ).ready(function() {
$('.a-Login-title').text("Scott's workspace").css('color','darkgreen');

// In order of reference
// Oracle header
// Down arrow
// Second page fluff
$('.a-Login-message, .a-Header--login, .a-Login-slideNav, .a-Login-slide--secondary').css('display','none');
// Orange message bar
$('.a-Login-message').text('Reminder: use your windows credentials');

// Hide reset password
$('.a-Login-links').text('')

// Change logo, list in /i/apex_ui/css/Core.css
$('.a-Login-logo').addClass('gi-icon-admin-dashboards').removeClass('gi-icon-apex-logo-icon');

});
</script>

Paste this in the same location in the INTERNAL workspace, under Manage Instance -> Login message.

And voila!
Customised Workspace Login
Perhaps use this to indicate environment details.

I believe some others have been tackling easy options to replace the icon. I'll share how I made the login page to my Boggex game at some point.

The unpleasant installation process of APEX5 in 12c

$
0
0

Since the early days of HTML DB the installation (or updating) process stayed almost the same. You could update your APEX database environment in just a few simple steps, this worked very stable for years.  With the releases of Oracle Database 12c and Apex 5 this easy handling changed for the worse.


This blogpost is about performing a new, clean APEX5 installation in a 12c database. This apparently simple task already contains some unpleasant surprises. This blogpost is not about migrating existing apex environments into 12c, these scenarios would go beyond its scope: the database architectures (11g, CDB 12c, Non-CDB 12c, PDB 12c), the different migration paths among each other, different APEX version levels and not to mention what happens when you plug it into another cdb environment. Administrators won't get quickly bored in 12c.

Make your choice, install APEX in a CDB or a PDB?
The latest database release 12.1.0.2 is shipped with APEX version 4.2.5, installed in the root container (CDB). Accordingly, one of the first steps will be an upgrade to APEX version 5. The "Non-CDB 12c"-architecture is already deprecated again, so you have to decide, if it's better to upgrade the existing CDB installation or to perform a new installation in a PDB.

If you have plans to actively use the multitenant option you should (at least) read the whitepaper Deploying and developing Oracle APEX with Oracle DB 12c and the Installation guide to make the decision. The recommended way is, according to the current 12c database documentation, to install APEX in a CDB. This enables centralized management and ensures every PDB runs in the same version. This recommendation has changed in the APEX 5 documentation - for the majority of use cases, now APEX should be better installed in PDB. Recently the blog post Why you should remove APEX from the CDB$ROOT also strongly recommends to install APEX in PDB, mainly to achieve higher flexibilty.


Installation in a CDB
You need DB patch no. 20618595 to upgrade APEX from version 4.2 to version 5 in a CDB. I won't go in detail here, the installation procedure is described in blogpost Upgrading to APEX 5.0 in your Oracle Database Release 12.1 CDB by Jason Straub. People with no greater affinity to DBA activities, will probably have some difficulties with the implementation of the necessary installation tasks.

The required patch is only available for Linux and AIX, although in the meantime APEX5 was released over half a year ago. In consequence, if you're on Windows, Solaris or HP-UX and followed conscientiously the advices from Oracle, this means you upgraded early to db 12c (premier support for 11gR2 ended in january 2015) and migrated your apex environment to CDB, you still have no upgrade path to apex 5. In this case, the only (undocumented) option is to deinstall your (productive?) APEX environment and perform a new, fresh APEX installation.


Installation in a PDB
At first the default apex installation has to be removed from the CDB before you can start with the APEX5 installation in PDB. Browsing the Installation guide brings you quickly to the section Uninstalling Application Express from a CDB. After executing the mentioned script "apxremov.sql", everything looks fine at the first glance. Though a message is displayed to scan all the logfiles for ORA-errors, the console output shows no errors. But when you examine the logfiles, you'll see that the script tries to remove an APEX5 installation. Of course this doesn't exist yet, your installation still resides under the schema APEX_040200.

With the release of 12c the perl utility "catcon.pl" was introduced. It allows you to run SQL scripts in multitenant environments, the way the APEX removal script was also executed. Obviously the tool doesn't offer the option (or at least no script known to me used it yet) to hand over fatal errors to the console output. It's therefore all the more unfortunate that the tool creates already with one single execution not less than 34 different logfiles. It would have been desirable, Oracle had involved a better quality assurance for such an essential, new administration tool.

Back to the failed APEX deinstallation: so we need a script to remove APEX4.2 from the CDB. This can be found in the APEX distribution delivered with database installation at $ORACLE_HOME/apex. If you execute the "apxremov.sql" from this location now, your APEX_040200 schema will still stay alive. In Version 4.2 the scripting names are different. "apxremov.sql" also exists there, but it doesn't take any effect in a CDB. You'll have to execute a script called "apxremov_con.sql".

When executing this script, you'll hit the error "ORA-28014: cannot drop administrative users". To avoid this error, you have to set the undocumented database parameter "_oracle_script". As you might know, using undocumented '_' parameters can violate your Oracle support contract. Those parameters should only be used when Oracle tells you to use them - but no words about that in the release notes, installation guide or at support.oracle.com. So the official way would be to create a service request at Oracle support. Otherwise, risking to violate your support contract and execute the following statement:
      alter session set "_oracle_script"=true;
Now your APEX4.2 installation should be removed successfully and you can start with your APEX5 installation.

Conclusion
APEX administrators are facing new challenges with the 12c database architecture. Just a simple upgrade from APEX 4.2 to 5 in 12c is anything but a quick and casual process. Probably not just a few guys might have thought "Let me try the latest releases, no big deal to install 12c and Apex 5!" - only to become quite frustrated after some time. Oracle should find a remedy, at least the documentation or release notes should point out the pitfalls. Of course the APEX development team, an absolutely passionate and outstanding team at Oracle, are rather dependent on the features (and patches) the Database development team delivers.
With the future release of DB 12cR2 the handling will probably get easier again - at least if it's shipped with installed APEX 5 in PDB$SEED then.


/* Example how to remove the default APEX 4.2.5 installation 
from CDB and install APEX 5 in a PDB */

/* Navigate to APEX 4.2 directory (from database installation) */
oracle@srv> cd $ORACLE_HOME/apex

/* Open SQLPlus */
oracle@srv> sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Fri Nov 27 19:05:41 2015

Copyright (c) 1982, 2014, Oracle. All rights reserved.

/* Allow administration of common cdb users*/
SQL> alter session set "_oracle_script"=true;

Session altered.

/* Remove APEX 4.2 from CDB */
SQL> @apxremov_con.sql;

[...]

SQL> exit

/* Navigate to your APEX5 installation directory */
oracle@srv> cd /opt/oracle/install/apex5

/* Open SQLPlus */
oracle@srv> sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Fri Nov 27 19:05:41 2015

Copyright (c) 1982, 2014, Oracle. All rights reserved.

/* Switch to your pdb */
SQL> alter session set container=[pdb_name];

Session altered.

/* Install APEX5 */
SQL> @apexins.sql [apex_tablespace] [files_tablespace] [temp_tablespace] [images]

[...]

Datenmuster finden: SQL Pattern Matching in Oracle12c

How to create checkbox in report in Oracle Apex 5.0 – quick tip

$
0
0

For new projects implemented with Oracle Application Express we are happily using Apex 5. One of the first questions was “how to create checkbox column in report ?”

After reading Oracle Apex documentation we came up with this select statement:

SELECT APEX_ITEM.CHECKBOX2(1,empno) "Select",
    ename, job
FROM   emp
ORDER BY 1

Is it enough (unfortunately no)?

checkbox_fail

 

We used to deal with that in previous version by changing column to “Standard Report Column” in Report Attributes > Column Attributes. The point is, it’s not possible in main view of Oracle Apex 5.0 . So what now ?

There are at least two solutions.

    • While using Page Designer change column type to “Percent Graph”
      page_designer_column_type
    • We can switch Oracle Apex view to that what we used to in older versions.

      apex_5_0_component_view

      Now we can simply switch column type to “Standard Report Column”
      apex_5_0_standard_report_column
    • Next back to “Page Designer” view.
      apex_5_0_page_designer

Now we can enjoy report with checkboxes.

checkbox_success

Artykuł How to create checkbox in report in Oracle Apex 5.0 – quick tip pochodzi z serwisu PRETIUS.

APEX 5 Migration - Part 1 - Requirements and Installation

$
0
0
During this year I have done several APEX 5 migrations and I held three lectures on the topic.
Unfortunately it only reached out in Germany, however the content would contribute to simplifying the work for everyone. So I decided to blog it. I will cover this topic in three different posts:
- Requirements and Installation
- Common issues after the migration
- Universal Theme migration

I start with the requirements and installation of APEX 5.
The most of the content at this part is described in the APEX documentation and I will shorten it to the most important parts.
Mehr »

Testing software: 5 tips from Devoxx- speakers

$
0
0

In software development testing is vital. At Devoxx Belgium 2015 several experts formulated useful tips for the creation and use of such tests:

#1 Use graphs to monitor behavior

Lorin Hochstein, Senior Software Engineer at Netflix showed a graph with the typical use of the services of Netflix: most users watch videos and series in the evening, while there is less activity during the day and at night. If the graph does not follow this expected pattern on a specific day, there might be a problem within the system. Graphs might even help finding the cause of a problem. Tony Printezis, Staff Software Engineer at Twitter can, for example, detect problems with the collection of dead object by recognizing certain patterns in the behavior of a system.

#2 Define a SLA

Another way to determine whether a system is working, is to define a Service Level Agreement (SLA). Software engineer Christopher Batey states that you should create one for yourself if your business does not define one. After all, how can you check whether the connection timeout is acceptable when you have not defined any standards for this?

#3 Test regularly and thoroughly

Batey adds that you should also test for highly unlikely but possible situations that might have a high impact on your system, such as an invalid HTTP or a malformed response body. The developers should create alternative scenarios for each of those situations, so the application can fail gracefully, with minimal impact on the user. At Netflix, there might, for example, be a situation in which users on an entire continent need to be redirected to another service point. According to Hochstein, such difficult operations, which potentially have a high impact on the reliability of the system, are being tested regularly, even monthly.

#4 Test in sandboxes as well as in the production environment

Netflix uses the term ‘Chaos Engineering’ for doing continuous experiments on the production system. According to Hochstein, such tests are vital, since it is impossible to hypothesize all possible scenarios in a test environment. Batey, on the other hand, states that there are no scenario’s which cannot be tested in a test environment. However, most business will probably combine these approaches: new features will not be released before they have been tested in a sandbox, while their behavior will also be monitored in the ‘live’ environment.

#5 Use ‘Canary testing’

In order to limit the impact of live tests, Twitter uses ‘Canary testing’ when releasing new features. This means that new features will first be deployed and tested on a small part of the system. Only after a few weeks, they will be made available to the entire system. This way problems can be detected soon, without affecting the entire service.

In any case, it is a vital part of the development process to thoroughly test software. In this respect I agree with Batey, who stated: “If you don’t have a test, you don’t have a feature; it is more like a rumor: it might be there today, but it might be gone tomorrow”.


Viewing all 2258 articles
Browse latest View live




Latest Images