Thursday, May 18, 2017

Moving your APEX Workspace to a Clone

Last September I posted a list of steps to take when cloning an Oracle database that has APEX installed. The scenario is common for some, especially EBS customers--clone production and turn it into development. You have fresh data that way and are sure that you are developing against the exact configuration of the production environment. I'm not suggesting this as a best practice--I'm just recognizing that it happens.

In addition to the steps I described in September, I recently ran into the need to migrate Workspace users and Team Development content from an existing development instance into the new production clone. If you've followed the best practice of initially exporting your workspace from Dev and migrating it to Test and Production, moving users and other content into the clone is pretty easy. By having the same workspace in Dev, Test and Production you automatically also have it in the Production clone.

I won't say this process is supported, but we have used it successfully.

Step 1: Log into the APEX_ADMIN application (INTERNAL workspace).

Step 2: Export the workspace that has the Team Development content you wish to migrate.

Step 3: Edit the export file and remove the following

The section that begins:  prompt  Creating workspace ABC
Any groups that already exist or that you don't wish to create in the clone: wwv_flow_api.create_user_groups 
Any users that exist or that you don't wish to create: wwv_flow_fnd_user_api.create_fnd_user

Step 4: Run the edited file in the APEX_nnnnnn user of the clone.

That's it. Your Team Dev content should be there.

Thursday, May 04, 2017

The Benefits of an IoT Cloud Infrastructure

I recently presented on the Internet of Things at the Montreal Oracle Developer Day. It was a great day of Oracle tech and I had an engaged and enthusiastic group of participants. The session was less than on hour long, yet during this time a few attendees assembled an IoT thermostat while I created an Oracle REST Data Services (ORDS) JSON service to interact with device. I also created an APEX application to control the device and report on the data it passed to the service. I ended the session with an overview of the benefits of an IoT Cloud Infrastructure--specifically Oracle's IoT Cloud Service. After the session a couple people asked me why I used an Electric Imp instead of a Raspberry Pi. These questions let me know that I didn't do enough to highlight the benefits of the infrastructure services.

I often do this presentation as a hands-on lab during which every participant builds a physical device. I may have 60 or more devices to prepare for a single session. While that is a lot of devices, it pales in comparison to the volume of devices that a typical IoT product might involve. How many Nest and Ecobee thermostats are in the wild? Fitbits? Initially programming the devices, hooking them up to a wifi network, communicating with the devices through firewalls and across wide area networks, pushing patches to the devices are big concerns when dealing with the scale associated with IoT. A few years ago, I chose the Electric Imp as a device because it has a built-in infrastructure for handling these kinds of concerns. A Raspberry Pi is a great device, but it doesn't have the built-in IoT support that comes with an Electric Imp.

Oracle is addressing these requirements through its IoT Cloud Service (IOTCS). The benefits of using an IoT infrastructure include the following:

  • Device Virtualization
  • High Speed Bi-Directional Messaging
  • Device Management
  • Stream Processing, Data Enrichment, Event Store
  • Integration via applications and APIs

If you are looking to build a product, it's time to consider an IoT platform. I'll discuss more about the Oracle IoTCS in a future post.

For now, though, I want to encourage people to play with whatever physical to software interface is fun to work with. Inexpensive and effective sensors are readily available. Electric Imp, Raspberry Pi, Arduino, Zensio, Sparkfun Thing and many other platforms make it easy to build up a device. Have fun.