Development

I'm On a New Blog Platform!

Shay Shmeltzer - Fri, 2017-05-05 12:15

This happens every several years, our blogging platform at Oracle is switching to a new environment, and my blog is one of those moving. In the next few days I'll be testing to see if content migration did its magic and everything works.

If you run into any broken entries/links/samples please drop me a line or just comment on the specific blog entry, and I'll try to fix things.

Categories: Development

Getting the Database Backup Report for all Monitored Targets in Enterprise Manager

Arun Bavera - Fri, 2017-05-05 09:05
Use the following query in BIP:

SELECT DATABASE_NAME                                  AS CONFIGURATION_TARGET_NAME    ,
      mgmt$ha_backup.TARGET_TYPE,
 host                                                                                                                                            AS HOST_NAME                              ,
'DB Backup Status'                                                                                                                        AS CONFIGURATION_STANDARD                ,
status                                                                                                                                                AS ACTUAL_VALUE             ,
    CASE    WHEN ( mgmt$ha_backup.status = 'COMPLETED' AND round(sysdate-end_time)<=1 ) THEN 'YES'
            ELSE 'NO'
    END VALIDATION_PASSED,
    input_type,
    output_device_type ,
TO_CHAR(end_time,'YYYY-MM-DD HH24:MI:SS')                                                                            AS COLLECTION_DATE                                ,
    TO_CHAR(start_time,'YYYY-MM-DD HH24:MI:SS') START_TIME,
    TO_CHAR(end_time,'YYYY-MM-DD HH24:MI:SS') END_TIME,
    round(sysdate-end_time) LATEST,
    TIME_TAKEN_DISPLAY TimeTaken,
    INPUT_BYTES_DISPLAY INPUT,
    OUTPUT_BYTES_DISPLAY OUTPUT,
    OUTPUT_BYTES_PER_SEC_DISPLAY OUTPUT_SEC
FROM   mgmt$ha_backup
WHERE  DATABASE_NAME in (  SELECT  unique(MEMBER_TARGET_NAME)
                              from   mgmt$target_flat_members,
                                     mgmt$target_properties
                              where  member_target_type in ( 'rac_database' ,'oracle_database')
                              and    aggregate_target_name = 'Prod-Grp'
                              AND   mgmt$target_flat_members.MEMBER_TARGET_NAME = mgmt$target_properties.target_name
                              AND   mgmt$target_flat_members.member_target_type = mgmt$target_properties.target_type
                              AND   mgmt$target_properties.property_name = 'OpenMode'
                              AND   mgmt$target_properties.property_value= 'READ WRITE'
                       MINUS
                              SELECT   s1.target_name
                              FROM
                                      MGMT$TARGET s5                 ,
                                      GC$ASSOC_INST_WITH_INVERSE s5a1,
                                      MGMT$TARGET s1
                              WHERE  (   s5a1.SOURCE_ME_GUID = s1.TARGET_GUID
                                          AND s5a1.DEST_ME_GUID   = s5.TARGET_GUID
                                          AND s5.TARGET_TYPE      = 'rac_database'
                                          AND s5a1.ASSOC_TYPE     = 'member_of_cluster'
                                      )
                                      AND s1.TARGET_TYPE = 'oracle_database')

ORDER BY VALIDATION_PASSED
Categories: Development

Arup Nanda on Big Data

Gerger Consulting - Thu, 2017-05-04 14:45
Attend our free webinar and learn from the legendary Oracle DBA Arup Nanda about the Big Data ecosystem and how it compares to Oracle solutions.

Register at this link.


About the Webinar

Big Data is the future of database computing and knowing about it not just a luxury you can avoid anymore; it's necessary for survival and growth. But Hadoop, Spark, Hive, Map/Reduce, Flume - if these terms hit you more often than you have the time to pause and think about them, look no further. Learn about these and more in this informative session on this Big Data components explained from the perspective of an Oracle professional, how they are same or different and how they compare with RAC or parallel query.

Register today.
Categories: Development

Passing Business Object Values to Custom UI Components in ABCS

Shay Shmeltzer - Mon, 2017-04-24 17:29

This quick one is based on a customer question about Oracle Application Builder Cloud Service. The scenario is that we have a business object that has a field that contains the URL to an image. We want to be able to show that image on a page in Oracle Application Builder Cloud Service.

animated GIF

To do that I add a custom UI component object to the details (or edit) page of a record - then I switched the HTML of that object to be: <img id="logoimg"/>

custom code

I then added a button to the page and added a bit of custom JavaScript code in its action as follow:

var img = document.getElementById('logoimg');

img.src=$Company.getValue('Logo');

resolve();

This code simply locates the custom object on the page using the object id and then sets the src property of the img html tag to match the value of the field in the business object.

Code in Button

Categories: Development

Custom UI Components in Oracle ABCS for Dynamic Image Display

Shay Shmeltzer - Mon, 2017-04-24 17:29

This quick one is based on a customer question about Oracle Application Builder Cloud Service. The scenario is that we have a business object that has a field that contains the URL to an image. We want to be able to show that image on a page in Oracle Application Builder Cloud Service.

animated GIF

To do that I add a custom UI component object to the details (or edit) page of a record - then I switched the HTML of that object to be: <img id="logoimg"/>

custom code

I then added a button to the page and added a bit of custom JavaScript code in its action as follow:

var img = document.getElementById('logoimg');

img.src=$Company.getValue('Logo');

resolve();

This code simply locates the custom object on the page using the object id and then sets the src property of the img html tag to match the value of the field in the business object.

Code in Button

Categories: Development

We're All In This Thing Together

Greg Pavlik - Fri, 2017-04-14 17:26
This song pretty much summarizes everything I've learned to be true about life after nearly five decades of living...

Well my friend, well I see your face so clear
Little bit tired, a little worn through the years
You sound nervous, you seem alone
I hardly recognize your voice on the telephone

In between I remember
Just before we wound up broken down
We'd drive out to the edge of the highway
Follow that lonesome dead-end roadside sound

We're all in this thing together
Walkin' the line between faith and fear
This life don't last forever
When you cry I taste the salt in your tears

Well my friend let's put this thing together
And walk the path that worn out feet have trod
If you wanted we can go home forever
Give up your jaded ways, spell your name to God

We're all in this thing together
Walkin' the line between faith and fear
This life don't last forever
When you cry I taste the salt in your tears

All we are is a picture in a mirror
Fancy shoes to grace our feet
All that there is is a slow road to freedom
Heaven above and the devil beneath

We're all in this thing together
Walkin' the line between faith and fear
This life don't last forever
When you cry I taste the salt in your tears

Apache Spark for Oracle Developers

Gerger Consulting - Tue, 2017-04-11 01:27
In the last few years, business problems that have been traditionally solved using databases are now being solved using other technologies. Apache Spark is one of the emerging technologies which is used for large scale data processing.

Attend the free webinar by Ivan Lokic and learn how you can use Apache Spark in Big Data applications.  


About the Webinar:
Apache Spark is a general computing engine designed for large-scale data processing. Many well-known companies use it to process petabytes of data on 8000+ nodes with long running jobs measured in weeks.


In this webinar, you will learn about:
  • Apache Spark and how Spark relates to (traditional) Hadoop MapReduce technology
  • What makes Spark so fast
  • How to use the rich set of Spark API’s to design and run your ETL jobs
  • Apache Spark streaming capabilities for near real-time updates and its role in Big Data processing scenarios
  • Structured Streaming, a scalable and fault tolerant stream processing engine which makes near real-time processing scenarios even easier
The webinar is free but space is limited.

Categories: Development

Take a few minutes to patch Oracle APEX 5.1

Dimitri Gielis - Wed, 2017-03-29 08:00
Yesterday a first patch set of Oracle Application Express (APEX) 5.1 has been made available to download.

one-of patches

If you encounter issues, you can ask for support and most likely a bit later a patch is made available through support.oracle.com. The APEX team is doing a great job with this.

For example some people using APEX Office Print had an issue which was caused by a bug in APEX_JSON (which we heavily use behind the scenes). The next day the APEX Dev Team already made a patch available (PSE 25650850).

patch set

Instead of applying those one-off patches, you can wait for a patch set which includes those one-off patches and more. If you didn't move to Oracle APEX 5.1 yet, you can just download the latest version which includes 5.1.1 immediately. 

There're many fixes for the Interactive Grid features, but next to that, many others as well, like for example login issues.

applying the patch set

If you're on Oracle APEX 5.1, search for patch 25341386. Unzip the file, stop the webserver, run @apxpatch, copy the images folder and start the webserver again.
About 2 minutes later you're on the latest version. 


Happy patching...
Categories: Development

Best Way to Write SQL in Java

Gerger Consulting - Wed, 2017-03-15 01:17

Many of us struggle writing SQL in Java. ORM tools such as Hibernate often generate SQL statements that result in poor application performance. Surely, there must be a better way to write SQL in Java.



Attend the free webinar by Java Champion Lukas Eder to learn the best way to write SQL in Java. Find out how you can use SQL as a type safe domain specific language in Java.

Sign up for the free webinar.

Categories: Development

ORA-01031 insufficient privileges Solution

Complete IT Professional - Fri, 2017-03-10 05:00
Are you getting the “ORA-01031 insufficient privileges” error? Learn what causes this error and how to resolve it in this article. ORA-01031 Cause The cause of the ORA-01031 error is that you’re trying to run a program or function and you don’t have the privileges to run it. This could happen in many situations, such […]
Categories: Development

Passing Values Between Pages in Oracle Application Builder Cloud Service

Shay Shmeltzer - Thu, 2017-03-09 12:50

A common use case for applications that have multiple pages is passing values between pages. For example you might want to pick up a specific record or value in one page and then use that as a parameter for a query in another page.

In the February release or Oracle Application Builder Cloud Service as part of the extension hook points that we provide, we added support for shared resources. These are JavaScript libraries you can add to your application - and that can be used across your app.

In the demo below I show you how you can use the built-in sample template for a shared resource to define a variable, and then how that variable is exposed in various places in the product through the expression builder allowing you to set its value in one page and use that value in another one.

Check it out:

Categories: Development

Passing Values Between Pages in Oracle Application Builder Cloud Service

Shay Shmeltzer - Thu, 2017-03-09 12:50

A common use case for applications that have multiple pages is passing values between pages. For example you might want to pick up a specific record or value in one page and then use that as a parameter for a query in another page.

In the February release or Oracle Application Builder Cloud Service as part of the extension hook points that we provide, we added support for shared resources. These are JavaScript libraries you can add to your application - and that can be used across your app.

In the demo below I show you how you can use the built-in sample template for a shared resource to define a variable, and then how that variable is exposed in various places in the product through the expression builder allowing you to set its value in one page and use that value in another one.

Check it out:

Categories: Development

ORA-00937: not a single-group group function Solution

Complete IT Professional - Wed, 2017-03-08 05:00
Have you received an ORA-00937: not a single-group group function error? Learn what it is and how to fix it in this article. ORA-00937 Cause The cause of the ORA-00937 error is that a SELECT statement is trying to be executed, and the SELECT statement has an aggregate function (e.g. COUNT, MIN, MAX, SUM, or […]
Categories: Development

Business Logic in Oracle Application Builder Cloud Service

Shay Shmeltzer - Tue, 2017-03-07 16:35

As you start building more complex applications in Oracle Application Builder Cloud Service, you'll might need to define more complex interactions between objects or validations on rows of data or specific fields.

In the new version of ABCS that we rolled out in February we added these type of capabilities.

There are several things you could do with the new Business Rules section of ABCS

  • Triggers - allow you create logic that will be executed in specific CRUD events such as when you insert, remove or update a record.
  • Object Validators - allowing you to define checks across multiple fields in your object
  • Field Validators - allowing you to define a check on specific field values.
  • Object Functions - reusable functions that can be called from the other points

Note that these logic points will be running on the server side of ABCS. 

In the video below I demonstrate a couple of these capabilities. You'll learn how to update one object when a specific value is set in another object's field. You'll also see how to check whether a combination of values in fields in a record is valid.

Check it out:

&amp;lt;p&amp;gt; &amp;lt;/p&amp;gt;

Here is a screenshot of the nice logic flow editor:

Categories: Development

Business Logic in Oracle Application Builder Cloud Service

Shay Shmeltzer - Tue, 2017-03-07 16:35

As you start building more complex applications in Oracle Application Builder Cloud Service, you'll might need to define more complex interactions between objects or validations on rows of data or specific fields.

In the new version of ABCS that we rolled out in February we added these type of capabilities.

There are several things you could do with the new Business Rules section of ABCS

  • Triggers - allow you create logic that will be executed in specific CRUD events such as when you insert, remove or update a record.
  • Object Validators - allowing you to define checks across multiple fields in your object
  • Field Validators - allowing you to define a check on specific field values.
  • Object Functions - reusable functions that can be called from the other points

Note that these logic points will be running on the server side of ABCS. 

In the video below I demonstrate a couple of these capabilities. You'll learn how to update one object when a specific value is set in another object's field. You'll also see how to check whether a combination of values in fields in a record is valid.

Check it out:

&lt;p&gt; &lt;/p&gt;

Here is a screenshot of the nice logic flow editor:

Categories: Development

60 SQL Interview Questions and Answers

Complete IT Professional - Mon, 2017-03-06 05:00
Are you going for a job where you need to know SQL, such as a Database Developer or Database Administrator? Brush up on your interview questions with this extensive list of SQL interview questions. This collection of interview questions on SQL has been collated from my experience with SQL and from various websites. It contains […]
Categories: Development

ORA-00907: missing right parenthesis Solution

Complete IT Professional - Fri, 2017-03-03 05:00
Did you get an ORA-00907: missing right parenthesis error? Learn what caused it and how to resolve it in this article. ORA-00907 Cause When working with Oracle SQL, all left parenthesis (the “(” character) must be paired with a right parenthesis character (the “)” character). If there are more left parentheses than right parentheses, then […]
Categories: Development

ORA-06502 PLSQL numeric or value error Solution

Complete IT Professional - Wed, 2017-03-01 05:00
Are you getting an ORA-06502 error message when working with Oracle SQL? Learn how to resolve it and what causes it in this article. ORA-06502 Cause The cause of the “ORA-06502 PL/SQL numeric or value error” can be one of many things: A value is being assigned to a numeric variable, but the value is […]
Categories: Development

Updating the Oracle EM12c Agent Configuration Properties in Bulk

Arun Bavera - Tue, 2017-02-28 14:41
 
1. Goto Enterprise->Job ->Activity->Choose from ‘create Job’ list -> Agent Configuration Operation ->Click Go
image
Give job name and Add all the Agent Targets you want to modify
clip_image004
Goto Parameter tab and Add Custom properties or Change the existing listed properties values.
For example:
Name:     Log.log.level
Value:     ERROR
imageThis job does not require any credentials.
Click Submit:









Categories: Development

Oracle GROUP BY – The Complete Guide

Complete IT Professional - Mon, 2017-02-27 05:00
The Oracle GROUP BY clause is a powerful clause, especially when analysing large amounts of data. Learn what the GROUP BY clause is and everything you can do with it in this article. In this article, we will cover: What Is The GROUP BY Clause? Sample Data Examples of Aggregate Functions with GROUP BY Filtering […]
Categories: Development

Pages

Subscribe to Oracle FAQ aggregator - Development