Oracle Identity Column

An Identity column auto increments on input, introduced from Oracle 12C, it’s a useful for the surrogate primary key column.

Syntax:

GENERATED [ ALWAYS | BY DEFAULT [ ON NULL ] ] AS IDENTITY [ ( identity_options ) ]

create table FAQS
(id number(10) GENERATED ALWAYS AS IDENTITY START WITH 1, faq varchar (1000))
;

// add a primary key constraint

ALTER TABLE FAQS
ADD PRIMARY KEY (id);

Sending emails using an APEX application- part 1

This article summaries the steps taken to configure APEX application to send emails.

We shall use the email delivery service from Oracle Cloud.

New to Oracle cloud? Get a free trial version of Oracle cloud here.

The assumption is that you have already configured your IAM policies correctly ie. the user we use is in a group (ie. MailGroup ) which has a policy passed to manage approved mail senders.

Allow group MailGroup to manage approved-senders in compartment CompartmentA /tenancy etc.

Learn more about Oracle Email delivery policies here.

Let’s now set up the user SMTP credentials.

To generate SMTP credentials of the user to use in our email delivery, navigate to the user’s profile on Oracle Cloud -> Identity -> Users -> select your user.

On the left side click SMTP Credentials -> Click on generate credentials.

Save the username and password generated. You shall use them later on configuring your APEX application.

Add the user on the Email approved Senders’ List of Oracle Email Delivery.

Navigate to your cloud console to Email Delivery -> Email Approved senders- > create approved sender. (add the user)

Next click on the Email configuration to get the SMTP connection endpoint. (Save it for later use)

ie. smtp.email.eu-frankfurt-1.oci.oraclecloud.com

Set Email Parameters on the Database

Connect to your Database as ADMIN and execute the PL/SQL script below. If you are using Autonomous database, you can connect to your DB using SQL Developer Web.

BEGIN
APEX_INSTANCE_ADMIN.SET_PARAMETER('SMTP_HOST_ADDRESS', 'Your SMTP connection endpoint ie. smtp.email.eu-frankfurt-1.oci.oraclecloud.com');
APEX_INSTANCE_ADMIN.SET_PARAMETER('SMTP_USERNAME', 'smtp username generated');
APEX_INSTANCE_ADMIN.SET_PARAMETER('SMTP_PASSWORD', 'smtp password generated');
COMMIT;
END;
/

Send Email from APEX

Now login to APEX and navigate to SQL workshop to run this command.

BEGIN
apex_mail.send(p_from => 'your approved email sender',
p_to => 'ncve3@gmail.com',
p_subj => 'Email from Autonomous',
p_body => 'It worked!!');
apex_mail.push_queue();
END;
/

Once you run that PL/SQL an email is sent to your client!

Monitoring

You can monitor the mail logs using these commands or using your APEX admin dashboard (Monitor activity\ Mail Log).

Select * from apex_mail_log;

SELECT * FROM APEX_MAIL_QUEUE;

Next

We shall use the now configured email functionality to send emails from APEX application process.

References

Sending Emails from APEX by Sinan

Sending Emails from your APEX by Chaitanya Koratamaddi

A multi cloud strategy in cloud adoption

Cloud computing is the convenient model of computing where users can access from anywhere a shared pool of resources and pay only for what they consume.

It has been largely adopted by majority of the startups , SMEs (Small and Medium-sized Enterprises), and large enterprise businesses. Among the reasons being that it makes the businesses to focus on the core of their business as the cloud provider offers a scalable, reliable and on demand infrastructure, platform or software service.

Multi cloud strategy is the newly adopted trend where businesses are involving more than one cloud vendor to support their business. This should not be confused with hybrid computing.

Hybrid computing refers to when a business runs some of it’s workloads on premise and other on a public or private cloud with a secured connection between the two. Multi cloud on the other hand refers to when a business involves different cloud providers to run it’s workloads.

Some of the benefits of a Multi Cloud Strategy include:

  • Avoiding Vendor lock in – Some enterprises are afraid of being locked into a single vendor- thus with the multi cloud strategy they are not “dependent” on a single cloud provider.
  • Redundancy and Performance – Every enterprise wants to have a continual up time and performance to beat their competition. This makes them approach multi cloud strategy to support their strategy.
  • Data sovereignty /Compliance – Due to different regulations, some enterprises are forced to adopt certain cloud vendors within their regions or within the stipulated regulations regarding data .

However, a multi cloud strategy comes at cost such as you require a large talent pool to handle the various technologies from the various vendors, this can also lead to management complexity.

Some cloud vendors have already adopted the multi cloud model.

Oracle Cloud and Microsoft Azure cloud have a interoperability partnership allowing customers to run mission critical enterprise workloads across both clouds.

Google embraces the mult cloud strategy with Anthos, an open application modernization platform.

As an enterprise, you need to evaluate your current status on the digital transformation journey, where you are today and where you target to be, then choose wisely a cloud strategy that shall offer you a high ROI.

Laban.

Today, the greatest concern on many enterprise IT infrastructures is manageability, reliability , availability, performance, security, scalability just to list a few.

If a multi cloud strategy solves the above challenges for you, then it’s time you take the leap.

References:

Tech Target

ZD Net

Oracle News

Google News