Ivan Kartik - Oracle and Linux Blog

Be(a)ware of Licensing policy changes regarding Infrastructure Repository Databases

Oracle Database 12c comes with another significant change regarding using of Infrastructure Repository Databases and which could eventually make things more complicated. Before upgrade of Oracle Database, Database Administrator or a person responsible for Software Asset Management (and Licensing) should be familiar with changes in Licensing policy which come with new release and their implications. At first let me start with little comparison of probably the most frequently used versions in production 10gR2, 11gR2 and new 12cR1 to see an "evolution".

 

Here is an excerpt from the Licensing Guide and Enterprise Manager Licensing Information Guide for 10gR2:

"Infrastructure Repository Databases

A separate Oracle Database can be installed and used as a Recovery Manager (RMAN) repository without additional license requirements, provided that all the Oracle databases managed in this repository are correctly licensed. This repository database may also be used for the Oracle Enterprise Grid Control repository. It may not be used or deployed for other uses.

A separate Oracle Database can be installed and used as an Oracle Enterprise Manager Grid Control (OEM Grid Control) repository without additional license requirements, provided that all the targets (databases, applications, and so forth) managed in this repository are correctly licensed. This database may also be used for the RMAN repository. It may not be used or deployed for other uses.

Enterprise Manager Restricted-use License

Enterprise Manager includes a restricted-use license of the Oracle Database for use as the Oracle Management Repository only."

 

Here is the excerpt from the same guides for 11gR2:

"Infrastructure Repository Databases

A separate Oracle Database can be installed and used as a Recovery Manager (RMAN) repository without additional license requirements, provided that all the Oracle databases managed in this repository are correctly licensed. This repository database may also be used for the Oracle Enterprise Grid Control repository. It may not be used or deployed for other uses.

A separate Oracle Database can be installed and used as an Oracle Enterprise Manager Grid Control (OEM Grid Control) repository without additional license requirements, provided that all the targets (databases, applications, and so forth) managed in this repository are correctly licensed. This database may also be used for the RMAN repository. It may not be used or deployed for other uses.

 Enterprise Manager Restricted-use License

Enterprise Manager includes a restricted-use license of the Oracle Database for use as the Oracle Management Repository only.

Additional database options or additional servers for disaster recovery require separate licensing. Customers receive one single-instance database with the Grid Control, or RMAN, repository. To protect the repository with Data Guard, customers need to purchase a license for the standby site. To protect the repository with Oracle Real Application Clusters, customers must license the second node for the database, and both nodes require an Oracle Real Application Clusters license."

 

And here is the excerpt from the Licensing Information Guide guide for 12cR1:

"Infrastructure Repository Databases

A separate single instance Oracle Database can be installed and used as an infrastructure repository for RMAN, Oracle Enterprise Manager Cloud Control, Automatic Workload Repository (AWR) Warehouse, Global Data Services Catalog, and Grid Infrastructure Management Repository without additional license requirements, provided that all the targets are correctly licensed. It may not be used or deployed for other uses.

The infrastructure repositories for RMAN, Oracle Enterprise Manager Cloud Control, AWR Warehouse, and Global Data Services Catalog can be shared in one database, or deployed in separate databases. Enterprise Edition must be used for the infrastructure repository database(s).

If Oracle RAC is used for the infrastructure database, then Oracle RAC licenses for all servers, and Enterprise Edition licenses for all but the first server, are required.

If Data Guard is used for the infrastructure database, then an Enterprise Edition license for the standby server is required."

 

By comparison of above excerpts where you can see differences and changes regarding Infrastructure Repository Databases (later just IRD) for particular release. Since 12c (12cR1) there is a significant change regarding edition of the Oracle Database. Current 12c Guide simply says:

  1. If Standard Edition is used as IRD and you want to upgrade the repository database to 12c, then you have to migrate it to Enterprise Edition (later just EE)
  2. If current repository database is running in RAC mode, second or any additional node node is extra licensed (EE), moreover all servers must have RAC option licensed
  3. If current repository database is using Data Guard, a standby server has to be licensed extra licensed

 Well honestly in days of "cost cutting" where many companies are more and more looking at/for alternative solutions or even they are already in process of migration from Oracle to alternative solutions, claiming that "Oracle is expensive", then this is definitely backward step from the Oracle Corp. Oracle Database 12c comes with quite interesting and very useful features regarding Recovery Manager (RMAN) which is teasing us to use new version (of course for manipulation witch PDB's 12c version of RMAN is a must). But still there is a trade-off. To stay with the 11gR2 Recovery Manager thus use old 11gR2 Infrastructure Repository Database and as long as possible (forget about 12c RMAN features including multitenant) or even trying some other workarounds (e.g. relocate RMAN repository to some fully licensed servers or divide centralized repository (catalog) to several (repositories) catalogs and spread it across licensed HA databases) in order to prevent pay additional fees for high available Infrastructure Database. Honestly I would expect a little favor here.

But enough of blaming Oracle and let's see an example why Recovery Manager requires Enterprise Edition and what would happen when you try to use Standard Edition as a RMAN repository.

I have prepared fresh 12.1.0.1 Standard edition (12.1.0.2 isn't still available) using DB_NAME=RMANDB as a repository for RMAN catalog(s) in order to see whether EE is explicitly requested.

12.2.0.2 Enterprise Edition (EE) is used as "target" database using DBNAME=ORA12CR1

 

RMANDB:SQL> select banner from v$version where rownum = 1;

BANNER
--------------------------------------------------------------------------------
Oracle Database 12c Release 12.1.0.1.0 - 64bit Production


RMANDB:SQL> create user rman12 identified by rman default tablespace data;

User created.

RMANDB:SQL> grant recovery_catalog_owner, unlimited tablespace to rman12;

Grant succeeded.

 

Used rman command on future "target" DB host (12.1.0.2 EE):

RMAN> connect catalog rman12/rman@rmandb

connected to recovery catalog database
ORACLE error from recovery catalog database: ORA-06550: line 1, column 41:
PLS-00201: identifier 'DBMS_RCVCAT.GETPACKAGEVERSION' must be declared
ORA-06550: line 1, column 34:
PL/SQL: Statement ignored

If you got this error then you have to execute @?/rdbms/admin/dbmsrmansys.sql in order to fix this issue (I had to use this script from 12.1.0.2 home as my SE is 12.1.0.1).

 

Let's continue with creating a catalog:

RMAN> connect catalog rman12/rman@rmandb

connected to recovery catalog database

RMAN> create catalog;

error creating create_deleted_object_seq
ORACLE error from recovery catalog database: ORA-00439: feature not enabled: Partitioning

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-06433: error installing recovery catalog

If you've got error as above, it means you aren't using Enteprise Edition as Partitioning requires EE or Partitioning option is not enabled.

 

RMAN> connect catalog rman12/rman@rmandb

connected to recovery catalog database

RMAN> create catalog

recovery catalog created
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-06004: ORACLE error from recovery catalog database: ORA-00439: feature not enabled: Fine-grained access control

And finally if you've got this one, it means that you aren't using Enteprise Edition (as Fine-grained access control is available in EE) and moreover you did very nasty thing in order to overcome previous error.

 New RMAN features rely on Partitioning, Virtual Private Database and Fine-grained access control (which is a part of VPD) which definitely require Enterprise Edition. If you are using centralized repository for RMAN, you should be aware of this important change which might cause additional costs. While VPD (Fine-grained access control) is not extra licensed , question whether Partitioning Option needs to be licensed remain unanswered. As always, you should contact your Oracle Sales representative in order to consult all question regarding licensing and to learn all implications according the changes.

 

Fun part: Creating 12c RMAN catalog Oracle Database 12c Standard Edition (just illustration for fun, don't use it in production!):

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SYS@ORA12CR1:SQL> create user rmanbckp identified by rmanbckp;

User created.

SYS@ORA12CR1:SQL> grant sysbackup to rmanbckp;

Grant succeeded.

SYS@ORA12CR1:SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@lab00 ~]$ sqlplus "sys@rmandb / as sysdba"

SQL*Plus: Release 12.1.0.2.0 Production on Wed Jul 29 20:46:54 2015

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 12c Release 12.1.0.1.0 - 64bit Production

SYS@RMANDB:SQL> select edition from v$instance;

EDITION
-------
SE

SYS@RMANDB:SQL> create user rman12 identified by rman default tablespace data;

User created.

SYS@RMANDB:SQL> grant recovery_catalog_owner, unlimited tablespace to rman12;

Grant succeeded.

SYS@RMANDB:SQL> exit
Disconnected from Oracle Database 12c Release 12.1.0.1.0 - 64bit Production
[oracle@lab00 ~]$ rman catalog rman12/rman@rmandb

Recovery Manager: Release 12.1.0.2.0 - Production on Wed Jul 29 20:50:49 2015

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database

RMAN> create catalog

recovery catalog created

RMAN> connect target "rmanbckp/rmanbckp@ora12cr1 as sysbackup"

connected to target database: ORA12CR1 (DBID=1346475582)

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

RMAN> backup database;

Starting backup at 29-JUL-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=42 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/storage/oradata00/ORA12CR1/data01.dbf
input datafile file number=00001 name=/storage/oradata00/ORA12CR1/system01.dbf
input datafile file number=00002 name=/storage/oradata00/ORA12CR1/sysaux01.dbf
input datafile file number=00003 name=/storage/oradata00/ORA12CR1/undo01.dbf
channel ORA_DISK_1: starting piece 1 at 29-JUL-15
channel ORA_DISK_1: finished piece 1 at 29-JUL-15
piece handle=/storage/oradata01/ORA12CR1/ARC/ORA12CR1/backupset/2015_07_29/o1_mf_nnndf_TAG20150729T205310_bvl88pd1_.bkp tag=TAG20150729T205310 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 29-JUL-15
channel ORA_DISK_1: finished piece 1 at 29-JUL-15
piece handle=/storage/oradata01/ORA12CR1/ARC/ORA12CR1/backupset/2015_07_29/o1_mf_ncnnf_TAG20150729T205310_bvl896n3_.bkp tag=TAG20150729T205310 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 29-JUL-15

RMAN>

 

As you can see using some (secret) tweaks I was able to create Oracle 12c Standard Edition for RMAN catalog. Of course this is not valid solution and it is not possible to use it for production as SE is not supported and it in fact violates the license. So no SE officially. But technically with couple of really nasty tweaks it is possible use SE as RMAN repository. ;-)

 

SecureFiles - using, licensing and changes in 12c

SecureFiles were introduced in 11gR1 as a replacement  for (or better enhancement of) existing LOB storage architecture (now known as BasicFiles) which used to be the default storage until 12cR1. You can of course use both types together in the same table.

Idea behind this post is to discuss changes in12c and also to eliminate confusion which is still around this feature and this confusion is very often created due to misinterpretation of Licensing terms.

The irony is that there are some companies specialized for Software Asset Management are very often providing partial or vague information which creates misinterpretations and confusion on customer's side or even worse they are presenting these misinterpretations to customers.

First of all there is no licensing implication in use of SecureFiles (you don't have to pay additional fees) unless you are using any of option such as Compression, Deduplication or Encryption.

According to Oracle Database documentation and Oracle Database Licensing information you need license only for:

  • Compression - Advanced Compression option
  • Deduplication - Advanced Compression option
  • Encryption - Advanced Security option

 Let's create a tables using standard command without additional options.

SYS@ORA11GR2:SQL> CREATE TABLE test.t1 ( a CLOB, b BLOB) LOB(a, b) STORE AS SECUREFILE;

Table created.

SYS@ORA11GR2:SQL> col table_name format a15
SYS@ORA11GR2:SQL> col segment_name format a32
SYS@ORA11GR2:SQL> select table_name, segment_name, securefile, encrypt, compression, deduplication from dba_lobs where owner = 'TEST';

TABLE_NAME      SEGMENT_NAME                     SEC ENCR COMPRE DEDUPLICATION
--------------- -------------------------------- --- ---- ------ ---------------
T1              SYS_LOB0000024831C00001$$        YES NO   NO     NO
T1              SYS_LOB0000024831C00002$$        YES NO   NO     NO

If you see similar output everything is fine and you're not required to pay any additional licensed option. There is a quotation of Kevin Jernigan, Senior Director Product Management at Oracle which confirm this conclusion:

"The change we made in Oracle Database 12c wrt SecureFiles and LOBs is that SecureFiles is now the default. So, when you create a LOB column in a table, if you don't specify BasicFiles or SecureFiles, it will default to SecureFiles. There is no change to licensing requirements - SecureFiles is available in all editions of Oracle Database 12c with no licensing requirements beyond the database license, and using the compression and deduplication features of SecureFiles LOBs requires licensing the Advanced Compression Option.

-KJ"

 Above statement talks about another important change which comes with 12cR1. SecureFiles is now default LOB storage. Until now you had to specify using of SecureFiles explicitly, now it's implicit. Let's check it.

SYS@ORA12CR1:SQL> CREATE TABLE test.t1 ( a CLOB, b BLOB);

Table created.

SYS@ORA12CR1:SQL> col table_name format a15
SYS@ORA12CR1:SQL> col segment_name format a32
SYS@ORA12CR1:SQL> select table_name, segment_name, securefile, encrypt, compression, deduplication from dba_lobs where owner = 'TEST';

TABLE_NAME      SEGMENT_NAME                     SEC ENCR COMPRE DEDUPLICATION
--------------- -------------------------------- --- ---- ------ ---------------
T1              SYS_LOB0000024836C00001$$        YES NO   NO     NO
T1              SYS_LOB0000024836C00002$$        YES NO   NO     NO

 This behaviour is caused by change of default value of DB_SECUREFILE instance parameter from PERMITTED to PREFERRED.

 Note that this parameter affects results of upgrade to 12c. Consider to remove (if explicitly set) this parameter before upgrade database.

Results of upgrade when DB_SECUREFILE is set to PERMITTED (default value for 11gR1 and 11gR2), PREFERRED (default value for 12cR1) and ALWAYS:

SYS@ORA12CR1> col owner format a20
SYS@ORA12CR1> select distinct owner, count(*) from dba_lobs where securefile = 'YES' group by owner;

OWNER                  COUNT(*)
-------------------- ----------
GSMADMIN_INTERNAL             1
XDB                         291
SYS                          19

Results of upgrade when DB_SECUREFILE is set to NEVER or IGNORE:

SYS@ORA12CR1> col owner format a20
SYS@ORA12CR1> select distinct owner, count(*) from dba_lobs where securefile = 'YES' group by owner;

no rows selected

 

Another change which comes with Oracle Database 12c is support for parallel DML operations for LOB columns stored as SecureFiles LOBs in non-partitioned tables and Direct load support for SecureFiles LOB columns that have context index defined on them. This extends Parallel DML functionality introduced in Oracle Database 11gR2. Note Parallel DML support applies also to BasicFiles in case of partitioned tables.

To be continued...

Wrong count of CPU on HP-UX 11.31

We have two identical machines, two identical HW resources, two identical configurations but there is one significant difference. Output from machine A:


$ uname -srm
HP-UX B.11.31 ia64

SQL> select CPU_COUNT_CURRENT,CPU_CORE_COUNT_CURRENT,CPU_SOCKET_COUNT_CURRENT,CPU_COUNT_HIGHWATER from v$license;

CPU_COUNT_CURRENT CPU_CORE_COUNT_CURRENT CPU_SOCKET_COUNT_CURRENT CPU_COUNT_HIGHWATER
----------------- ---------------------- ------------------------ -------------------
               28                                              28                  28

$ machinfo
CPU info:
  8 Intel(R) Itanium 2 9100 series processors (1.6 GHz, 24 MB)
          533 MT/s bus, CPU version A1
          28 logical processors


# ioscan -kf | grep processor | wc -l
28

So everything seems to be fine (just output from v$license shows misleading info) and we've got 28 cores. No, it's not! Output from machine B:


$ uname -srm
HP-UX B.11.31 ia64

SQL> select
CPU_COUNT_CURRENT,CPU_CORE_COUNT_CURRENT,CPU_SOCKET_COUNT_CURRENT,CPU_COUNT_HIGHWATER from v$license;

CPU_COUNT_CURRENT CPU_CORE_COUNT_CURRENT CPU_SOCKET_COUNT_CURRENT CPU_COUNT_HIGHWATER
----------------- ---------------------- ------------------------ -------------------
               14                                              14                  14
$ machinfo
CPU info:
  8 Intel(R) Itanium 2 9100 series processors (1.6 GHz, 24 MB)
          533 MT/s bus, CPU version A1
          14 logical processors


# ioscan -kf | grep processor | wc -l
14

Machine A shows doubled amount of CPUs than on machine B. Both VPARs have 7x Intel Itanium 2 processors (2 cores each). So that means the vPar has 14 CPU cores. Machine B shows correct info but A doesn't. How to find correct information about CPUs in this case? We can use /sbin/vparstatus to clearly see that there are 14 cores assigned to vPar. Machine A:


[Virtual Partition Resource Summary]
                                CPU      Num   Num     Memory Granularity
Virtual Partition Name          Min/Max  CPUs  IO       ILM         CLM
==============================  =======  ====  ====  ==========  ==========
DB1                               1/ 24    14     7         512         512

Machine B:


[Virtual Partition Resource Summary]
                                CPU      Num   Num     Memory Granularity
Virtual Partition Name          Min/Max  CPUs  IO       ILM         CLM
==============================  =======  ====  ====  ==========  ==========
DB2                               1/ 24    14     6         512         512

It is very important to know correct information, at least in two cases, performance (monitoring, tuning or troubleshooting) and for correct product licensing. What is the difference between those two machines? The difference is that machine "B" has latest patches whilst machine "A" even it is patched but (according to swlist) certainly latest patches weren't used. Unfortunately I can't provide wich patch or bundle is fixing this problem for this moment but when I find it then I'll post it right here. Update: My theory was correct and the final answer is very simple - multithreading. This type of Itanium Processors have two threads for each core. You can set multithreading on partition level (this has been done on both of machines) and also on OS level by lcpu_attr and there was the difference. You can verify the settings using kctune |grep lcpu. So the conclusion is no matter what patches are installed in this case.

Home