Feed aggregator

Richard Foote Consulting Has Arrived (New Angels Of Promise)

Richard Foote - Sun, 2017-09-17 17:32
Today is the official launch of Richard Foote Consulting, my new independent company in which I’ll be providing specialist Oracle Database consulting and training services, focusing on database performance tuning, database problem resolutions and database health check assessments (at least until everyone moves across to the new self-tuning Oracle Cloud database). Based on all the […]
Categories: DBA Blogs

Protection From Equifax Data Breach

Michael Dinh - Sun, 2017-09-17 15:00

Place fraud alert – this only needs to be done from one credit bureau and it will be forwared to all others.

To be safe, I have sucessfully placed fraud alert for TransUnion and Equifax. Was not successful with Experian.

Place credit freeze for Equifax only. Freezing all 3 bureaus will be a pain in the arse for when establishing credit.

Should the business use Equifax exclusively, then there’s a choice to unfreze credit from Equifax or take the business elsewhere.

Preference would be take business elsewhere. At this moment, credit freeze at Equifax is planned to be for life.

After placing fraud alert, I got alerted from CreditWise, a free basic credit monitoring from Capital One credit card.

Heads up: there was some activity on your TransUnion credit report.

Visit the Alerts section of CreditWise® from Capital One® to review your recent TransUnion credit report change.
To protect your privacy, we aren’t including any confidential details here.
Sign in soon—staying on top of your credit can help you defend yourself against potential fraud or identity theft.

ProtectMyID Essential, Exclusively for AAA Members – covers credit monitoring from Experian

https://www.annualcreditreport.com/
Get a free copy of your credit report every 12 months from each credit reporting company.

Every 4 month, get free credit report from 1 credit reporting company.

It’s not fool proof, but better than nothing.

At this point, looks like all bases are covered.

Good Luck to you.


Importance of BI tools for Pharmaceutical Industry

Nilesh Jethwa - Sun, 2017-09-17 12:40

The pharmaceutical industry has been focusing much of its energy on producing the next chartbusting drugs.

However, the industry is also facing challenges in terms of the changing regulations, increasing number of declines on drug approvals and the continuing need to develop high value biologics. Refocusing efforts is imperative.

There are existing processes, systems and practices that need to be immediately addressed. Key performance indicators (KPI) using BI tools help corporations identify areas that need continuous development and highlight successes already achieved. This helps pharmaceutical companies grasp their management operations better.

What is KPI?

Simply put, KPI is a measurement of something that is vital in a business’s operations. In the pharmaceutical industry, measurements on drug cost overall trend for a certain drug are examples of KPIs.

What KPIs to Include

Before using dashboard software to view KPIs, it is important that useful KPIs be identified first. Some KPIs are not useful to a certain organization, depending on the operations and the needs of that organization. It is therefore important to have long discussions first before operating a KPI dashboard. Discussions should tackle on:

  • Assessing the organization’s strategies.
  • Determining the business drives that have an impact on the execution of strategies.
  • Identification of long-term and short-term goals.

Determining useful KPIs is one the most important tasks of managers. KPIs based on the organization’s objectives are essential components of an effective and helpful dashboard. What you will see on the dashboard will largely depend on how you specify your KPIs.

Read more at http://www.infocaptor.com/dashboard/dashboard-bi-tools-for-pharmaceutical-industry

ADF BC REST Service from ADF Library JAR

Andrejus Baranovski - Sun, 2017-09-17 11:39
I had assignment to enable ADF BC REST for existing ADF application, which was developed with multiple ADF libraries. ADF BC REST was supposed to be enabled for one of the ADF libraries and then accessed through Master application. All ADF BC REST samples usually show how to enable REST inside Master application itself. I was curious if it will work to enable ADF BC REST and package it into ADF library, which is consumed from Master application. It worked and I would like to share sample app.

Sample app is based on two JDEV projects - library and master applications. Library application contains ADF BC REST implementation for Employees VO:


ADF Library is generated out of ViewController project, ADF BC REST is packaged through dependency:


Model (enabled with ADF BC support) project in Master application imports ADF library:


Run Master application by running REST project. There is improvement in JDEV 12.2.1.3 comparing to 12.2.1.2 - re-deployment works even if dependent ADF library was changed (this is very useful fix - saves a lot of time during development):


REST response is received:


Download sample application - adfbcrest.zip.

Thoughts on RMAN Backup Strategy Part 2

Michael Dinh - Sun, 2017-09-17 09:33

Cron backup schedule.

00 03 * * 0          rman_db_backup.sh 0     > /tmp/rman_l0.log 2>&1
00 03 * * 1,2,3,4,5  rman_db_backup.sh 1     > /tmp/rman_l1.log 2>&1
30 * * * *           rman_archive_backup.sh  > /tmp/rman_arch.log 2>&1

FAILED: Archive RMAN backup.
It’s the dreaded archivelog does not exist.
We can simply put crosscheck archivelog all, delete noprompt expired archivelog all, and this should fix the problem, right?

WRONG! Don’t do this. I know there will be disagreement and this is my opinion.

RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
ORA-19625: error identifying file +FRA/ARCHIVELOG/2017_09_10/thread_1_seq_786844.649.954296727
ORA-17503: ksfdopn:2 Failed to open file +FRA/ARCHIVELOG/2017_09_10/thread_1_seq_786844.649.954296727
ORA-15012: ASM file '+FRA/ARCHIVELOG/2017_09_10/thread_1_seq_786844.649.954296727' does not exist

Scripts did have crosscheck and I have commented out prior because error was being ignored since next backup was successful.

$ grep crosscheck *.sh
rman_archive_backup.sh:#crosscheck archivelog all;
rman_db_backup.sh:#crosscheck archivelog all;

The error happened again and next backup was successful. Why?

Archivelog backup does not exists.

RMAN> list backup of archivelog from logseq=786840 until logseq=786850 thread=1;

specification does not match any backup in the repository

RMAN> 

Archived log shown as backed up and deleted. What happened and is it safe to ignore?

SQL> select FIRST_TIME,SEQUENCE#,THREAD#,STATUS,DELETED,BACKUP_COUNT
from V$ARCHIVED_LOG 
where SEQUENCE# between 786840 and 786850;

FIRST_TIME	     SEQUENCE#	  THREAD# S DEL BACKUP_COUNT
------------------- ---------- ---------- - --- ------------
2017-09-10 02:25:12	786840		1 D YES 	   1
2017-09-10 02:25:15	786841		1 D YES 	   1
2017-09-10 02:25:18	786842		1 D YES 	   1
2017-09-10 02:25:21	786843		1 D YES 	   1
2017-09-10 02:25:24	786844		1 D YES 	   1
2017-09-10 02:25:27	786845		1 D YES 	   1
2017-09-10 02:25:30	786846		1 D YES 	   1
2017-09-10 02:25:33	786847		1 D YES 	   1
2017-09-10 02:25:36	786848		1 D YES 	   1
2017-09-10 02:25:39	786849		1 D YES 	   1
2017-09-10 02:25:42	786850		1 D YES 	   1

11 rows selected.

SQL> exit

Please ponder for a moment and will post findings next week.


(bash): The most useless commands (11)

Dietrich Schroff - Sat, 2017-09-16 13:57
After talking about
  1. rev
  2. yes
  3. sl
  4. cowsay
  5. cmatrix
  6. cal
  7. rig 
  8. pi
  9. figlet
here a packages called filters which comes with such commands:

$ echo hello my friend | jethro
hello mah friend
$ echo hello my friend | chef
hellu my freeund
$ echo hello my friend | kraut
hello mein friendManpage:
DESCRIPTION
       All  of  these  programs are filters to do all sorts of strange things to text.  No personal, racial,
       religious or societal slurs are intended. For amusement only.

       All the filters read input from stdin, change it, and write the filtered text to stdout. Some filters
       also support reading from files and writing to stdout.

       b1ff   The B1FF filter

       lolcat As seen in internet gifs everywhere.

       cockney
              Cockney English

       chef   convert English on stdin to Mock Swedish on stdout

       eleet  K3wl hacker slang

       fanboy Speak  like  a  fanboy.  Filters  out  extraneous  words and focuses on the words fans use. By default, it will speak like a fan of git/Linus/linux development.  To  change  this,  pass  as parameters  the  words that the fanboy typically uses. Alternatively, pass the name of a topic that typically has fanboys to use a predefined word list.

       fudd   Elmer Fudd

       jethro Hillbilly text filter

       jive   Jive English

       jibberish
              Runs text through a random selection of the rest of the filters, to make really weird output.

       ken    English into Cockney, featuring (dubious) rhyming slang for a lot of computer terminology.

       kraut  Generates text with a bad German accent.

       kenny  Generates text as spoken by Kenny on South Park.

       ky00te This program places a very cute (and familiar to FurryMuck fans) accent on any text file.

       nethackify
              Wiped out text like can be found in nethack.

       newspeak
              A-la-1984

       censor CDA-ize text

       nyc    Brooklyn English

       pirate Talk like a pirate.

       rasterman
              Makes text look like it came from the keyboard of Carsten Haitzler.
      scottish
              Fake scottish (dwarven) accent filter, inspired by the character "Durkon" from  Order  of  the
              Stick.

       spammer
              Turns honest text into something that is liable to be flagged as spam.

       scramble
              Scramble  the  "inner"  letters  of each word in the input into a random order.  The resulting
              text is still strangely readable.

       studly Studly caps.

       uniencode
              Use glorious unicode to the fullest possible extent. As seen previously in many man pages.

       upside-down
              Flips text upside down. Stand on your head and squint to read the output.

Debian Stretch and opendkim: connection refused, no listener at port 8891

Frank van Bortel - Sat, 2017-09-16 13:28
Debian stretch opendkim behaviour changed opendkim fails to sign! In a nutshell... if you face this: postfix/submission/smtpd[17385]: warning: connect to Milter service inet:localhost:8891: Connection refused and you cannot find a listener process at port 8891: netstat -nltp | grep 8891 returns nothing, and you find this in the /var/log/mail.log: opendkim[18055]: OpenDKIM Filter v2.11.0 Frankhttp://www.blogger.com/profile/07830428804236732019noreply@blogger.com0

connect by rownum produce ORA-30009

Tom Kyte - Sat, 2017-09-16 05:26
SQL> select * from scott.t0909_1; ID S E ---------- ---------- ---------- 1 10 11 2 1 5 3 88 92 -----Scene 1 select * from scott.t0909_1 connect by rownum<=3; ID S E ---------- ---------- ---------- 1 10 11 1 10 11 1 10 ...
Categories: DBA Blogs

Vendor Code 17002 Unable to Connect to DB Windows 10

Tom Kyte - Sat, 2017-09-16 05:26
IO Error: The Network Adapter could not establish the connection. My laptop is client/server using Windows 10. I added Port 1521 as exception to Firewall, but this did not resolve the problem. I am knowledgeable in DB design/build using SQL Server, b...
Categories: DBA Blogs

TO_DATE with no month

Tom Kyte - Sat, 2017-09-16 05:26
If you use to_date without specifying a day, Oracle assumes the 1st of the month. However, if you don't specify a month, Oracle uses the current month. Is this by design, and if so do you know the rationale for it? eg on 15 September: <code> ...
Categories: DBA Blogs

Want to retrive numbers in words

Tom Kyte - Sat, 2017-09-16 05:26
I want output as: numbers string 101 One zero one 102 One zero two 851 eight five one 9856 nine eight five six 356 three five six 748 seven four eight 254 two five four ...
Categories: DBA Blogs

Active Data Guard services in Multitenant

Yann Neuhaus - Fri, 2017-09-15 17:36

A database (or the CDB in multitenant) registers its name as the default service. When a standby database is on the same server, or same cluster, you have no problem because this database name is the db_unique_name which is different between the primary and the standby(s).

In multitenant, in addition to that, each PDB registers its name as a service. But the PDB name is the same in the primary and the standby database. This means that we have the same service name registered for the PDB in primary and standby:

Service "pdb1" has 2 instance(s).
Instance "CDB2A", status READY, has 1 handler(s) for this service...
Instance "CDB2B", status READY, has 1 handler(s) for this service...

We cannot change that, and then it is strongly recommended to create different services for the PDB in primary and standby.

The PDB default service name

Here is what we want to avoid.
I’ve a container database (db_name=CDB2) with its primary (db_unique_name=CDB2A) and standby (db_unique_name=CDB2B) on the same server, registered to the same listener:

Service "59408d6bed2c1c8ee0536a4ea8c0cfa9" has 2 instance(s).
Instance "CDB2A", status READY, has 1 handler(s) for this service...
Instance "CDB2B", status READY, has 1 handler(s) for this service...
Service "CDB2A" has 1 instance(s).
Instance "CDB2A", status READY, has 1 handler(s) for this service...
Service "CDB2AXDB" has 1 instance(s).
Instance "CDB2A", status READY, has 1 handler(s) for this service...
Service "CDB2A_DGB" has 1 instance(s).
Instance "CDB2A", status READY, has 1 handler(s) for this service...
Service "CDB2A_DGMGRL" has 1 instance(s).
Instance "CDB2A", status UNKNOWN, has 1 handler(s) for this service...
Service "CDB2B" has 1 instance(s).
Instance "CDB2B", status READY, has 1 handler(s) for this service...
Service "CDB2BXDB" has 1 instance(s).
Instance "CDB2B", status READY, has 1 handler(s) for this service...
Service "CDB2B_DGB" has 1 instance(s).
Instance "CDB2B", status READY, has 1 handler(s) for this service...
Service "CDB2B_DGMGRL" has 1 instance(s).
Instance "CDB2B", status UNKNOWN, has 1 handler(s) for this service...
Service "CDB2_CFG" has 2 instance(s).
Instance "CDB2A", status READY, has 1 handler(s) for this service...
Instance "CDB2B", status READY, has 1 handler(s) for this service...
Service "pdb1" has 2 instance(s).
Instance "CDB2A", status READY, has 1 handler(s) for this service...
Instance "CDB2B", status READY, has 1 handler(s) for this service...

The PDB1 service is registered from both instances, and then when I use it in my connection string I’m connected at random to the primary or the standby:

22:27:46 SQL> connect sys/oracle@//localhost:1522/pdb1 as sysdba
Connected.
22:27:51 SQL> select * from v$instance;
 
INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION STARTUP_TIME STATUS PARALLEL THREAD# ARCHIVER LOG_SWITCH_WAIT LOGINS SHUTDOWN_PENDING DATABASE_STATUS INSTANCE_ROLE ACTIVE_STATE BLOCKED CON_ID INSTANCE_MODE EDITION FAMILY DATABASE_TYPE
--------------- ------------- --------- ------- ------------ ------ -------- ------- -------- --------------- ------ ---------------- --------------- ------------- ------------ ------- ------ ------------- ------- ------ -------------
1 CDB2B VM106 12.2.0.1.0 15-SEP-17 OPEN NO 1 STARTED ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO 0 REGULAR EE SINGLE
 
22:28:00 SQL> connect sys/oracle@//localhost:1522/pdb1 as sysdba
Connected.
22:28:06 SQL> /
 
INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION STARTUP_TIME STATUS PARALLEL THREAD# ARCHIVER LOG_SWITCH_WAIT LOGINS SHUTDOWN_PENDING DATABASE_STATUS INSTANCE_ROLE ACTIVE_STATE BLOCKED CON_ID INSTANCE_MODE EDITION FAMILY DATABASE_TYPE
--------------- ------------- --------- ------- ------------ ------ -------- ------- -------- --------------- ------ ---------------- --------------- ------------- ------------ ------- ------ ------------- ------- ------ -------------
1 CDB2A VM106 12.2.0.1.0 15-SEP-17 OPEN NO 1 STARTED ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO 0 REGULAR EE SINGLE
 
22:28:07 SQL> connect sys/oracle@//localhost:1522/pdb1 as sysdba
Connected.
22:28:10 SQL> /
 
INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION STARTUP_TIME STATUS PARALLEL THREAD# ARCHIVER LOG_SWITCH_WAIT LOGINS SHUTDOWN_PENDING DATABASE_STATUS INSTANCE_ROLE ACTIVE_STATE BLOCKED CON_ID INSTANCE_MODE EDITION FAMILY DATABASE_TYPE
--------------- ------------- --------- ------- ------------ ------ -------- ------- -------- --------------- ------ ---------------- --------------- ------------- ------------ ------- ------ ------------- ------- ------ -------------
1 CDB2B VM106 12.2.0.1.0 15-SEP-17 OPEN NO 1 STARTED ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO 0 REGULAR EE SINGLE
 
22:28:11 SQL> connect sys/oracle@//localhost:1522/pdb1 as sysdba
Connected.
22:28:13 SQL> /
 
INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION STARTUP_TIME STATUS PARALLEL THREAD# ARCHIVER LOG_SWITCH_WAIT LOGINS SHUTDOWN_PENDING DATABASE_STATUS INSTANCE_ROLE ACTIVE_STATE BLOCKED CON_ID INSTANCE_MODE EDITION FAMILY DATABASE_TYPE
--------------- ------------- --------- ------- ------------ ------ -------- ------- -------- --------------- ------ ---------------- --------------- ------------- ------------ ------- ------ ------------- ------- ------ -------------
1 CDB2A VM106 12.2.0.1.0 15-SEP-17 OPEN NO 1 STARTED ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO 0 REGULAR EE SINGLE

I don’t want to use a service that connects at random and then I need to create different services.

Read-Only service for the Active Data Guard standby

I’m in Oracle Restart and I create the service with srvctl (but you can also create it with dbms_service when not running with Grid Infrastructure):


srvctl add service -db cdb2b -service pdb1_ro -pdb pdb1 -role physical_standby

This creates the service for the standby database (CDB2B) to be started when in physical standby role, and the service connects to the pluggable database PDB1.
But I cannot start it:

srvctl start service -db cdb2b -service pdb1_ro -pdb pdb1
 
 
PRCD-1084 : Failed to start service pdb1_ro
PRCR-1079 : Failed to start resource ora.cdb2b.pdb1_ro.svc
CRS-5017: The resource action "ora.cdb2b.pdb1_ro.svc start" encountered the following error:
ORA-16000: database or pluggable database open for read-only access
ORA-06512: at "SYS.DBMS_SERVICE", line 5
ORA-06512: at "SYS.DBMS_SERVICE", line 288
ORA-06512: at line 1
. For details refer to "(:CLSN00107:)" in "/u01/app/12.2/diag/crs/vm106/crs/trace/ohasd_oraagent_oracle.trc".
 
CRS-2674: Start of 'ora.cdb2b.pdb1_ro.svc' on 'vm106' failed

The reason is that the service information must be stored in the dictionary, SYS.SERVICE$ table, and you cannot do that on a read-only database.

This has been explained a long time ago by Ivica Arsov on his blog: https://iarsov.com/oracle/data-guard/active-services-on-physical-standby-database/ and nothing has changed. You need to create the service on the primary so that the update of SYS.SERVICE$ is propagated to the standby database through log shipping:


srvctl add service -db cdb2a -service pdb1_ro -pdb pdb1 -role physical_standby

This is not sufficient because the insert in SYS.SERVICE$ does not occur yet:

SQL> alter session set container=PDB1;
 
Session altered.
 
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
------ -------- --------- ----------
3 PDB1 READ WRITE NO
 
SQL> select * from service$;
 
SERVICE_ID NAME NAME_HASH NETWORK_NAME CREATION_DATE CREATION_DATE_HASH DELETION_DATE FAILOVER_METHOD FAILOVER_TYPE FAILOVER_RETRIES FAILOVER_DELAY MIN_CARDINALITY MAX_CARDINALITY GOAL FLAGS EDITION PDB RETENTION_TIMEOUT REPLAY_INITIATION_TIMEOUT SESSION_STATE_CONSISTENCY SQL_TRANSLATION_PROFILE MAX_LAG_TIME GSM_FLAGS PQ_SVC STOP_OPTION FAILOVER_RESTORE DRAIN_TIMEOUT
---------- ---- --------- ------------ ------------- ------------------ ------------- --------------- ------------- ---------------- -------------- --------------- --------------- ---- ----- ------- --- ----------------- ------------------------- ------------------------- ----------------------- ------------ --------- ------ ----------- ---------------- -------------
14 pdb1 1888881990 pdb1 15-SEP-17 1332716667 136 PDB1

As explained by Ivica in his blog post, we need to start the service once to have the row inserted in SERVICE$:

srvctl start service -db cdb2a -service pdb1_ro -pdb pdb1
srvctl stop service -db cdb2a -service pdb1_ro

Now the service information is persistent in the dictionary:

SQL> alter session set container=PDB1;
Session altered.
 
SQL> show pdbs
 
CON_ID CON_NAME OPEN MODE RESTRICTED
------ -------- ---- ---- ----------
3 PDB1 READ WRITE NO
 
SQL> select * from service$;
 
SERVICE_ID NAME NAME_HASH NETWORK_NAME CREATION_DATE CREATION_DATE_HASH DELETION_DATE FAILOVER_METHOD FAILOVER_TYPE FAILOVER_RETRIES FAILOVER_DELAY MIN_CARDINALITY MAX_CARDINALITY GOAL FLAGS EDITION PDB RETENTION_TIMEOUT REPLAY_INITIATION_TIMEOUT SESSION_STATE_CONSISTENCY SQL_TRANSLATION_PROFILE MAX_LAG_TIME GSM_FLAGS PQ_SVC STOP_OPTION FAILOVER_RESTORE DRAIN_TIMEOUT
---------- ---- --------- ------------ ------------- ------------------ ------------- --------------- ------------- ---------------- -------------- --------------- --------------- ---- ----- ------- --- ----------------- ------------------------- ------------------------- ----------------------- ------------ --------- ------ ----------- ---------------- -------------
14 pdb1 1888881990 pdb1 15-SEP-17 1332716667 136 PDB1
1 pdb1_ro 1562179816 pdb1_ro 15-SEP-17 1301388390 0 0 0 8 PDB1 86400 300 DYNAMIC ANY 0 0 0 0

This is from the primary, but after the redo has been transported and applied, I have the same on the standby. Now I can start the service I’ve created for the standby:

srvctl start service -db cdb2b -service pdb1_ro -pdb pdb1

Here is the new service registered on the listener, which I can use to connect to the read-only PDB1 on the Active Data Guard standby:

Service "pdb1" has 2 instance(s).
Instance "CDB2A", status READY, has 1 handler(s) for this service...
Instance "CDB2B", status READY, has 1 handler(s) for this service...
Service "pdb1_ro" has 1 instance(s).
Instance "CDB2B", status READY, has 1 handler(s) for this service...
Service "pdb1_rw" has 1 instance(s).

Read-Write service for the primary

You can see above that in order to select from SERVICE$ I connected to CDB$ROOT and switched to PDB1 with ‘set container’. There’s no other choice because using the service name directs me at random to any instance. Then, I need a service to connect to the primary only, and I’ll call it PDB1_RW as it is opened in Read Write there.

srvctl add service -db cdb2a -service pdb1_rw -pdb pdb1 -role primary
srvctl start service -db cdb2a -service pdb1_rw

Finally, here are the services registered from the listener:

Service "pdb1" has 2 instance(s).
Instance "CDB2A", status READY, has 1 handler(s) for this service...
Instance "CDB2B", status READY, has 1 handler(s) for this service...
Service "pdb1_ro" has 1 instance(s).
Instance "CDB2B", status READY, has 1 handler(s) for this service...
Service "pdb1_rw" has 1 instance(s).
Instance "CDB2A", status READY, has 1 handler(s) for this service...

I’ll probably never use the ‘PDB1′ service because I want to know where I connect to.

In case of switchover, I also create the Read Write service in for the standby:

srvctl add service -db cdb2b -service pdb1_rw -pdb pdb1 -role primary

Here are the resources when CDB2A is the primary:

$ crsctl stat resource -t -w "TYPE = ora.service.type"
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cdb2a.pdb1_ro.svc
1 OFFLINE OFFLINE STABLE
ora.cdb2a.pdb1_rw.svc
1 ONLINE ONLINE vm106 STABLE
ora.cdb2b.pdb1_ro.svc
1 ONLINE ONLINE vm106 STABLE
ora.cdb2b.pdb1_rw.svc
1 OFFLINE OFFLINE STABLE
--------------------------------------------------------------------------------

I test as switchover to CDB2B:

$ dgmgrl sys/oracle
DGMGRL for Linux: Release 12.2.0.1.0 - Production on Fri Sep 15 23:41:26 2017
 
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
 
Welcome to DGMGRL, type "help" for information.
Connected to "CDB2B"
Connected as SYSDG.
DGMGRL> switchover to cdb2b;
Performing switchover NOW, please wait...
New primary database "cdb2b" is opening...
Oracle Clusterware is restarting database "cdb2a" ...
Switchover succeeded, new primary is "cdb2b"

Here are the services:

[oracle@VM106 blogs]$ crsctl stat resource -t -w "TYPE = ora.service.type"
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cdb2a.pdb1_ro.svc
1 ONLINE ONLINE vm106 STABLE
ora.cdb2a.pdb1_rw.svc
1 OFFLINE OFFLINE STABLE
ora.cdb2b.pdb1_ro.svc
1 OFFLINE OFFLINE STABLE
ora.cdb2b.pdb1_rw.svc
1 ONLINE ONLINE vm106 STABLE
--------------------------------------------------------------------------------

So what?

The recommendations are not new here:

  • Always do the same on the primary and the standby. Create services on both sites, then have started them depending on the role
  • Always use one or several application services rather than the default one, in order to have better control and flexibility on where you connect

In multitenant, because services are mandatory to connect to a container with a local user, all the recommendations about services are even more important than before. If you follow them, you will see that multitenant is not difficult at all.

This case may seem improbable, because you probably don’t put the standby on the same server or cluster as the primary. But you may have several standby databases on the same server. About the service registered from the PDB name, just don’t use it. I’m more concerned by the GUID service name (here 59408d6bed2c1c8ee0536a4ea8c0cfa9) which is also declared by both databases. If you plan to use online PDB relocate in a Data Guard configuration then be careful with that. I’ve not tested it, but it is probably better to keep the standby PDB closed, or at least do not register it on the same listener.

 

Cet article Active Data Guard services in Multitenant est apparu en premier sur Blog dbi services.

Accelerated Mobile App Development with Oracle Mobile Cloud Service – Part 2

Part 2: Mobile App Development with MCS

In Part 1, we explored using Oracle’s Mobile Cloud Service as tool to provide the backend services needed to retrieve data from an Oracle EBS Pricing and Availability form. With our mobile backend and custom API’s created, the actual app development can now begin!

 

Creating a Native App

For the next step of my POC, I’ll be creating a simple iOS application that allows me to lookup a Pricing and Availability item and view its properties and warehouse locations. Before firing up Xcode, I need to click the “SDK Downloads” from the MCS Applications page and download the iOS SDK.

 

As I mentioned earlier, the SDK will allow me to make MCS API calls with one or two lines of code. In order to take advantage of it I need to add the static libraries and header files from the downloaded SDK to my project in Xcode and properly link them.

 

The SDK download also includes an “OMC.plist” file that will need to be added to my project. The OMC.plist will hold the settings that are needed to connect to our Pricing and Availability mobile backend. The Settings tab of the Pricing and Availability backend in MCS has several of the items we need. Since we’re using basic authentication, we need to get the Mobile Backend ID, Anonymous Key, and the Base URL of our MCS environment.

 

We’ll also need the application key we were provided earlier after creating our mobile client. After adding these items to the OCM.plist, the initial MCS setup of our project is complete.

 

When a user runs my app, the first thing they will need to do is login. I put together a basic login screen with username and password fields.

 

When a user taps the Login button I simply need to authenticate against my mobile backend with these three lines of code:

 

If no error is returned then the authentication is successful and I can dismiss my login screen. My user will then be presented with my search screen which simply contains a table view with a search bar at the top.

This is the point where we utilize the Pricing and Availability custom API that we previously configured. When a user enters a Pricing and Availability Item’s ID and taps the search button I’ll need to make a GET call to the /pricingandavailabilityitem/{id} endpoint in order to return the matching item. Once again, this can be handled with a few lines of code:

 

The response is then parsed and a result row is added to my table view.

 

Tapping on the result row will bring the user to my item details screen where the Pricing and Availability item’s properties are displayed. I also want to display the warehouse locations for my item on the details screen so I make a similar second call to the pricingandavailabilityitem/{id}/pricingandavailabilityitemlocation endpoint and populate the results in another table view.

 

At this point I have successfully achieved the goal of displaying EBS form information on a mobile device! As you can see, the amount of effort required to authenticate and retrieve the data was minimal, whereas without MCS those tasks would have consumed a large percentage of my time.

 

Creating a MAX App

While the iOS SDK may have made my app development seem fairly effortless, MCS actually provides an easier way for me to achieve my goal. On the MCS Applications page, there is a Mobile Apps section that takes you to the Mobile Application Accelerator (MAX) application.

 

With the MAX application, it is possible to quickly put together a mobile app with absolutely no coding involved. With its drag-and-drop web interface, non-technical business users can easily login and build their own mobile apps in minutes.

Let’s take a look at building the same POC as a MAX application. Clicking the “New Application” button will take you through a simple app creation wizard.

 

After providing your app name and choosing your screen layout you will be presented with a blank home screen where you can drag and drop UI elements onto various content areas. Just like the native app, my MAX app will first present the user with a search screen that will display Pricing and Availability Item search results. To handle this, I’ll be adding a list element onto my home screen and enabling its search option which will automatically add a search field to the top of it.

 

Next we’ll need to indicate what data will be populated in our list element. Clicking “Add Data” will allow you to map any UI element to a data source. Choosing a data source is as simple as selecting the Pricing and Availability Item resource from our custom API. Our MAX app will automatically use the appropriate API calls to retrieve our data. We can then drag and drop properties from our Pricing and Availability resource onto each of the four available search result row labels to be displayed. I chose to use the Item Description, Item Type, Unit Pricing, and Pricing currency fields.

 

Since our Pricing and Availability Item API call requires an ID parameter we indicate that the list element’s search field will be the source.

 

Our search page now has what it needs to lookup a Pricing and Availability Item.

 

In order to see the details of a Pricing and Availability item, we will need to provide an action on the list element’s action tab. After clicking the Actions tab, another drag and drop interface allows us to indicate that when a list item is tapped, we will be taken to a new Pricing and Availability item detail screen.

 

In addition to displaying the Pricing and Availability item properties, I also want the new Pricing Item Detail page to display the warehouse locations. To handle this, when creating my details screen I choose the “Screen with Top Tabs and Summary” page template and specify three separate tabs: Overview, Quantities, and Warehouses. For each of the tabs, I follow the same process of dragging UI elements onto the content areas and mapping a data source to them. My Overview tab gets a form UI element that displays my Pricing and Availability Item’s properties. The Warehouses tab gets a list element that displays a list of all warehouse locations for the pricing item.

For the Quantities tab, I wanted to demonstrate a nice feature of MCS with the use of a bar chart to easily view the item quantities at each warehouse. I simply drag a bar chart UI element onto the tab and map the data source to my Pricing and Availability Item Locations resource with the warehouses along the X-Axis and the quantities along the Y-axis.

 

With our app complete, testing it out is as easy as hitting the test button. An iOS or Android simulator will run right in your browser.

 

Testing on or publishing to a mobile device isn’t that much more complicated. Once you install Oracle’s Mobile Application Accelerator client app on your device, you can easily add your MAX apps as “apps within an app” via a QR code. Avoiding time consuming app publishing processes means business users can get the tools they need with a few clicks.

 

Compared to native app development, the MAX app was created in a fraction of the time, and as you can see, no coding was involved. As easy as it was to build my POC, MAX has its limitations. Screens can be easily setup to search, view, add, edit, and delete business objects, but beyond that, you might need to get creative. Developing the right custom API for my Pricing and Availability app could make it possible to submit an item purchase, but the overall user experience will be limited. For more flexibility, native and hybrid apps will still have their place.

 

Conclusion

Overall, my POC just scratches the surface of what MCS can do. With the platform API’s providing database & content storage capabilities, push notifications, offline syncing, and built-in analytics, most of the things mobile apps require are readily available without having to worry about backend hardware and software. Having the ability quickly to assemble these platform API calls into custom API’s that can be reused across many mobile backends means that MCS has the potential to easily bring many aspects of a business to mobile devices.

By utilizing the MCS SDK’s, many of the common tasks of mobile app development that had previously been significant technical hurdles now become minor steps handled with a few lines of code. Considering the amount of effort that some of these common tasks required in my previous mobile projects, I believe MCS could have cut my development time in half. Realistically, organizations could have a mobile app in production use within a matter of hours. Being able to realize such quick time to value with a mobile app is definitely a key value proposition of MCS, so if that is important to your organization I recommend you give MCS a try.

The post Accelerated Mobile App Development with Oracle Mobile Cloud Service – Part 2 appeared first on Fishbowl Solutions.

Categories: Fusion Middleware, Other

Accelerated Mobile App Development with Oracle Mobile Cloud Service – Part 1

Part 1: MCS Mobile Backends

The past decade has seen a steady rise in the use of mobile applications across nearly all industries. At Fishbowl Solutions, we have played a part in this trend by developing a series of Android and iOS apps that allow users to easily access their Oracle WebCenter content from their phones and tablets.

In my experience with mobile app development, I have found that a vast majority of development effort is spent on the same common tasks:

  • Writing code involving interaction with the backend server such as authentication & authorization
  • Retrieving & storing data
  • Synching content locally to devices for offline use
  • Sending push notifications across multiple device platforms.

These tasks always take a lot more effort than expected and tend to feel like I am reinventing the wheel. Even after the initial development, periodic changes to the backend server often require updated versions of the apps to be pushed through time-consuming publishing processes.

Time spent on these basic tasks is time that could be better spent adding additional features and creating a better user experience. Because of this, I was excited to learn that Oracle’s Mobile Cloud Service could be the solution to these problems.

What is Oracle Mobile Cloud Service?

Oracle Mobile Cloud Service (MCS) is a cloud service that provides a set of tools to support enterprise-wide mobile development. It allows quick creation and deployment of the back-end services your apps require without the initial hardware and software setup. With a small amount of configuration, any of these back-end services can be made available to your apps via REST API calls.

To handle features required by most apps, MCS includes the following built-in “Platform API’s”:

  • Authentication & Authorization
  • Database Storage
  • Content Storage
  • Push Notifications
  • Analytics
  • Offline Data & Synching
  • Mobile User Management

Having to configure all of these features on your own server would be a daunting task and likely set you back days or even weeks, but MCS provides the capabilities out of the box within minutes.

In addition to these platform API’s, MCS allows custom API’s to be quickly developed in NodeJS to create additional back-end services. With a few lines of JavaScript, additional calls to any of the Platform API’s or external services can be made allowing you to provide the exact functionality required by your mobile apps.

After your API’s are configured, MCS provides downloadable SDK’s for Android, iOS, Cordova (JavaScript), and Windows. Embedding these SDK’s in your code allows MCS API’s to be called with one or two lines of code compared to the many lines of code that would be required to make the API call manually.

MCS Mobile Backend Setup

I decided to try out MCS by creating a small proof-of-concept or POC. One of the problems Fishbowl customers face is accessing forms from Oracle E-Business Suite (EBS) on mobile devices, so I decided that the end goal for my POC would be to view the Pricing and Availability form in EBS on a mobile device.

 

Here is a simplistic view of this business challenge:

 

As a legacy application, EBS has no API of its own. To get around this we decided to enlist the help of a tool called AuraPlayer. AuraPlayer has the ability provide web services that allow us to externally interact with EBS forms. I’m not going to cover the AuraPlayer details in this blog, but the important thing to know is that after setting up the AuraPlayer services, I can now make a request to <AuraPlayerBaseURL>/PricingAndAvailability_queryByLabel?Item=AS18947 and receive a JSON response containing a list of my AS18947 pricing and availability item’s form fields from EBS along with a list of warehouse locations where the item is in stock.

Once the AuraPlayer services to EBS are configured my Pricing and Availability data is one step closer to reaching my mobile app:

 

At this point we’re now ready to setup MCS in order to fill the gap in the process. Our final configuration will look like this:

 

Any mobile application connecting to MCS will first and foremost require a Mobile Backend. Mobile Backends are MCS objects that group together a specific set of API’s along with the client applications and the set of users who will utilize them. In this scenario, I need to create a “Pricing and Availability” mobile backend that exposes a custom “Pricing and Availability” API to my mobile app. Since my Pricing and Availability API needs to make calls to the AuraPlayer services which are outside of MCS, I will also need to create a Connector. Connectors are MCS objects that provide access to external REST and SOAP API’s. Next, in order for my mobile application to access the mobile backend I will need to register my mobile application by setting up a Mobile Application Client. The last item needed is a test user who will have access to the mobile backend and the API. To summarize – labeled above:

  1. Create a mobile backend for “Pricing and Availability”
  2. Create a Pricing and Availability custom API
  3. Create AuraPlayer connector
  4. Register my app by setting up Mobile Application Client
  5. Set up a test user

Let’s now walk through the setup process in MCS.

 

After logging into the MCS interface, we first need to click on “Mobile Backends” and create a new mobile backend called “PricingAndAvailabilityBackend”.

 

With our new mobile backend created, the first thing we need to do is create at least one user who can access the backend. This can be done by clicking on the Users tab. In MCS, all mobile backends are associated with one User Realm. User Realms are sets of users that can either be managed directly in MCS or configured to connect to your company’s SSO. In our case, we will just create a new user called “testuser” under the default realm. Now that we have our test user, we can create our new Pricing and Availability custom API. When clicking on the API’s tab we see the message indicating that we don’t have any API’s selected, but before we create one we first need to create our AuraPlayer connector.

 

A new connector can be created by going to Applications > Connectors and clicking “New Connector”. In the connector setup wizard, I named it “AuraPlayerConnector” and provided the base service URL where the AuraPlayer REST services are accessed.

 

The Rules page of the Connector wizard allows any default parameters to be specified. Since all of my service calls to AuraPlayer have several required parameters I added them here.

 

The last step in the Connector wizard allows the connector to be tested. I provided the /PricingAndAvailability_queryByLabel?Item=AS18947 service URL I mentioned earlier that should return a pricing & availability item from EBS.

 

Since a connector must run under a mobile backend as a specific user, I select my backend and enter my test user’s credentials. I then click “Test Endpoint” and after receiving my expected JSON response I conclude that my AuraPlayer connector is configured correctly!

 

Our next task is to create the custom Pricing and Availability API that will utilize the newly created AuraPlayer connector. Going back to the mobile backend’s API tab we can now click the “New API” button. After providing the name of the API, the first thing to do is specify our available endpoints via the Endpoints tab. Clicking “New Resource” lets you add an Endpoint. I initially add two endpoints. One returns a collection of all pricing and availability items with a resource path of:

/pricingandavailabilityitem

The other returns a specific pricing and availability item with a resource path of:

pricingandavailabilityitem/{id}

where {id} is the item number in EBS.

Since my AuraPlayer services can also return a pricing and availability item’s warehouse locations, I decided to create two more endpoints underneath the pricingandavailabilityitem/{id} endpoint. This is done by clicking that endpoint’s “Add Nested Resource” icon. I create one endpoint that returns all pricing and availability item locations for a given item with a resource path of:

pricingandavailabilityitem/{id}/pricingandavailabilityitemlocation

I then create another endpoint that returns a specific pricing and availability item location for a given item with a resource path of:

pricingandavailabilityitem/{id}/pricingandavailabilityitemlocation /{pricingandavailabilityitemlocation_id}

 

For each endpoint created, I specify display names, descriptions, and available methods. For my initial POC, I’ll really only need GET methods.

 

With our endpoints defined, we now need to implement their behavior. MCS custom API’s are written in NodeJS using the ExpressJS framework. By clicking on the Pricing and Availability API’s Implementation tab, you can see a “JavaScript Scaffold” button which allows you to download a pre-built NodeJS project with each of your API’s endpoints already stubbed out for you.

 

After downloading the scaffold package the main file needing to be edited is the pricingavailabilityapi.js file.

 

In this file, each route will need to be implemented. Since my Pricing and Availability API is simply calling my AuraPlayer connector there won’t be a whole lot of work to be done. For my /pricingandavailabilityitem/{id} route, I basically need to do three things:

  1. Get the Pricing and Availability item’s “{id}” parameter from the request object.
  2. Use my connector to make a GET call to AuraPlayer specifying the “PricingAndAvailability_queryByLabel” resource and the id parameter.
  3. Extract the required elements from the AuraPlayerConnector results and return them in the API response.

 

Aside from building out each of my routes, the other important change is to add my API and connector dependencies in the package.json file.

 

Once that is taken care of, simply package up the files and upload them on the API’s Implementation tab.

 

With our Pricing and Availability API finished, our mobile backend is almost complete. As I mentioned earlier, in order for our mobile application to access the mobile backend we will need to register it on the PricingAndAvailabilityBackend Clients tab by clicking “New Client”.

 

A client is easily created by specifying the client name, platform, app version, and the bundle ID. Once the client is created you will be presented with an application key that will be needed when we build our app.

 

That’s basically it for our MCS setup. Within a few hours, my mobile app has what it needs to access the Pricing and Availability forms in EBS.

 

While MCS will prove to be valuable at quickly providing your backend services, it also provides the tools to save time on our front-end app development. In part 2, I will continue my POC by creating the mobile app that will access the newly created MCS mobile backend.

 

Next: Accelerated Mobile App Development with Oracle Mobile Cloud Service – Part 2

The post Accelerated Mobile App Development with Oracle Mobile Cloud Service – Part 1 appeared first on Fishbowl Solutions.

Categories: Fusion Middleware, Other

Importance of Business Intelligence for Education

Nilesh Jethwa - Fri, 2017-09-15 12:54

Providing quality education and running schools as a business are becoming more demanding these days. To maintain the efficiency and effectiveness of K-12 education, schools should really invest in reliable business intelligence tools.

Armed with the right BI tools that focus on several key performance indicators, they will be able to run the school well, as a business, and provide the necessary educational resources to those who depend on them for knowledge.

There is a lingering problem across the world wherein school administrators are expected to make magic with as little funding as possible. Usually, more funding is provided to facilities that deliver exemplary results in terms of student performance.

This is why the school board should monitor KPI metrics that will help them manage their operations and ensure that they provide the best educational resources to the students attending their facility. In doing so, they can generate the kind of performance that will generate them much needed financial support to continuously improve their offerings.

Information relating to school fees, student population, daily attendance, class sizes, program offerings, academic results, and the like are all essential key performance indicators. And with heavier competition to attract new students and supporters, a reliable performance dashboard becomes all the more necessary.

Read more at http://www.infocaptor.com/dashboard/how-important-is-business-intelligence-for-education

How to split rows into balanced sets based on a running total limited to 2000

Tom Kyte - Fri, 2017-09-15 11:06
Hi, my question fits in to your "Balanced sets in SQL" collection of questions. I have a table as follows (in reality 26 million rows): <code> CREATE TABLE T ( "PI" VARCHAR2(120), "S" NUMBER, "L" NUMBER ); Insert into T (PI,S,L...
Categories: DBA Blogs

About connect,resource and DBA

Tom Kyte - Fri, 2017-09-15 11:06
Hi Tom, I read your book and a article and read this quote where you have quoted that "connect,resource and DBA should not be used in a system for security reasons". Could you please elaborate on this.As in our project to perform dba role ...
Categories: DBA Blogs

Performance differ on Temporary tables

Tom Kyte - Fri, 2017-09-15 11:06
Please observe my queries explain plan and let me know what is the root cause taking more time on second execution. --GT Table creation <code>create global temporary table gt_table1 (column1 varchar2(4000), column2 varchar2(4000), ........... ...
Categories: DBA Blogs

Using Standby of CDB for Reporting purpose

Tom Kyte - Fri, 2017-09-15 11:06
Hi Tom I have active data guard setup for my CDB . It means i have physical standby CDB (with multiple pdbs) . I know replication and database_Role are at CDB level and not pdb level . I have a PDB from different application . Initially when we s...
Categories: DBA Blogs

Parse cpu to parse elapsed % very low

Tom Kyte - Fri, 2017-09-15 11:06
Greetings, As in last question, i am getting these stats from awr. I tried to dig it up more for wait class concurrecy wait class. <code>Event Waits Time(s) Avg wait(ms) % DB time Wait Class --------------...
Categories: DBA Blogs

Pages

Subscribe to Oracle FAQ aggregator