Feed aggregator

EBS R12.2 Delta 6 Feature Review : Enhancement of adop console messages

Senthil Rajendran - Tue, 2015-04-28 01:02
ADOP console messages was always something that administrators needed changes. Delta 6 new features talks that there has been more enhancements done and running SQLs are displayed. Yes & True , it does but comparing to Delta 5 there are not much improvements. If you are from a older Delta version 2 or 3 , then Delta 6 upgrade might be interesting.

Instead of displaying the complete update statements , I can see messages like "[STATEMENT] Updating cutover_status=0 for session_id : 67" which are quite meaning full.

Still see a lot of technical names used like "[STATEMENT] Inside createPatchCtxFile()..."


EBS R12.2 Delta 6 Feature Review : EBS Technology Consistency Checker (ETCC)

Senthil Rajendran - Tue, 2015-04-28 00:19
With EBS R12.2 Delta 6 will not display a warning message when using the ADOP utility. An additional check is made every time ADOP tool is invoked which checks for the  recommended patches that are missing in the instance. This feature is ETCC and you will see something like this on the ADOP logs.

    [PROCEDURE] [START 2015/04/27 14:27:57] Performing database sanity checks
    [WARNING]   ETCC: The following database fixes are not applied in node vmohstest001
                  14046443
                  14255128
                  16299727
                  16359751
                  17250794
                  17401353
                  18260550
                  18282562
                  18331812
                  18331850
                  18440047
                  18689530
                  18730542
                  19472320
                  19487147
                  19896336
                Refer to My Oracle Support Knowledge Document 1594274.1 for instructions.
    [PROCEDURE] [END   2015/04/27 14:27:57] Finished performing database sanity checks


Recommendation is to review the below note and get all recommended patches applied.
Oracle E-Business Suite Release 12.2: Consolidated List of Patches and Technology Bug Fixes (Doc ID 1594274.1)

Note : please refer to the recent product documentation to know the latest changes.

Interested in Lift-Off for Your Cloud Business?

Usable Apps - Mon, 2015-04-27 16:37

Julian Orr (@Orr_UX), Senior Usability Engineer in the Oracle Applications User Experience Communications and Outreach team reflects on the OAUG Collaborate 15 conference.

Much like the very real sand cloud that enveloped Las Vegas during this year’s OAUG Collaborate 15, the conference itself is getting drawn deeper into the Oracle Cloud, as more Oracle applications lift off and soar towards the Oracle Applications Cloud user experience and look and feel.

I co-presented three sessions with Oracle Cloud Applications partners at the conference. All three sessions focused on how to extend and complement the functionality of the Oracle Applications Cloud using a combination of PaaS for SaaS (or PaaS4SaaS as we call it). Common themes included:

  • PaaS is an agile, effective means used to extend SaaS cloud applications as proven by our partners.
  • Oracle PaaS is not just used to extend SaaS functionality, but it’s also used to extend the user experience benefits of the Oracle Applications Cloud simplified UI to your users.
  • Applying best practices helps users reap the many benefits of the simplified user experience.

In the Oracle Fusion Middleware for the Cloud panel session, Sandeep Banerjie, Senior Director, Oracle Product Management, did a great job of setting the table with comprehensive coverage about Oracle Cloud current and future offerings.

Julian Orr, and Basheer Khan at the Oracle Fusion Middleware for the Cloud panel

(L-R) Sandeep Banerjie, Julian Orr, and Basheer Khan at the Oracle Fusion Middleware for the Cloud panel [Photo by Natasha K. Rogers (@NatashaKotovsky)]

I used my time to describe how the Oracle Applications User Experience team worked with Basheer Khan, (@bkhan) CEO of Knex Technology and OAUX Speaker, and its customers in an intensive onsite design workshop to rapidly develop a simplified approach for accurately assigning a constantly changing cadre of new hires to project resources to enable accurate management and accounting. Basheer followed my coverage of the simplified design process with a live demo the PaaS application that we co-designed.

The panel was well received, with a few nods for involvement of end users in the design process and demonstrated success in PaaS rapid development. The majority of the questions we addressed were focused on cloud security features.

Debra Lilley extols the user experience value of using PaaS for SaaS solutions.

Debra Lilley extols the Oracle Partner business value of using PaaS for SaaS solutions.

In the two sessions about using Oracle PaaS to Extend Oracle Cloud Applications, I joined Debra Lilley (@debralilley), Vice President of Cloud Services at Certus Solutions, Oracle ACE Director, and OAUX Speaker; and Ian Carline, Executive Vice President - Product Development at Certus Solutions, to discuss the design workshop we conducted with Certus to use PaaS to extend the Oracle HCM Cloud cloud functionality.

Debra and Ian did powerful jobs of stressing the absolute need and value of having a consistent user experience across PaaS and SaaS applications. My part of the presentation emphasized how to achieve a simplified user experience by focusing on these three things:

  • Design work: Before coding begins, employ a simplified design process that involves use-case review with end users and user advocates, sketching, and wireframing.

Following the presentation, much of the discussion centered on how to determine which use cases would make prime candidates for PaaS4SaaS projects.

As more partners and customers start designing and building PaaS solutions for the Oracle Applications Cloud SaaS offerings, I expect we will see that questions will begin to focus more and more on user experience. If it is not already, it will become, clear that to differentiate and win business in the cloud partners building and customizing enterprise apps need to compete on user experience as well as functionality. 

Interested in lifting off your business?

Enabling Edition Based Redefinition On A Schema With Object-Relational Tables

Randolf Geist - Mon, 2015-04-27 15:36
This is just a heads-up for those thinking about using Edition Based Redefinition (EBR) and enabling it on an existing schema with objects. Although EBR isn't exactly a new feature its current adoption level is probably not that high (which probably changes in future as Oracle E-Business Suite uses EBR now as part of their default upgrade procedure as far as I understood).

I was recently contacted by someone who enabled EBR on an existing schema using ALTER USER ... ENABLE EDITIONS and had to use the "FORCE" option since there were (according to the official ALTER USER documentation) "objects that are not editionable and that depend on editionable type objects in the schema. ... In this case, all the objects that are not editionable and that depend on the editionable type objects in the schema being editions-enabled become invalid".

Although one could say it is clearly mentioned in the documentation, the consequences are probably not that obvious to everyone if those non-editionable objects are tables having columns based on user-defined types. So I state it here to make it hopefully clear enough:

If you use the FORCE option of ALTER USER ... ENABLE EDITIONS to enable editions on an existing schema already containing objects and among those objects are tables having columns based on user-defined types, then effectively those tables will become invalid and stay invalid. There is no officially documented way to reverse this step or compile tables to become valid again (there's no ALTER TABLE COMPILE or similar). The table cannot be accessed any longer and all data contained is hence officially gone, too.

This means the affected tables need to be restored from a (hopefully existing and usable) backup (I don't know if there's a dictionary hack available that is officially sanctioned by Oracle support to make the table valid again).

In my opinion the FORCE option should check if the schema contains such dependent tables and in such a case error out with an error message that the table needs to be dropped first (or moved to a different schema) before ENABLE EDITIONS can succeed. This would make the situation much clearer, rather than leaving tables in INVALID state behind that cannot be fixed/recompiled afterwards.

Below is a simple test case that demonstrates the issue:

-- Create a test user for enabling editions
drop user ebr_test cascade;

create user ebr_test identified by ebr_test;

grant dba to ebr_test;

-- Connect as test user
connect ebr_test/ebr_test

-- and create a object relational type
create type test_coll_type as table of number;

-- and a table having such a column of that type
create table test_ebr_table (col1 number, col2 number, test_coll test_coll_type) nested table test_coll store as test_coll_table;

-- Some test data
insert into test_ebr_table (col1, col2, test_coll) values (1, 1, test_coll_type(1, 2 ,3));

commit;

-- Everything is fine so far
select * from test_ebr_table, table(test_coll);

-- Enable editions, FORCE is required
alter user ebr_test enable editions force;

-- This no longer works (ORA-04063: table "EBR_TEST.TEST_EBR_TABLE" has errors)
select * from test_ebr_table, table(test_coll);

-- Not even simple scalar values can be accessed from the table
select col1 from test_ebr_table;

-- The table has gone INVALID
select status from user_objects where object_name = 'TEST_EBR_TABLE';

Oracle Presentations at Chicago and Milwaukee Area .NET User Groups

Christian Shay - Mon, 2015-04-27 08:32

Attention Chicago and Milwaukee area .NET developers: Please join me next month as I visit the Lake County .NET Users' Group and the Wisconsin .NET Users Group to speak to members on the topic "Oracle .NET and Visual Studio: Intro and Best Practices". Details below. Please be sure to sign up at the user group websites so they know you are coming and to find out about any last minute changes in time/location. Free food and drink will be provided.

Tuesday May 12th, 7:00pm:
Wisconsin .NET Users Group

Meeting location:
Thomson Reuters 
(Town Hall)
450 North Sunny Slope Road 
Brookfield, WI 53005  

Thursday May 14th, 6:45 pm:
Lake County .NET Users' Group

Meeting location:
College of Lake County
Technology Building, room T326-328
19351 West Washington Street
Grayslake, IL 60030-1198

Oracle .NET and Visual Studio: Intro and Best Practices

The first part of this session introduces Oracle Database support for .NET, including Oracle Data Provider for .NET (ODP.NET) and Oracle Developer Tools for Visual Studio. Step by step demos will show how to get started using these free products. We will also discuss the latest features including fully-managed ODP.NET, schema comparison tools, Oracle Database 12c multitenant container database support, NuGet packaging, and new features for Entity Framework.

The second part of the session explores coding best practices for achieving faster .NET Oracle database access performance. We examine techniques for optimizing connection pooling, caching, data fetching and updating, statement batching, and Oracle data type usage. We show how to use Oracle tuning tools to tune adhoc SQL as well as tuning a running database application to get the best possible performance. 

See you there!

EBS R12.2 Delta 6 Feature Review : Single File System Instance

Senthil Rajendran - Mon, 2015-04-27 05:40
With one of the main feature in 12.2 dual file system, there was always a need about having a single file system in 12.2 like 12.1.x and get away with the ADOP patching cycle. With Delta 6 AD and TXK you can. It is important to understand the feature and know its limitations.

There are two advantages of this single file system feature in 12.2

  • no more synchronization of run and patch file system
  • save storage
Still it operates with same ADOP engine and it is NOT CERTIFIED for PRODUCTION.
This feature will be interesting for development team where they need an EBS 12.2 instance where they can test their custom code.

Here is how to setup 
  • Install R12.2 Instance with dual file system or Clone an existing environment with dual file system. No option available in the Rapid Installer to select single file system instance.
  • Remove the PATCH_BASE using operating system remove command rm -rf $PATCH_BASE
  • Apply the patch using in ADOP downtime mode and run cleanup phase as required
So what is not possible ?
  • You cannot clone the single file system to build another environment.
  • You cannot enable the dual file system back and start a patching cycle
Note : please refer to the recent product documentation to know the latest changes.

Book Review with a Real-World Application from a Master | Keeping It Simple, SaaSy

Usable Apps - Sun, 2015-04-26 02:29

By Floyd Teter, Director, Strategy Group, Oracle Higher Education Practice at Sierra-Cedar, Inc., and guest contributor

Floyd Teter (@fteter), Oracle ACE Director, Oracle Applications User Experience Speaker, ORCLville blogger, and main man behind ”simple is the new cool” shares his thoughts on a book about Lean UX.

A few months back, I received an interesting request from my Oracle Applications User Experience sensei, Ultan O’Broin (Mr. @usableapps). Ultan asked me to read and share opinions on the book Lean UX: Applying Lean Principles to Improve User Experience (Jeff Gothelf with Josh Seiden). I read a few reviews myself and got excited about what Gothelf was trying to do: build a framework for applying Lean principles to user experience (UX) design. I agreed to give it a go.

 Applying Lean Principle to Improve User Experience on Amazon

Lean UX: Applying Lean Principles to Improve User Experience by Jeff Gothelf with Josh Seiden

First, let’s be a bit more specific about the book. The intent is not just to apply broad Lean or Agile principles (Gothelf references both, sometimes interchangeably); the real intent is to apply the Scrum methodology to UX. It’s no secret that I’m a bit of a fan and heavily engaged with both Scrum and UX, so I was excited to dive in.

The meat of the book is divided into three sections: Introduction and Principles, Process, and Making It Work. Each section contains multiple chapters.

In the first section, Gothelf lays out the argument for Lean UX: internet-based software distribution, lower barriers to market entry, continuous integration, agile software development, continuous deployment—all activities that put pressure on teams to shorten cycles to release product early and often, critical to meeting the faster innovation cycles in the SaaS and PaaS world.

Gothelf proposes Lean UX as a deeply collaborative and cross-functional method that enables teams to build a shared understanding about UX design by focusing on objective goals rather than being distracted by deliverables and documents. Having presented this argument, Gothelf then discusses the three foundations of Lean UX: design thinking, agile software development, and the Lean Startup method of build-measure-learn feedback loops, originally founded by Eric Ries.

Design thinking, as defined by design firm IDEO CEO and president Tim Brown, is “innovation powered by . . . direct observation of what people want and need in their lives and what they like or dislike about the way particular products are made, packaged, marketed, sold and supported . . . a discipline that uses the designer’s sensibility and methods to match people’s needs with what is technologically feasible and what a viable business strategy can convert into customer value and market opportunity.” That’s a real mouthful, but it comes down to designing elegant and simple solutions that people will want to use.

Gothelf defines Agile methods by reviewing the Agile core values and utilizing Scrum to apply these core values. This is not new, but it was good to see Gothelf sign up for using Scrum in UX design. Makes sense.

Finally, Gothelf promotes build-measure-feedback loops. I’m still mostly onboard here, although my preferred viewpoint is a build-observe-learn approach (with observe being mostly watching and listening).

Throughout Part I, which is really a discussion of principles and theory, I’m thinking Gothelf could be my twin brother from a different mother. We’re both singing off the same sheet of music. Part II does seem to be more of a “difficult second album” though.

In Part II, Gothelf applies the principles discussed in Part I, a journey where the metaphorical wheels begin to come off the tour bus. Lean UX relies heavily on written deliverables and formal structure for starting up a UX design effort:

  • A hypothesis statement, with assumptions, hypotheses, outcomes, personas, and features 
  • A problem statement, with product and/or system goals, problem description, and a description of an explicit request for improvement that doesn’t dictate a specific solution 
  • A business assumptions worksheet, including prioritized assumptions 
  • A recommendation for written subhypotheses 
  • A written declaration of metrics to be used along with current state of each metric 
  • A written list of features matched to groups of user personas 

After we’re done with writing (he comments “finally!”), Gothelf proceeds to lay out some pretty formal structure for design studio sessions, including time-boxing presentation and critique, iteration and refinement, and team idea generation. Gothelf also argues for creating a style guide prior to design (as opposed to building concurrently as you progress and learn).

This is the point where Lean UX stopped making complete sense in my world. Agile and Scrum make a point of minimizing written deliverables, especially anything that might be a barrier to getting started with the actual design and build work; the idea being the sooner you get into feedback loops, the quicker you’ll deliver a product of outstanding quality. Gothelf acknowledges this in Part I, yet his recommended process is based on the opposite. Gothelf continues with the formality and structure throughout Parts II and III.

I’m now hard-wired against formality in development; software development cycles in the cloud almost demand that. Partners and developers need to create real solutions fast—formality presents the risk of getting wrapped up in management processes that distract from the essential tasks required to design, innovate and build rapidly.

A final point of contention for me comes with how feedback loops are addressed. These loops are mentioned a founding principle of Lean UX in Part I, yet there is almost no discussion of how to leverage their value (by observing and learning). How do you elicit feedback? How is feedback filtered for relevance and priority? What techniques are used to assure the user that he/she was heard . . . which, in turn, elicits even more feedback. Discussion? Tips? Techniques? Zip. Zero. Bupkis. Notta. Nothing.

My own applied techniques? I suggest following the discover-design-deploy approach on the Oracle UX Direct website.

Discover-Design-Deploy from Oracle UX Direct

Discover-design-deploy approach from UX Direct

Begin by recording the required features on Scrum story cards, cutting to the essence of what’s important from your discovery stage. I’d then follow the Scrum process for estimating and prioritizing features prior to starting the first design sprint. Now, I’ve tried lots of virtual Scrum boards for geographically-dispersed project teams to keep track of everything, but Trello remains a favorite. Sprint productivity can be further accelerated by use of UX design patterns and guidelines so that developers can focus in on technical areas.

Trello

Trello virtual Scrum board

In summary: The book presents great conceptual ideas, but the approach and implementation didn’t rock my world of delivering on enterprise applications UX today. It left me hoping for more.

My point of view would be to stay away from structural overheads and formality, and stay truer to Agile concepts. I’d recommend a mix tape The Elements of Scrum (Chris Sims and Hillary Louise Johnson) and the simple discover-design, and deploy approach to UX on the Usable Apps website.

Splash BI Reports mobile app

Splash BI reports app built using Agile

You’ll quickly build simple, elegant solutions.

Read more Floyd Teter insights on ORCLVille.

Oracle things that piss me off (pt 1)

Gary Myers - Sat, 2015-04-25 17:27

This annoys me.
The fact that Oracle thinks it is appropriate to sell me to 'Ask' whenever I update my Oracle JRE. 


On my home machines,I've ditched the Oracle route for JRE. Java runtime is a requirement for running Minecraft (now owned by Microsoft) and they've now incorporated keeping the JRE updated as part of their updates. No attempts to install some crappy piece of spyware on my machine. 

And it is at the stage where I trust Microsoft over Oracle any day of the week.



Using the Oracle Developer Cloud Service for Git version management for JDeveloper/ADF apps

Shay Shmeltzer - Thu, 2015-04-23 11:35

The Oracle Developer Cloud Service (DevCS for short) provides a complete cloud-hosted development platform for your team. This makes it very easy to start adopting development best practices for your team, and adopt a more agile development approach.

If you haven't tried it yet, you should!

It's simple to get a free trial instance - just sign up for a trial of the Java cloud service (which, by the way, will take you through anOracle ADF based registration wizard) and an instance of the Developer cloud service will be provisioned for you as part of the trial. No need for any additional machines or installations on your side.

I'm going to write a couple of blogs about the various features that DevCS provides such as build and continuous integration, but let's start with the very basic feature we all should be using - source code management.

Every project needs to do version management - even if you are a single developer - and with DevCS there is no server and network setup required. Create a new DevCS project and 10 seconds later you have your git server accessible from any computer that has internet access.

The demo below is using JDeveloper 12.1.3 and the sample summit ADF application that you can get from OTN. 

In the demo I start from scratch and demo how to

  • create a new DevCS project
  • check code into the git repository
  • branch my code to work on fixes
  • submit the changes back
  • how to do code review by team members
  • merge fixes to the master branch

 

Go ahead try it out with your project and your team.

If you are new to git (which has quickly became the new standard for source management) - check out the Oracle A-Team blog entry that explains a good workflow for team work with git that you can adopt. 

Have any further questions about using the Developer Cloud Service? Ask them on the DevCS community page

Categories: Development

Is MERGE a bug?

Chet Justice - Wed, 2015-04-22 21:57
A few years back I pondered whether DISTINCT was a bug.

My premise was that if you are depending on DISTINCT to return a correct result set, something is seriously wrong with your table design. I was reminded of this again recently when I ran across Kent Graziano's post on Better Data Modeling: Are you making these 3 beginner mistakes in your data models?. Specifically:
Instead of that, you should be defining a natural, or business, key for every table in your system. A natural key is a an attribute or set of attributes (that occur naturally in the data set) required to uniquely identify a row in that table. In addition you should define a Unique Key Constraint on those attributes in the database. Then you can be sure you will not get any duplicate data into the tables.

CLARIFICATION: This point has caused a lot of questions and comments. To be clear, the mistake here is to have ONLY defined a surrogate key. i believe that even if using surrogate keys is the best solution for your design, you should ALSO define an alternate unique natural key. So why MERGE?

I learned about the MERGE statement in 2008. During an interview, Frank Davis asked me about when I would use it. I didn't even know what it was (and admitted that) but I went home that night and...wait...I think he asked me about multi table inserts. Whatever, credit is still going to Mr. Davis. Where was I? OK, so I had been working with Oracle for about 6 years at that point and I didn't know about it. My initial reaction was to use it everywhere (not really)! You know, shiny object and all. Look! Squirrel!

Why am I considering MERGE a bug? Let me be more specific. I was working with a couple of tables and had not written the API for them yet and a developer was writing some PL/SQL to update the records from APEX. In his loop he had a MERGE. I realized at that moment there was 1, no surrogate key and 2, no natural key defined (which ties in with Kent's comments up above). Upon realizing the developer was doing this, I knew immediately what the problem was (besides not using a PL/SQL API to nicely encapsulate the business logic). The table was poorly designed.

Easy fix. Update the table with a surrogate key and define a natural key. I was thankful for the reminder, I hadn't added the unique constraint yet. Of course had I written the API already I probably would have noticed the design error, either way, a win for design.

Now, there are perfectly good occasions to use the MERGE statement. Most of those, to me anyway, relate to legacy systems where you don't have the ability to change the underlying table structures (or it's just cost prohibitive) or ETL, where you want to load/update a dimension table in your data warehouse.

Noons, how's that? First time out in 10 months. Thanks for the push.
Categories: BI & Warehousing

Dynamically refresh a part of a page (PPR) in Oracle MAF

Shay Shmeltzer - Wed, 2015-04-22 11:23

A common question for developers who are just starting with Oracle MAF, especially if they have a background in Oracle ADF, is how do you do a partial page refresh in Oracle MAF.

Partial Page Refresh basically means that I want to change something in my UI based on another event in the UI - for example hide or show a section of the page. (In ADF there is a partialTrigger property for components which is not there in MAF).

In MAF the UI behaves differently - it is not based on JSF after all - the UI directly reflects changes in managed beans as long as it knows about changes there. How does it know about changes? For this you need to enable firing change event notifications. This is actually quite easy to do - just turn on the checkbox in JDeveloper's accessors generation and it will do the job for you.

Here is a quick demo showing you how to achieve  this:

Here is the code used.

in AMX page:

     <amx:tableLayout id="tl1">

      <amx:rowLayout id="rl1">

        <amx:cellFormat id="cf2">

          <amx:listView var="row" showMoreStrategy="autoScroll" bufferStrategy="viewport" id="lv1">

            <amx:listItem id="li1">

              <amx:outputText value="ListItem Text" id="ot2"/>

              <amx:setPropertyListener id="spl1" from="#{'true'}" to="#{viewScope.backingPPR.showIt}"

                                       type="swipeRight"/>

              <amx:setPropertyListener id="spl2" from="#{'false'}" to="#{viewScope.backingPPR.showIt}"

                                       type="swipeLeft"/>

            </amx:listItem>

          </amx:listView>

        </amx:cellFormat>

      </amx:rowLayout>

      <amx:rowLayout id="rl2" rendered="#{viewScope.backingPPR.showIt}">

        <amx:cellFormat id="cf1">

          <amx:commandButton text="commandButton1" id="cb3"/>

        </amx:cellFormat>

      </amx:rowLayout>

    </amx:tableLayout>


in managed bean:

     boolean showIt = false;


    public void setShowIt(boolean showIt) {

        boolean oldShowIt = this.showIt;

        this.showIt = showIt;

        propertyChangeSupport.firePropertyChange("showIt", oldShowIt, showIt);

    }


    public boolean isShowIt() {

        return showIt;

    }


    public void addPropertyChangeListener(PropertyChangeListener l) {

        propertyChangeSupport.addPropertyChangeListener(l);

    }


    public void removePropertyChangeListener(PropertyChangeListener l) {

        propertyChangeSupport.removePropertyChangeListener(l);

    }


Categories: Development

Flipkart and Focus - 1 - Losing It?

Abhinav Agarwal - Wed, 2015-04-22 10:48
This is the first of a series of articles I wrote for DNA in April on why I believed Flipkart (India's largest online retailer and among the most highly valued startups in the world) was at losing focus, at the wrong time, when faced with its most serious competition to date.

"Why Flipkart seems to be losing focus", appeared in DNA on Sunday, April 12, 2015.

Part I
Among all start-ups that have emerged from India in recent and not-so recent times, Flipkart is likely to be at the top of most people’s minds. The list is admittedly weighted heavily in favour of newer companies, given that the Indian start-up ecosystem has only in the last decade or so started to pick up steam. But that is changing, and the list is getting longer and diverse, with such names as Urban Ladder, Zomato, Reel, Druva Software, WebEngage, etc…[1] in just the online segment. But today, in 2015, Flipkart is the big daddy of them; with total equity funding of US $2.5 billion and a valuation of a whopping US$11 billion as of April 2015, it was ranked the seventh most valuable start-up in the world[2] (though that was still a far cry from the $178 billion market cap enjoyed by US online retailer Amazon[3] and $220 billion market cap of Chinese online retailer Alibaba[4]).

Yet Flipkart seems to be in trouble.


Let’s ignore for the time being the fact that it loses much more money than it makes, and that scale does not seem to have lessened the bleeding of money – it’s caught in a situation where the more it sells the more it loses[5],[6]. How much of it is by design – i.e., a result of a decision to focus on scale and top-line, consciously sacrificing the bottom-line in the interim – is up for debate, but that Flipkart is a long way from profitability is undeniable. Let’s ignore this for the time being.

First off, it is no mean feat to start a company out of the proverbial garage and grow it, in less than a decade (since its start in 2007), into a billion dollar start-up[7]. And make it a leader in an industry. And do it in India. Flipkart has managed to do all that, and more. It has established, spectacularly so, that an Indian start-up can make it to the very top in a fiercely-contested space. Flipkart is, for the most part, has been a spectacularly successful start-up by most counts. Let nothing distract from that fact.

So why the hand-wringing? In one word, focus. Flipkart seems to be losing focus. Three reasons stand out in my mind.

First, the ongoing controversy and its decision to shutter its browser-based web site and force customers to use only its mobile app – on smartphones and tablets.
It has already shut down the mobile browser site of Mnytra – the online fashion retailer it acquired in 2014[8]. Navigate to Flipkart’s website on your browser from your smartphone or tablet and you have no choice but to download and install the app. Come May 1st, and Myntra’s website is planned to be shutdown completely![9] Elsewhere, there have been more than a whiff of rumours that Flipkart is contemplating shutting down its website[10]. This seems not only quite unnecessary, but more importantly, indicative of the grandstanding that is coming to mark some of Flipkart’s actions. Shutting down the web site to become an app-only retailer harms the company in tangible, monetary terms, while benefitting it in the currency of zero-value digital media ink.

WhatsApp, the world’s largest instant-messaging application and which started out and since its launch existed as only a mobile app – with more than 700 million users[11] - launched a browser version of its application in January 2015[12]. Facebook, the world’s largest social network, launched a browser version of its mobile app[13], Facebook Messenger. In case you are tempted to argue that Facebook took that step out of some sort of desperate need to boost numbers, keep in mind that Facebook Messenger had 500 million users in March 2015[14], before it launched its browser version of Messenger. Let’s round off with one more example: Flipboard, with more than 100 million users in 2014[15], launched a browser version in Feb 2015[16]. Yet Flipkart wants to shut down its website.

Is it because of technology? Limitations of mobile browsers? Well, yes, if you are still living in 2010. Half a decade is an eternity in Internet years! Small screen sizes were a big reason why apps were preferred a few years ago, where browser chrome (the title bar, address bar, footer, etc…) would eat up a substantial amount of precious screen real-estate. But in today’s world of gigantic 5” and larger screens, with HD or higher resolutions, this is a moot point[17]. Smartphones are becoming faster and more powerful – quad-core processors and multiple gigabytes of memory are more and more commonplace, 3G is gaining increased adoption even in emerging markets as India. With the availability of UI systems like jQuery Mobile and frameworks like PhoneGap that make a web site adapt to different form factors and which provide substantial support for gestural interactions without additional coding, old arguments hold little water. Unless perhaps you are a gaming developer.

Which Flipkart is not.

Another much-touted argument is that in a country like India, most of the online usage is now coming from mobile devices – smartphones and tablets. India has been ahead of the curve – perversely thanks to its anemic and sparse broadband coverage. According to Mary Meeker’s much-watched-read-downloaded “Internet Trends” presentation at the D10 Conference in May 2012, “Mobile Internet Usage Surpassed More Highly Monetized Desktop Internet Usage in May, 2012, in India”[18]. Indicative of this shift is the fact that in 2014 global smartphone sales overtook feature phone sales, for the first time. A little more than a billion phones were sold of each type[19]. Most of India’s billion mobile users will move towards smartphones by 2020. However, there is, and should be, scepticism over numbers – especially that project into the future. A report that estimated the number of Internet users in India at 300 million by Dec 2014 was questioned by NextBigWhat, a “A Global Media Platform For Technology Entrepreneurs”[20].

But with so little revenue coming from the web site, a Flipkart cannot afford to continue to maintain its website. “It just isn’t viable to have three separate platforms” - so goes one argument[21]. But this thinking betrays a lack of understanding of the distinction between a platform and a consumption channel on the one hand and an even poorer understanding of how complex software applications have been architected for many years now (and especially those that live in the cloud). The code, APIs, database, web server, middleware, identity management, authentication, shopping cart, order fulfilment, security – all of these are common whether you are accessing a site through a website or a mobile app or a mobile browser or even via a wearable device. If you prefer techno-alphabet-soup to describe this, you use a SOA-based approach to software design[22]. Developing a new user interface – desktop, mobile, tablet, etc… - becomes an incremental effort rather than a multi-year, multi-million dollar exercise.

Yes, many technology innovations in the world of retailing are happening in a way that is inextricably intertwined with mobile – like mobile payments and hyperlocal retailing for instance. Wal-Mart uses its mobile app to guide customers to and within its stores (using location tracking via GPS[23]). But they are not shutting down their website either.

If you are in the happy situation of having too many customers, and are ok with ceding a third or more of the online retail market to your competition[24], then shutting down an important channel for your sales is a good idea. And no, let’s not have the argument about cars and buggies either[25].

So why is Flipkart so obsessed, to the point of distraction, with the mobile app strategy?
Customer information and its mobile search ambitions for one.

End of Part I

[1] See "80+ Indian startups to work for in 2015", http://yourstory.com/2014/12/top-startups-india-work-job-employee/ , "80+ Indian startups to work for in 2015", http://yourstory.com/2014/12/top-startups-india-work-job-employee/, and "India Top | Startup Ranking", http://www.startupranking.com/top/india for a more exhaustive list.
[2] "The Billion Dollar Startup Club - WSJ.com", http://graphics.wsj.com/billion-dollar-club/ - accessed April 8, 2015.
[3] "Amazon.com, Inc.: NASDAQ:AMZN quotes & news - Google Finance", http://www.google.com/finance?chdnp=1&chdd=1&chds=1&chdv=1&chvs=maximized&chdeh=0&chfdeh=0&chdet=1428639923069&chddm=1173&chls=IntervalBasedLine&q=NASDAQ:AMZN&ntsp=0&ei=sFAnVeC4NpD6uAT5zIHoCg, accessed April 10, 2015
[4] "Alibaba Group Holding Ltd: NYSE:BABA quotes & news - Google Finance", http://www.google.com/finance?chdnp=1&chdd=1&chds=1&chdv=1&chvs=maximized&chdeh=0&chfdeh=0&chdet=1428640100641&chddm=1173&chls=IntervalBasedLine&q=NYSE:BABA&ntsp=0&ei=X1EnVamuCInwuAS5koAo , accessed April 10, 2015
[5] Per http://www.livemint.com/Companies/nEzvGCknQDBY2RgzcVAKdO/Flipkart-India-reports-loss-of-2817-crore.html, for the year ending March 31, 2013, “Revenue soared fivefold to more than Rs.1,180 crore from Rs.204.8 crore in the previous year”, but “expenses jumped more than five times to Rs.1,366 crore from Rs.265.6 crore last year” – clearly, they were not yet at the point where they could reap economies of scale. As an aside, Flipkart’s Mar 2009 FY revenues were approximately 2.5 crore rupees - http://www.sramanamitra.com/2010/10/06/building-indias-amazon-flipkart-ceo-sachin-bansal-part-3/ - and approximately 30 crore rupees for FY 2010 - http://www.sramanamitra.com/2010/10/07/building-indias-amazon-flipkart-ceo-sachin-bansal-part-4/.
[6] "For the year ended 31 March 2014, the losses of all Flipkart India entities amounted to Rs.719.5 crore on revenue of Rs.3,035.8 crore, according to data compiled by Mint from the Registrar of Companies (RoC) and Acra.", http://www.livemint.com/Companies/VXr8oJzNJ4daOYSO5wNETN/Inside-Flipkarts-complex-structure.html This tells us that both expenses and revenues are growing almost in lock-step – economies of scale are still elusive.
[7] "Flipkart claims to have hit a run rate of $1 bn in gross sales", http://www.business-standard.com/article/companies/flipkart-claims-to-have-hit-a-run-rate-of-1-bn-in-gross-sales-114030700029_1.html
[8] "Press Release - Flipkart.com", http://www.flipkart.com/s/press
[9] "Flipkart, Myntra Shut Mobile Websites, Force Visitors To Install Mobile App", http://trak.in/tags/business/2015/03/23/flipkart-myntra-shut-mobile-websites-force-mobile-app-install/
[10] "Flipkart moves towards becoming app-only platform - Livemint", http://www.livemint.com/Industry/J9VeQxowSOlHU8ZMUParUL/Flipkart-moves-towards-becoming-apponly-platform.html
[11] "• WhatsApp: number of monthly active users 2013-2015 | Statistic", http://www.statista.com/statistics/260819/number-of-monthly-active-whatsapp-users/
[12] "WhatsApp Web - WhatsApp Blog", https://blog.whatsapp.com/614/WhatsApp-Web
[13] "Facebook Launches Messenger for Web Browsers | Re/code", http://recode.net/2015/04/08/facebook-launches-messenger-for-web-browsers/
[14] "Facebook new Messenger service reaches 500 million users - BBC News", http://www.bbc.com/news/technology-29999776
[15] "The Inside Story of Flipboard, the App That Makes Digital Content Look Magazine Glossy", http://www.entrepreneur.com/article/234925
[16] "Flipboard Launches a Web Version For Reading Anywhere", http://thenextweb.com/apps/2015/02/10/flipboard-launches-full-web-version-display-feeds-browser/
[17] "The Surprising Winner of the HTML5 Versus Native Apps War | Inside BlackBerry", http://blogs.blackberry.com/2015/01/surprising-winner-of-html5-apps-war/
[18] "KPCB_Internet_Trends_2012_FINAL.pdf", http://kpcbweb2.s3.amazonaws.com/files/58/KPCB_Internet_Trends_2012_FINAL.pdf?1340750868
[19] "Global feature phone and smartphone shipments 2008-2020 | Forecast", http://www.statista.com/statistics/225321/global-feature-phone-and-smartphone-shipment-forecast/
[20] "300 million Internet Users in India By Dec? Grossly Wrong [10+ Questions to IAMAI] » NextBigWhat", http://www.nextbigwhat.com/300-million-india-internet-users-iamai-297/
[21] "Flipkart, Myntra’s app-only move draws mixed reactions - Livemint", http://www.livemint.com/Industry/v6SCQhhl94uriMLM3Qev6N/Flipkart-Myntras-apponly-move-draws-mixed-reactions.html
[22] "The Secret to Amazons Success Internal APIs ·", http://apievangelist.com/2012/01/12/the-secret-to-amazons-success-internal-apis/
[23] "Walmart Mobile - Walmart.com", http://www.walmart.com/cp/Walmart-Mobile-App/1087865
“[24] In 2014, 50 per cent of shopping queries were made through mobile devices, compared to 24 per cent in 2012”, http://www.business-standard.com/article/companies/google-says-indian-e-commerce-market-to-hit-15-bn-by-2016-114112000835_1.html
[25] "Failing Like a Buggy Whip Maker? Better Check Your Simile - NYTimes.com", http://www.nytimes.com/2010/01/10/business/10digi.html?_r=0

© 2015, Abhinav Agarwal (अभिनव अग्रवाल). All rights reserved.

Enable Real Application Security (RAS) in APEX 5.0

Dimitri Gielis - Mon, 2015-04-20 16:25
Oracle Database 12c introduced Oracle Real Application Security (RAS), the next generation Oracle Virtual Private Database (VPD). In APEX 5.0 RAS is declaratively build-in. Follow the below steps to enable it:

Login to the INTERNAL workspace and go to Manage Instance > Security:

In the Real Application Security section set Allow Real Application Security to Yes.

Next login to the Workspace your Application is build in and go to your Authentication Scheme.
You'll see a new section in there called Real Application Security.



The dropdown has following possibilities:

  • Disabled: Real Application Security does not get used in the application. 
  • Internal Users: APEX creates a RAS session and assumes that all users are internal and passes false via the is_external parameter to dbms_xs_sessions.assign_user. 
  • External Users: RAS session created and true gets passed via the is_external parameter to dbms_xs_sessions.assign_user. 

The last two options enable RAS Mode and make the Dynamic Roles and Namespaces shuttle available. (from the help in APEX) Make sure that the users get privileges to access the application's schema objects. For External Users, you can for example grant database privileges to a RAS Dynamic Application Role and configure it in this authentication scheme as a Dynamic Role. You can also enable roles via a call to apex_authorization.enable_dynamic_groups, e.g. in a Post-Authentication procedure.

You can read more about Oracle Real Application Security and view an entire example how to set up RAS at the database side. I'm still learning about all the RAS features myself too, but thought to already share the above. I plan to include a chapter in my e-book about RAS and APEX 5.0 with a real-case example, as I see a big benefit for using it in a highly regulatory, secure and audited environment.


Categories: Development

APEX Summer School 2015 - Online Webinare

Dietmar Aust - Mon, 2015-04-20 09:38
Im Rahmen der APEX Summer School 2015 ( Twitter Handle: #apexsummer2015 ) werden wir 9 kostenlose Webinare zum Thema APEX 5 mit den Experten aus dem deutschsprachigen Raum durchführen:



Vielen Dank an Carsten Czarski für die Einladung und Organisation! Nicht zuletzt auch vielen Dank für die klasse Homepage des Webinars, alles 100% APEX 5 out-of-the-box! Ein einfaches und dennoch wirkungsvolles Beispiel dafür, was standardmäßig mit APEX 5 möglich ist:

APEX 5 ist seit letzter Woche produktiv verfügbar und kann hier zum heruntergeladen werden.

Es gibt noch weitere APEX Veranstaltungen, schaut doch mal rein.

Es wird ein heißer APEX - Sommer ;).



Viel Vergnügen,
~Dietmar.

Destroying The Moon

Scott Spendolini - Mon, 2015-04-20 09:18
Just under three years ago, I joined Enkitec when they acquired Sumneva.  The next three years brought a whirlwind of change and excitement - new products, additional training, and expanding the APEX practice from an almost nonexistent state to one of the best in the world.

Like all good things, that run has come to an end.  Last Friday was my final day at Accenture, and I am once again back in the arena of being self-employed.  Without any doubt, I am leaving behind some of the best minds in the Oracle community.  However, I am not leaving behind the new friendships that I have forged over the past three years.  Those will come with me and hopefully remain with me for many, many years to come.

Making the jump for the second time is not nearly as scary as it was the first time, but it's still an emotional move.  Specifically what's next for me?  That's a good questions, as the answer is not 100% clear yet.  There's a lot of possibilities, and hopefully things will be a lot more defined at the end of the week.

#letswreckthistogether

PeopleSoft's paths to the Cloud - Part III

Javier Delgado - Mon, 2015-04-20 07:49
In my previous posts on this series, I have covered how cloud computing could be used to reduce costs and maximize the flexibility of PeopleSoft Development and Production environments. In both cases, I focused on one specific area of cloud computing, Infrastructure as a Service (IaaS).

Today I will explain what kind of benefits can be expected by using another important area: Database as a Service (DBaaS). Instead of using an IaaS provisioned server to install and maintain your database, DBaaS providers take responsibility for installing and maintaining the database.

There are many players in this market, including Amazon, Microsoft and Oracle. The service features may differ, but in a nutshell, they normally offer these capabilities:

  • Backups: the database backups are automated, and you can decide to restore point-in-time backups at any moment. You can also decide when to take a snapshot of your database, which may be eventually be used to create another database instance (for example, to copy your Production database into the User Acceptance environment).
  • High Availability: while some IaaS provider do not support high-availability database solutions such as Oracle RAC (for instance, it is not supported by Amazon EC2), many DBaaS providers include high availability by default.
  • Contingency: some providers maintain a standby copy of your database in another data center. This allows you to quickly restore your system in the case the original data center's services are lost.
  • Patching: although you can decide when to apply a database patch, the DBaaS will do that for you. In many case, you can turn on automatic patching, in order to make sure your database engine is always up to date.
  • Monitoring: providers give the system administrators access to a management console, in which they can monitor the database behavior and add or remove resources as needed.
  • Notifications: in order to simplify the monitoring effort, you normally have the possibility of setting up notifications to be received by email and/or SMS upon a list of events, which may include CPU usage, storage availability, etc.

Under my point of view, these services offer significant advantages for PeopleSoft customers, particularly if your current architecture does not support all the previously mentioned services or you do not have the right DBA skills in-house. Even if your organization does not fall in these categories, the scalability and elasticity of DBaaS providers is very difficult to match by most internal IT organizations.

In any case, if you are interested in using Database as a Service for your PeopleSoft installation, make sure you correctly evaluate what each provider can give you.



Debugging PeopleSoft Absence Management Forecast

Javier Delgado - Mon, 2015-04-20 07:47
Forecasting is one of the most useful PeopleSoft Absence Management functionalities. It allows users to know which is going to be the resulting balance when entering an absence. The alternative is to wait until the Global Payroll calendar group is calculated, which naturally is far from being an online calculation.

Although this is a handy functionality, the calculation process does not always return the expected results. For some specific needs, the system element FCST ASOF DT, FCST BGN DT and FCST END DT may be needed. These elements are null for normal Global Payroll runs, so the formulas may behave differently in these runs than in the actual forecast execution. If you ever hit a calculation issue in the forecast process that cannot be solved by looking at the element definitions, you may be stuck.

When this type of issues are found in a normal Global Payroll execution, one handy functionality is to enable the Debug information and then review the Element Resolution Chain page. This page shows the step by step calculation of each element and it is particularly helpful in identifying how an element is calculated.

Unfortunately, this information is not available in the standard forecast functionality. Luckily, it can be enabled using a tiny customisation.

In PeopleSoft HCM 9.1, the forecast functionality is executed from two different places:

DERIVED_GP.FCST_PB.FieldFormula - Abs_ForecastSetup function
FUNCLIB_GP_ABS.FCST_PB.FieldFormula - Abs_ForecastExec function

In both PeopleCode events, you will find a sentence like this one:

SQLExec("INSERT INTO PS_GP_RUNCTL(OPRID, RUN_CNTL_ID, CAL_RUN_ID, TXN_ID, STRM_NUM, GROUP_LIST_ID, RUN_IDNT_IND, RUN_UNFREEZE_IND, RUN_CALC_IND, RUN_RECALC_ALL_IND, RUN_FREEZE_IND, SUSP_ACTIVE_IND, STOP_BULK_IND, RUN_FINAL_IND, RUN_CANCEL_IND, RUN_SUSPEND_IND, RUN_TRACE_OPTN, RUN_PHASE_OPTN, RUN_PHASE_STEP, IDNT_PGM_OPTN, NEXT_PGM, NEXT_STEP, NEXT_NUM, CANCEL_PGM_OPTN, NEXT_EMPLID, UPDATE_STATS_IND, LANGUAGE_CD, EXIT_POINT, SEQ_NUM5, UE_CHKPT_CH1, UE_CHKPT_CH2, UE_CHKPT_CH3, UE_CHKPT_DT1, UE_CHKPT_DT2, UE_CHKPT_DT3, UE_CHKPT_NUM1, UE_CHKPT_NUM2, UE_CHKPT_NUM3,PRC_NUM,OFF_CYCLE) values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23,:24,:25,:26,:27,:28,:29,:30,:31,:32,%datein(:33),%datein(:34),%datein(:35),:36,:37,:38,:39,:40)", &OprID, &RunCntl_ID, &CalcRunId, &TxnID, 0, &SpaceFiller, "Y", "N", "Y", "N", "N", "N", &ApprByInd, "N", "N", "N", "N", &RunPhaseOptN, &RunPhaseStep, &SpaceFiller, &SpaceFiller, 0, 0, &SpaceFiller, &SpaceFiller, "N", "ENG", &SpaceFiller, 0, &SpaceFiller, &SpaceFiller, &SpaceFiller, "", "", "", 0, 0, 0, 0, "N");

You will notice that the RUN_TRACE_OPTN field is set to "N". If you use "A" instead as the trace option value, you will obtain the Element Resolution Chain:

SQLExec("INSERT INTO PS_GP_RUNCTL(OPRID, RUN_CNTL_ID, CAL_RUN_ID, TXN_ID, STRM_NUM, GROUP_LIST_ID, RUN_IDNT_IND, RUN_UNFREEZE_IND, RUN_CALC_IND, RUN_RECALC_ALL_IND, RUN_FREEZE_IND, SUSP_ACTIVE_IND, STOP_BULK_IND, RUN_FINAL_IND, RUN_CANCEL_IND, RUN_SUSPEND_IND, RUN_TRACE_OPTN, RUN_PHASE_OPTN, RUN_PHASE_STEP, IDNT_PGM_OPTN, NEXT_PGM, NEXT_STEP, NEXT_NUM, CANCEL_PGM_OPTN, NEXT_EMPLID, UPDATE_STATS_IND, LANGUAGE_CD, EXIT_POINT, SEQ_NUM5, UE_CHKPT_CH1, UE_CHKPT_CH2, UE_CHKPT_CH3, UE_CHKPT_DT1, UE_CHKPT_DT2, UE_CHKPT_DT3, UE_CHKPT_NUM1, UE_CHKPT_NUM2, UE_CHKPT_NUM3,PRC_NUM,OFF_CYCLE) values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23,:24,:25,:26,:27,:28,:29,:30,:31,:32,%datein(:33),%datein(:34),%datein(:35),:36,:37,:38,:39,:40)", &OprID, &RunCntl_ID, &CalcRunId, &TxnID, 0, &SpaceFiller, "Y", "N", "Y", "N", "N", "N", &ApprByInd, "N", "N", "N", "A", &RunPhaseOptN, &RunPhaseStep, &SpaceFiller, &SpaceFiller, 0, 0, &SpaceFiller, &SpaceFiller, "N", "ENG", &SpaceFiller, 0, &SpaceFiller, &SpaceFiller, &SpaceFiller, "", "", "", 0, 0, 0, 0, "N");

By performing this change, you will notice that GP_AUDIT_TBL table starts to be populated with the Element Resolution Chain information. However, it may still not be visible from the page itself, because some tables are only populated temporarily in the forecast execution. In order to enable the access for the forecast runs, you will need to customise the GP_AUDIT_SEG_VW search record by adding the lines in italics to the SQL definition:

SELECT DISTINCT A.CAL_RUN_ID 
 , A.EMPLID 
 , A.EMPL_RCD 
 , A.GP_PAYGROUP 
 , A.CAL_ID 
 , A.ORIG_CAL_RUN_ID 
 , B.RSLT_SEG_NUM 
 , A.FICT_CAL_ID 
 , A.FICT_CAL_RUN_ID 
 , A.FICT_RSLT_SEG_NUM 
 , B.RSLT_VER_NUM 
 , B.RSLT_REV_NUM 
 , B.SEG_BGN_DT 
 , B.SEG_END_DT 
  FROM PS_GP_AUDIT_TBL A 
  , PS_GP_PYE_SEG_STAT B 
 WHERE A.CAL_RUN_ID = B.CAL_RUN_ID 
   AND A.EMPLID = B.EMPLID 
   AND A.EMPL_RCD = B.EMPL_RCD 
   AND A.GP_PAYGROUP = B.GP_PAYGROUP 
   AND A.CAL_ID = B.CAL_ID 
  UNION ALL 
 SELECT DISTINCT A.CAL_RUN_ID 
 , A.EMPLID 
 , A.EMPL_RCD 
 , A.GP_PAYGROUP 
 , A.CAL_ID 
 , A.ORIG_CAL_RUN_ID 
 , A.RSLT_SEG_NUM 
 , A.FICT_CAL_ID 
 , A.FICT_CAL_RUN_ID 
 , A.FICT_RSLT_SEG_NUM 
 , 1 
 , 1 
 , NULL 
 , NULL 
  FROM PS_GP_AUDIT_TBL A 
 WHERE NOT EXISTS ( 
 SELECT 'X' 
  FROM PS_GP_PYE_SEG_STAT B 
 WHERE A.CAL_RUN_ID = B.CAL_RUN_ID 
   AND A.EMPLID = B.EMPLID 
   AND A.EMPL_RCD = B.EMPL_RCD 
   AND A.GP_PAYGROUP = B.GP_PAYGROUP 
   AND A.CAL_ID = B.CAL_ID)

I hope you find this useful. Should you have any question or doubt, I will be happy to assist.

Note: Keep in mind that it is not a good idea to leave the Debug information enabled for Production environments, at least permanently. The time needed to run a forecast calculation with this type of information is significantly higher than without it. So, if you do not want to hit performance issues, my recommendation is to store in a table a flag indicating if the Element Resolution Chain for forecast should be enabled or not.


Creating Sales Cloud Opportunity

Angelo Santagata - Mon, 2015-04-20 07:02

Common Payload creating opportunities

  <createOpportunity>
    <opportunity>
      <ChildRevenue>
        <ProdGroupId>300000000537006</ProdGroupId>
        <RevnAmount>45000.0</RevnAmount>
        <ResourcePartyId>300000000519815</ResourcePartyId>
      </ChildRevenue>
      <SalesStageId>300000000157471</SalesStageId>
      <Comments>Provide training to 250 salespersons and support staff</Comments>
      <EffectiveDate>2012-09-30</EffectiveDate>
      <WinProb>5.0</WinProb>
      <Name>New Sales Training</Name>
      <OptyCreationDate>2012-08-27T00:00:00.000</OptyCreationDate>
      <TargetPartyId>300000001025130</TargetPartyId>
      <OwnerResourcePartyId>300000000519815</OwnerResourcePartyId>
      <OpportunityResource>
        <ResourceId>300000000519815</ResourceId>
        <OwnerFlag>true</OwnerFlag>
      </OpportunityResource>
    </opportunity>
  </createOpportunity>




Sample Java Code

1. Generate Proxy using Java Tooling (like JDeveloper)
2. Java Code Snippet

public static void main(String[] args) {

        // Default Values
        String username = "matt.hooper";
        String password = "somepassword";
        String SSLSecurityPolicy = "oracle/wss_username_token_over_ssl_client_policy";

        SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] { new   
SecurityPolicyFeature(SSLSecurityPolicy) };

        String url="https://<yourhost>/opptyMgmtOpportunities/OpportunityService?WSDL";
        // Setup the webservice interface
        OpportunityService_Service opportunityService_Service = new opportunityService_Service();
        OpportunityService opportunityService = opportunityService_Service.getopportunityServiceSoapHttpPort(securityFeature);
        // Get the request context to set the outgoing addressing properties
        WSBindingProvider wsbp = (WSBindingProvider)opportunityService;
        Map<String, Object> requestContext = wsbp.getRequestContext();
        requestContext.put(WSBindingProvider.USERNAME_PROPERTY, username);
        requestContext.put(WSBindingProvider.PASSWORD_PROPERTY, password);
        requestContext.put(WSBindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);

        System.out.println("Example of creating an opportunity ");

        // Create Payload        
        ObjectFactory factory = new ObjectFactory();
        opportunity newopportunity=factory.createopportunity();
        newOpportunity.setName("Name of Opportunity");
        // Set other values
        //
        Opportunity result=opportunity.createOpportunity();
        // and so on




Function-Based Indexes And CURSOR_SHARING = FORCE

Randolf Geist - Mon, 2015-04-20 03:00
In general it is known that Function-Based Indexes (FBIs) can no longer be used by the optimizer if the expression contains literals and CURSOR_SHARING = FORCE / SIMILAR (deprecated) turns those literals into bind variables. Jonathan Lewis described the issue quite a while ago here in detail.

In a recent OTN thread this issue was raised again, but to my surprise when I played around with a test case that mimicked the OP's problem query I found that (certain) Oracle versions have some built-in logic that enable FBI usage for certain cases where you would expect them to be not usable.

If you test the following code on versions from 10.2.0.4 (possibly earlier) up to and including version 11.2.0.3 then you'll notice some interesting details:


create table t
as
select * from all_objects;

create index t_idx on t (owner || ' ' || object_name);

exec dbms_stats.gather_table_stats(null, 't')

set echo on linesize 200 pagesize 0

alter session set cursor_sharing = force;

select /*+ full(t) */ * from t where owner || ' ' || object_name = 'BLA';

select * from table(dbms_xplan.display_cursor);

select /*+ index(t) */ * from t where owner || ' ' || object_name = 'BLA';

select * from table(dbms_xplan.display_cursor);

select /*+ index(t) */ * from t where owner || 'A' || object_name = 'BLA';

select * from table(dbms_xplan.display_cursor);
Here is the relevant output I got from 11.2.0.1 for example:

SQL> alter session set cursor_sharing = force;

Session altered.

SQL>
SQL> select /*+ full(t) */ * from t where owner || ' ' || object_name = 'BLA';

no rows selected

SQL>
SQL> select * from table(dbms_xplan.display_cursor);
SQL_ID ar3tw7r1rvawk, child number 0
-------------------------------------
select /*+ full(t) */ * from t where owner || :"SYS_B_0" || object_name
= :"SYS_B_1"

Plan hash value: 1601196873

--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 284 (100)| |
|* 1 | TABLE ACCESS FULL| T | 1 | 117 | 284 (2)| 00:00:04 |
--------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

1 - filter("OWNER"||' '||"OBJECT_NAME"=:SYS_B_1)


19 rows selected.

SQL>
SQL> select /*+ index(t) */ * from t where owner || ' ' || object_name = 'BLA';

no rows selected

SQL>
SQL> select * from table(dbms_xplan.display_cursor);
SQL_ID 6kzz3vw5x8x3b, child number 0
-------------------------------------
select /*+ index(t) */ * from t where owner || :"SYS_B_0" ||
object_name = :"SYS_B_1"

Plan hash value: 470836197

-------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 4 (100)| |
| 1 | TABLE ACCESS BY INDEX ROWID| T | 1 | 117 | 4 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | T_IDX | 1 | | 3 (0)| 00:00:01 |
-------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

2 - access("T"."SYS_NC00016$"=:SYS_B_1)


20 rows selected.

SQL>
SQL> select /*+ index(t) */ * from t where owner || 'A' || object_name = 'BLA';

no rows selected

SQL>
SQL> select * from table(dbms_xplan.display_cursor);
SQL_ID 6kzz3vw5x8x3b, child number 1
-------------------------------------
select /*+ index(t) */ * from t where owner || :"SYS_B_0" ||
object_name = :"SYS_B_1"

Plan hash value: 3778778741

-------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 52472 (100)| |
|* 1 | TABLE ACCESS BY INDEX ROWID| T | 724 | 84708 | 52472 (1)| 00:10:30 |
| 2 | INDEX FULL SCAN | T_IDX | 72351 | | 420 (1)| 00:00:06 |
-------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

1 - filter("OWNER"||:SYS_B_0||"OBJECT_NAME"=:SYS_B_1)


20 rows selected.
Looking at the statement text that results from "CURSOR_SHARING = force" we can spot the expected bind variables instead of the literals, and this should result in a corresponding predicate that doesn't match the FBI expression. However, when looking at the filter expression in the predicate section (when forcing a full table scan) we can spot something interesting: It still shows the literal, which doesn't correspond to the predicate of the rewritten query text.

The next execution shows that the FBI really can be used despite the bind variable replacement taking place, and the final execution shows that the cursor sharing works correctly in that sense that a new child cursor got created for the same SQL text with a different plan and different predicate section when using a different literal in the original SQL text. V$SQL_SHARED_CURSOR shows "HASH_MATCH_FAILED" which is described as "No existing child cursors have the unsafe literal bind hash values required by the current cursor", which makes sense and probably means that the corresponding bind variable is marked as "unsafe" internally.

This optimisation shows only up if there is a suitable FBI - if there's no corresponding expression the SQL text and predicate section match. Furthermore it only supports certain expressions - Jonathan's example shows that in general it's true that these rewrites prevent FBI usage. And obviously it ceases to work in 11.2.0.4 and 12c. Whether this is a bug or a feature I don't know, but since it only seems to apply to certain expressions it's probably not that relevant anyway.

As Jonathan points out in his note you can always work around the general problem by hiding the expression in a view, and since 11g of course a proper virtual column definition is the better approach, which doesn't expose this problem either.

Even better would be the proper usage of bind variables and not using forced cursor sharing, but there are still many installations out there that rely on that feature.

Pages

Subscribe to Oracle FAQ aggregator