Category Archives: Uncategorized

Oracle Database 12.2.0.1 – Application PDB unable to sync – An update

In my last post, I had demonstrated that without OMF, If an  application creates new datafiles, application PDB’s always fails to sync with the  application.  When I mentioned it to Tim, he raised an SR with Oracle who have clarified that it is  Bug 21933632. Although  it is not documented yet but OMF is mandatory if using the Application Container feature. If it is attempted to sync application PDB’s  with an  application that creates   non-OMF datafile(s),   sync  will run into  problem while trying to replay a create tablespace or similar statement with a hard-coded file name.”

References:

Multitenant: Application Containers in Oracle Database 12c Release 2

————————————————————————————————————————-

Related Links:

Home

Oracle 12c Index

Oracle Database 12.2.0.1 – Application PDB unable to sync

Oracle Database 12.2.0.1 – Application PDB unable to sync

Recently, Tim Hall posted an excellent article about Application containers, a new feature in Oracle Database 12c Release 2 (12.2.0.1). With application containers, it is now possible to create a single master application definition in the application root of the application container. The common objects defined in the master application definition are visible to all application PDBs within the application container when the application PDBs have been synchronized with the application root.

Tim has demonstrated the concept of applilcation containers using Oracle Managed Files (OMF) . I tried out the same example without OMF and discovered that without OMF it works only if the application doesn’t use any new tablespaces/datafiles. If the application creates new datafiles, application PDB’s always fails to sync with the  application.

Here is my example:

– Create a new application root container appcon1 (non-OMF – Using FILE_NAME_CONVERT)

CDB$ROOT>conn / as sysdba

         CREATE PLUGGABLE DATABASE appcon1 AS APPLICATION CONTAINER
         ADMIN USER app_admin IDENTIFIED BY Password1
         FILE_NAME_CONVERT = ('/pdbseed/', '/appcon1/');

– Connect to the application root container and create an application PDB apppdb1 from CDB seed

CDB$ROOT>ALTER PLUGGABLE DATABASE appcon1 OPEN;
         ALTER SESSION SET container = appcon1;

APPCON1>CREATE PLUGGABLE DATABASE apppdb1
        ADMIN USER pdb_admin IDENTIFIED BY Password1
        FILE_NAME_CONVERT = ('/pdbseed/', '/appcon1/apppdb1/');

– Open the application PDB apppdb1

APPCON1>ALTER PLUGGABLE DATABASE apppdb1 open;
        SHOW PDBS

CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
4 APPCON1 READ WRITE NO
5 APPPDB1 READ WRITE NO

-- Connected to the application root container, create a simple application ref_app

APPCON1>ALTER PLUGGABLE DATABASE APPLICATION ref_app BEGIN INSTALL '1.0';

– Create application components

. Create a tablespace ref_app_ts

APPCON1>CREATE TABLESPACE ref_app_ts
        DATAFILE '/u01/app/oracle/oradata/orclcdb/appcon1/app_tbs1.dbf'
        SIZE 1M AUTOEXTEND ON NEXT 1M;

.  Create a common application user ref_app_user with default tablespace ref_app_ts created above

APPCON1>CREATE USER ref_app_user IDENTIFIED BY ref_app_user
        default tablespace ref_app_ts
        quota unlimited on ref_app_ts
        CONTAINER=ALL;

– Grant appropriate privileges to common appication user ref_app_user

APPCON1>GRANT CREATE SESSION, CREATE TABLE
-- , unlimited tablespace
TO ref_app_user;

– Create and populate a table reference_data owned by ref_app_user whose data will be shared across all the application PDB’s synced with the application ref_app

APPCON1>CREATE TABLE ref_app_user.reference_data SHARING=DATA (
id NUMBER,
description VARCHAR2(50),
CONSTRAINT t1_pk PRIMARY KEY (id)
);

APPCON1>INSERT INTO ref_app_user.reference_data
SELECT level, 'Description of ' || level
FROM dual
CONNECT by level <= 5;
COMMIT;

– After all the application components have been defined, end the installation process.

APPCON1>ALTER PLUGGABLE DATABASE APPLICATION ref_app END INSTALL '1.0';

-- Verify that application ref_app version 1.0 has been created in application root appcon1 as listed in the DBA_APPLICATIONS view.

APPCON1>COLUMN app_name FORMAT A20
COLUMN app_version FORMAT A10

SELECT app_name,
app_version,
app_status
FROM dba_applications
WHERE app_name = 'REF_APP';

APP_NAME APP_VERSIO APP_STATUS
-------------------- ---------- ---------------
REF_APP 1.0 NORMAL

– Connect to application PDB apppdb1 and verify it cannot access common application table ref_app_user.reference_data as it has not been synced with the application ref_app yet

APPCON1>CONN / AS SYSDBA

ALTER SESSION SET container = apppdb1;
APPPDB1>DESC ref_app_user.reference_data;

ERROR:
ORA-04043: object ref_app_user.reference_data does not exist

– When an attempt is made to sync the application PDB apppdb1 with the application ref_app, ORA-01537 is encountered.

APPPDB1>ALTER PLUGGABLE DATABASE APPLICATION ref_app SYNC;

ALTER PLUGGABLE DATABASE APPLICATION ref_app SYNC
*
ERROR at line 1:
ORA-01537: cannot add file
'/u01/app/oracle/oradata/orclcdb/appcon1/app_tbs1.dbf' - file already part of database

However, above command succeeds if tablespace ref_app_ts not created and ref_app_user give unlimited tablespace privilege.

Please go through following update on above issue.

References:
Multitenant: Application Containers in Oracle Database 12c Release 2

————————————————————————————————————————-

Related Links:

Home

Oracle 12c Index

Oracle Database 12.2.0.1 – Application PDB unable to sync – An update

I Am Speaking At SANGAM 16

SANGAM is the Largest Independent Oracle Users Group Conference in India, organised annually in the month of November. This year’s Sangam (Sangam16 - 8th Annual Oracle Users Group Conference) will be held  on Friday 11th & Saturday 12th November 2016 at Crowne Plaza,  Bengaluru Electronics City, India .

I will be speaking at this year’s SANGAM about “Policy Based Cluster Management In Oracle 12c“.

Oracle Clusterware 11g R2 introduced server pools as a means for specifying resource placement and administering server allocation and access. However,   all servers were considered to be equal in relation to processors, memory and other characteristics. This can lead to  sub-optimal performance of some applications if the servers  assigned to the server pools hosting those applications do not meet applications’ requirements.

Oracle Grid Infrastructure 12c enhances the use of server pools by introducing server attributes e.g. memory, CPU_count etc. which can be associated with each server. Server pools can be configured so that their members belong to a category of servers, which share a particular set of attributes. Moreover,  administrators can maintain a library of policies and switch between them as required rather than manually reallocating servers to various server pools based on workload. My session will  discuss in detail the new features of policy based cluster management in 12c.

My session will be held on Saturday November 12, 2016 10:05am – 10:55am  in
Room 4.

Hope to meet you there!!

CRS-2615: Could not find server pool ‘smallpool’

I received this error message when I was playing around with Extended Policy Framework in Oracle Clusterware 12c.

Policy-managed environment in Oracle clusterware 12c offers the capability to create policies to configure pools in accordance with business needs or application demand, so that pools provide the right service at the right time. Typically, administrators create multiple policies to reflect differences in requirements for the cluster based on business needs or demand, or based on calendar dates or times of the day. The collection of zero or more such user defined policies is called cluster policy set. Oracle Clusterware manages the server pools according to the active policy in the policy set. With a cluster configuration policy set, for example, more servers can be allocated to OLTP workload during weekly business, whereas on the weekends and evenings, batch workloads can be assigned more servers, while performing transitions of server pool configuration atomically.

I added Day policy for my Oracle 12.1.0.1 cluster.

[grid@host01 ~]$ crsctl add policy day -attr "DESCRIPTION='The Day Policy'"

When I tried to set  attributes of the  server pool smallpool for day policy, I received the error:

[root@host01 ~]# crsctl modify serverpool smallpool -attr "MAX_SIZE=2,MIN_SIZE=1,SERVER_CATEGORY=small" -policy day
CRS-2615: Could not find server pool 'smallpool'.
CRS-4000: Command Modify failed, or completed with errors.

[root@host01 ~]# oerr CRS 2615
2615, 1, "Could not find server pool '%s'."
// *Cause: An attempt was made to operate on a server pool that is not 
// registered.
// *Action: Check if the server pool is registered.

When I checked, serverpool smallpool existed and had two servers assigned to it

[root@host01 ~]# crsctl status serverpool smallpool
NAME=smallpool
ACTIVE_SERVERS=host04 host05

Reason:
Since server pool smallpool had not been specified to be in the scope of the cluster policy set, I was  getting above error.

Solution:
Add server pool name smallpool to the cluster  policyset

[root@host01 ~]# crsctl modify policyset -attr "SERVER_POOL_NAMES='smallpool free'" -ksp

Now that server pool smallpool has been added to the scope of the policyset, its configuration can be modified for day policy

[root@host01 ~]# crsctl modify serverpool smallpool -attr "MAX_SIZE=2,MIN_SIZE=1" -policy day

I hope this post was helpful.

Your comments and suggestions are always welcome!

Related Links :

Home

12c RAC Index

12c RAC : CRS-2917: The ‘Free’ server pool cannot be removed from the system

java.lang nullpointerexception While Installing 12.1.0.2 RAC Database Software

I have an Oracle  12.1.0.2c cluster having following 5 nodes :

  • Hub Nodes : host01, host02, host03
  • Leaf nodes: host04 and host05

I wanted to install RAC database software on the 3 hub nodes i.e. host01, host02 and host03.

I invoked the OUI as oracle user (Owner of Database Home)

[oracle@host01 database_12_1_0_2]$ ./runInstaller

and chose the option to install RAC database software only on the 3 hub nodes.

After all the pre-requisite checks were successful , I clicked the Install button.
I got the error: java.lang nullpointerexception

On clicking OK, the OUI aborted.

To troubleshoot, I ran the OUI in debug mode as :

[oracle@host01 database_12_1_0_2]$ ./runInstaller -debug -J-DTRACING.ENABLED=true -J-DTRACING.LEVEL=2 -J-DSRVM_TRACE_LEVEL=2 -J-DFULLTRACE

The trace file showed that the leaf node host05 was not responding:

[setup.flowWorker] [ 2016-04-18 14:33:22.771 IST ]
[CRSCTLUtil.getClusterNodeConfigRoles:1198] outputs[4] = CRS-4404: The following nodes did not reply within the allotted time:
[setup.flowWorker] [ 2016-04-18 14:33:22.772 IST ]
[CRSCTLUtil.getClusterNodeConfigRoles:1200] values length = 2
[setup.flowWorker] [ 2016-04-18 14:33:22.772 IST ]
[CRSCTLUtil.getClusterNodeConfigRoles:1198] outputs[5] = host05
[setup.flowWorker] [ 2016-04-18 14:33:22.772 IST ]
[CRSCTLUtil.getClusterNodeConfigRoles:1200] values length = 1

I realized that although I wanted to install database software on 3 nodes only, all the nodes
needed to be up and running whereas in my case, the node host05 was down at that time.

When I started the node host05 and reinvoked OUI, the database software was installed
successfully.

References:
http://www.hhutzler.de/blog/oracle-installer-and-rac-installation/

I am Oracle ACE

It gives me immense pleasure to share the news that I have been honored with the prestigious  Oracle ACE award. I am grateful to Oracle ACE Program for accepting my nomination. I would like to thank  Murali Vallath Sir who nominated me for this award. I am also thankful to my family members without whose support and motivation, this would not have been possible.  Thanks a lot to all the readers of my blog whose comments and suggestions helped me to learn and share whatever little knowledge I have.

I will do my best to participate in the Oracle ACE program.