Feed aggregator

SOA Suite 11g Developers Cookbook Published

Antony Reynolds - Fri, 2013-06-28 10:33
SOA Suite 11g Developers Cookbook Available

Just realized that I failed to mention that Matt & mine’s most recent book, the SOA Suite 11g Developers Cookbook was published over Christmas last year!

In some ways this was an easier book to write than the Developers Guide, the hard bit was deciding what recipes to include.  Once we had decided that the writing of the book was pretty straight forward.

The book focuses on areas that we felt we had neglected in the Developers Guide, and so there is more about Java integration and OSB, both of which we see a lot of questions about when working with customers.

Amazon has a couple of reviews.

Table of Contents

Chapter 1: Building an SOA Suite Cluster
Chapter 2: Using the Metadata Service to Share XML Artifacts
Chapter 3: Working with Transactions
Chapter 4: Mapping Data
Chapter 5: Composite Messaging Patterns
Chapter 6: OSB Messaging Patterns
Chapter 7: Integrating OSB with JSON
Chapter 8: Compressed File Adapter Patterns
Chapter 9: Integrating Java with SOA Suite
Chapter 10: Securing Composites and Calling Secure Web Services
Chapter 11: Configuring the Identity Service
Chapter 12: Configuring OSB to Use Foreign JMS Queues
Chapter 13: Monitoring and Management

More Reviews

In addition to the Amazon Reviews I also found some reviews on GoodReads.

Free WebLogic Administration Cookbook

Antony Reynolds - Fri, 2013-06-28 10:16
Free WebLogic Admin Cookbook

Packt Publishing are offering free copies of Oracle WebLogic Server 12c Advanced Administration Cookbook : http://www.packtpub.com/oracle-weblogic-server-12c-advanced-administration-cookbook/book  in exchange for a review either on your blog or on the title’s Amazon page.

Here’s the blurb:

  • Install, create and configure WebLogic Server
  • Configure an Administration Server with high availability
  • Create and configure JDBC data sources, multi data sources and gridlink data sources
  • Tune the multi data source to survive database failures
  • Setup JMS distributed queues
  • Use WLDF to send threshold notifications
  • Configure WebLogic Server for stability and resilience

If you’re a datacenter operator, system administrator or even a Java developer this book could be exactly what you are looking for to take you one step further with Oracle WebLogic Server, this is a good way to bag yourself a free cookbook (current retail price $25.49).

Free review copies are available until Tuesday 2nd July 2013, so if you are interested, email Harleen Kaur Bagga at: harleenb@packtpub.com.

I will be posting my own review shortly!

Useful MOS notes on 12c

Syed Jaffar - Fri, 2013-06-28 08:31
Here is the list of useful MOS notes on 12c:


  1. Oracle Database 12c Release 1 (12.1) Upgrade New Features [ID 1515747.1]
  2. NOTE:1520299.1 - Master Note For Oracle Database 12c Release 1 (12.1) Database/Client Installation/Upgrade/Migration Standalone Environment (Non-RAC)
  3. NOTE:1493645.1 - Oracle Database 12c Release 1 (12.1) DBUA : Understanding New Changes With All New 12.1 DBUA 
  4. NOTE:1503653.1 - Complete Checklist for Manual Upgrades to Oracle Database 12c Release 1 (12.1)
  5. Oracle Database 12c Release 1 (12.1) Upgrade New Features [ID 1515747.1]
  6. RMAN RECOVER TABLE Feature New to Oracle Database 12c [ID 1521524.1]
  7. How to Merge Multiple Partitions in Oracle 12C [ID 1482263.1]
  8. How to Drop/Truncate Multiple Partitions in Oracle 12C [ID 1482264.1]
  9. How to Create Interval-Reference Partitioned Tables in Oracle 12c [ID 1519042.1]


DataDirect Access your favorite SaaS app with SQL

Kubilay Çilkara - Fri, 2013-06-28 08:24
Database driver company +Progress DataDirect  are writing the next generation of data access. They are working on a platform called Datadirect which will enable you to access loads of data sources in the cloud, from the cloud, and some of them with SQL

Yes you have read correct, SQL!

All you have to do is visit their website and sign up for a trial account and access your favorite SaaS app - i.e Salesforce  or any other provided Cloud app with SQL.

Here is how their availability of connectors looks like






 










To sign up just follow this link.

I very much like this noble idea. SQL is the universal language for data manipulation and access. And things like Big Data, Hadoop in the horizon they are pro-active and seems like they are already working on it.

See some list of data sources they can/will SQL:

  • Twitter
  • Facebook
  • Hive
  • Eloqua
  • force.com
  • Salesforce
  • SQLAzure
  • Microsoft Dynamics CRM
  • and many more...

This is on my hot list of technology to watch. Well done DataDirect. 
Categories: DBA Blogs

Oracle Database 12c Technology Day worldwide

Syed Jaffar - Fri, 2013-06-28 03:30
Oracle quotes that 12c comes with more than 500 new features. Join the Oracle technology day event to learn firsthand how the new multitenant architecture make it easy to deploy and manage database clouds.

You will learn the following:


    • Simplify database consolidation
    • Automatically compress and tier data
    • Improve application continuity
    • Redact sensitive data
Why waiting, select your city and enroll for the event now on http://www.oracle.com/us/corporate/events/database-12c-technology-day/index.html




Oracle 12c New Features - multiple indexes on the same set of columns

ContractOracle - Fri, 2013-06-28 00:29
With Oracle 12c it is now possible to have multiple indexes on the same set of columns as long as there is a difference between the indexes (index type, partitioning etc), and one is invisible.

This makes it possible to quickly change index strategies with minimum impact to applications.

For this example I will first create a test partitioned table.

SQL> CREATE TABLE test_range
(id  NUMBER(5),
att1 char(1),
att2 char(1),
att3 char(1))
PARTITION BY RANGE(id)
(
PARTITION id_10 VALUES LESS THAN(10),
PARTITION id_20 VALUES LESS THAN(20)
);  

Table created.

Now create a global index on ATT1.

SQL> create index att1_global on test_range(att1) global;

Index created.

Try to create another index on ATT1 with local partitioning, and it fails because the existing index is still visible.

SQL> create index att1_local on test_range(att1) local;
create index att1_local on test_range(att1) local
                                      *
ERROR at line 1:
ORA-01408: such column list already indexed

Try to create an invisible global index on ATT1 and it fails because the structure is the same as the existing index.

SQL> create index att1_global2 on test_range(att1) global invisible;
create index att1_global2 on test_range(att1) global invisible
                                        *
ERROR at line 1:
ORA-01408: such column list already indexed

Try to create an invisible index with local partitioning and it is successful.

SQL> create index att1_local on test_range(att1) local invisible;

Index created.

Try to make the locally partitioned index visible, and it fails because there is another visible index with the same columns.

SQL> alter index att1_local visible;
alter index att1_local visible
*
ERROR at line 1:
ORA-14147: There is an existing VISIBLE index defined on the same set of
columns.

We need to make the existing index invisible first, then make the new index visible.  With this method we can easily test multiple indexing strategies without needing long outages to drop and recreate indexes.

SQL> alter index att1_global invisible;

Index altered.

SQL> alter index att1_local visible;

Index altered.

Categories: DBA Blogs

Oracle 12c New Features - SQL*Loader Express

ContractOracle - Thu, 2013-06-27 23:06
Oracle 12c introduces Sql*Loader Express features, which allow users to run sqlldr with minimum configuration.  

The following example shows loading records into table EMPLOYEE from CSV file EMPLOYEE.dat without having to create a control file.


SQL> create table EMPLOYEE (id integer primary key, name varchar2(10));

Table created.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics, Real Application Testing
and Unified Auditing options

[oracle@rac1 admin]$ more EMPLOYEE.dat
1,Adam
2,Ben
3,Colin
4,Dean
5,Evan
6,Frank
7,Greg
8,Hank
9,Ian
10,Jack
[oracle@rac1 admin]$ sqlldr test/test TABLE=EMPLOYEE

SQL*Loader: Release 12.1.0.1.0 - Production on Fri Jun 28 11:58:11 2013

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

Express Mode Load, Table: EMPLOYEE
Path used:      External Table, DEGREE_OF_PARALLELISM=AUTO
SQL*Loader-816: error creating temporary directory object SYS_SQLLDR_XT_TMPDIR_00000 for file EMPLOYEE.dat
ORA-01031: insufficient privileges
SQL*Loader-579: switching to direct path for the load
SQL*Loader-583: ignoring trim setting with direct path, using value of LDRTRIM
SQL*Loader-584: ignoring DEGREE_OF_PARALLELISM setting with direct path, using value of NONE
Express Mode Load, Table: EMPLOYEE
Path used:      Direct

Load completed - logical record count 10.

Table EMPLOYEE:
  10 Rows successfully loaded.

Check the log file:
  EMPLOYEE.log
for more information about the load.

[oracle@rac1 admin]$ ls EMPLOYEE*
EMPLOYEE.dat  EMPLOYEE.log

[oracle@rac1 admin]$ more EMPLOYEE.log

SQL*Loader: Release 12.1.0.1.0 - Production on Fri Jun 28 11:58:11 2013

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

Express Mode Load, Table: EMPLOYEE
Data File:      EMPLOYEE.dat
  Bad File:     EMPLOYEE_%p.bad
  Discard File:  none specified

 (Allow all discards)

Number to load: ALL
Number to skip: 0
Errors allowed: 50
Continuation:    none specified
Path used:      External Table

Table EMPLOYEE, loaded from every logical record.
Insert option in effect for this table: APPEND

Column Name                Position   Len   Term Encl Datatype
-------------------------- ---------- ----- ---- ---- ---------
ID                         FIRST      *     ,         CHARACTER
NAME                       NEXT       *     ,         CHARACTER

Generated control file for possible reuse:
OPTIONS(EXTERNAL_TABLE=EXECUTE, TRIM=LRTRIM)
LOAD DATA
INFILE 'EMPLOYEE'
APPEND
INTO TABLE EMPLOYEE
FIELDS TERMINATED BY ","
(
  ID,
  NAME
)
End of generated control file for possible reuse.

SQL*Loader-816: error creating temporary directory object SYS_SQLLDR_XT_TMPDIR_00000 for file EMPLOYEE.dat
ORA-01031: insufficient privileges

----------------------------------------------------------------
SQL*Loader-579: switching to direct path for the load
SQL*Loader-583: ignoring trim setting with direct path, using value of LDRTRIM
SQL*Loader-584: ignoring DEGREE_OF_PARALLELISM setting with direct path, using value of NONE
----------------------------------------------------------------

Express Mode Load, Table: EMPLOYEE
Data File:      EMPLOYEE.dat
  Bad File:     EMPLOYEE.bad
  Discard File:  none specified

 (Allow all discards)

Number to load: ALL
Number to skip: 0
Errors allowed: 50
Continuation:    none specified
Path used:      Direct

Table EMPLOYEE, loaded from every logical record.
Insert option in effect for this table: APPEND

   Column Name        Position   Len   Term Encl Datatype
--------------------- ---------- ----- ---- ---- ----------------
ID                    FIRST      *     ,         CHARACTER
NAME                  NEXT       *     ,         CHARACTER

Generated control file for possible reuse:
OPTIONS(DIRECT=TRUE)
LOAD DATA
INFILE 'EMPLOYEE'
APPEND
INTO TABLE EMPLOYEE
FIELDS TERMINATED BY ","
(
  ID,
  NAME
)
End of generated control file for possible reuse.

The following index(es) on table EMPLOYEE were processed:
index TEST.SYS_C009860 loaded successfully with 10 keys

Table EMPLOYEE:
  10 Rows successfully loaded.
  0 Rows not loaded due to data errors.
  0 Rows not loaded because all WHEN clauses were failed.
  0 Rows not loaded because all fields were null.

Bind array size not used in direct path.
Column array  rows :    5000
Stream buffer bytes:  256000
Read   buffer bytes: 1048576

Total logical records skipped:          0
Total logical records read:            10
Total logical records rejected:         0
Total logical records discarded:        0
Total stream buffers loaded by SQL*Loader main thread:        1
Total stream buffers loaded by SQL*Loader load thread:        0

Run began on Fri Jun 28 11:58:11 2013
Run ended on Fri Jun 28 11:58:12 2013

Elapsed time was:     00:00:01.27
CPU time was:         00:00:00.02


[oracle@rac1 admin]$ sqlplus test/test

SQL*Plus: Release 12.1.0.1.0 Production on Fri Jun 28 12:05:49 2013

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

Last Successful login time: Fri Jun 28 2013 11:58:11 +08:00

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

SQL> select * from employee;

        ID NAME
---------- ----------
         1 Adam
         2 Ben
         3 Colin
         4 Dean
         5 Evan
         6 Frank
         7 Greg
         8 Hank
         9 Ian
        10 Jack


10 rows selected.


Categories: DBA Blogs

Oracle 12c New Features - FETCH FIRST ROWS, OFFSET

ContractOracle - Thu, 2013-06-27 22:20
Oracle 12c introduces sql syntax for row limiting.  This makes it easier to retrieve records in sets for display or processing.

Example :-

create table employee (id integer primary key, name varchar2(10));
insert into employee values (1,'Adam');
insert into employee values (2,'Ben');
insert into employee values (3,'Colin');
insert into employee values (4,'Dean');
insert into employee values (5,'Evan');
insert into employee values (6,'Frank');
insert into employee values (7,'Greg');
insert into employee values (8,'Hank');
insert into employee values (9,'Ian');
insert into employee values (10,'Jack');
commit;

SQL> select * from employee order by id fetch first 3 rows only;

        ID NAME
---------- ----------
         1 Adam
         2 Ben
         3 Colin

SQL> select * from employee order by id offset 3 rows fetch next 3 rows only;

        ID NAME
---------- ----------
         4 Dean
         5 Evan
         6 Frank

SQL> select * from employee order by id fetch first 50 percent rows only;

        ID NAME
---------- ----------
         1 Adam
         2 Ben
         3 Colin
         4 Dean
         5 Evan



Categories: DBA Blogs

Oracle 12c New Features - Extended Datatypes VARCHAR2 32767 bytes

ContractOracle - Thu, 2013-06-27 21:55
In Oracle 12c it is now possible to create VARCHAR2, NVARCHAR2, and RAW attributes of size 32767 bytes.

This is controlled by new parameter MAX_STRING_SIZE.  The value of the parameter defaults to STANDARD, but if you set it to EXTENDED you can use the expanded variable size.  Consider this carefully, as increased column sizes will have effects on any applications that use the data in variables and parameters and can limit the use of partitions and indexes on the extended datatypes.

In addition to setting MAX_STRING_SIZE=EXTENDED you also need to start the database in "upgrade" mode and run utl32k.sql  Also be aware that if you are running CDB / PDB you may need to upgrade them individually, including the SEED DB.

SQL> alter system set max_string_size=EXTENDED scope=spfile;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup upgrade
ORACLE instance started.

Total System Global Area 1636814848 bytes
Fixed Size                  2288968 bytes
Variable Size            1056965304 bytes
Database Buffers          570425344 bytes
Redo Buffers                7135232 bytes
Database mounted.
Database opened.
SQL> @utl32k.sql

Session altered.

DOC>#######################################################################
DOC>#######################################################################
DOC>   The following statement will cause an "ORA-01722: invalid number"
DOC>   error if the database has not been opened for UPGRADE.
DOC>
DOC>   Perform a "SHUTDOWN ABORT"  and
DOC>   restart using UPGRADE.
DOC>#######################################################################
DOC>#######################################################################
DOC>#

no rows selected

DOC>#######################################################################
DOC>#######################################################################
DOC>   The following statement will cause an "ORA-01722: invalid number"
DOC>   error if the database does not have compatible >= 12.0.0
DOC>
DOC>   Set compatible >= 12.0.0 and retry.
DOC>#######################################################################
DOC>#######################################################################
DOC>#

PL/SQL procedure successfully completed.


Session altered.


0 rows updated.


Commit complete.


System altered.


PL/SQL procedure successfully completed.


Commit complete.


System altered.


Session altered.


PL/SQL procedure successfully completed.

No errors.

Session altered.


PL/SQL procedure successfully completed.


Commit complete.


Package altered.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN  2013-06-28 10:47:30

DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to the
DOC>   number of invalid objects in the database, so this command may take
DOC>   a long time to execute on a database with a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objects compiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RAC nodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#

PL/SQL procedure successfully completed.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END  2013-06-28 10:47:32

DOC> The following query reports the number of objects that have compiled
DOC> with errors.
DOC>
DOC> If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
                  0

DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0


Function created.


PL/SQL procedure successfully completed.


Function dropped.

...Database user "SYS", database schema "APEX_040200", user# "98" 10:47:42
...Compiled 0 out of 2998 objects considered, 0 failed compilation 10:47:43
...263 packages
...255 package bodies
...453 tables
...11 functions
...16 procedures
...3 sequences
...458 triggers
...1322 indexes
...207 views
...0 libraries
...6 types
...0 type bodies
...0 operators
...0 index types
...Begin key object existence check 10:47:43
...Completed key object existence check 10:47:43
...Setting DBMS Registry 10:47:43
...Setting DBMS Registry Complete 10:47:43
...Exiting validate 10:47:43

PL/SQL procedure successfully completed.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1636814848 bytes
Fixed Size                  2288968 bytes
Variable Size            1056965304 bytes
Database Buffers          570425344 bytes
Redo Buffers                7135232 bytes
Database mounted.
Database opened.
SQL> show parameter max_string_size

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
max_string_size                      string      EXTENDED


SQL> connect test/test
Connected.
SQL> create table employee (emp_id integer, emp_name varchar2(20), life_story varchar2(32000));

Table created.

SQL> desc employee
 Name                                      Null?  Type
 ----------------------------------------- ------ ---------------
 EMP_ID                                           NUMBER(38)
 EMP_NAME                                         VARCHAR2(20)
 LIFE_STORY                                       VARCHAR2(32000)

SQL> select segment_name, segment_type from user_segments;

no rows selected

SQL> insert into employee values (1,'John','Wage Slave');

1 row created.

SQL> commit;

Commit complete.

Looking at the segments that exist we can see that by creating a TABLE with an extended VARCHAR2 column this was actually implemented using a TABLE, LOBSEGMENT, and associated LOBINDEX.

SQL> select segment_name, segment_type from user_segments;

SEGMENT_NAME                          SEGMENT_TYPE
------------------------------------- ---------------------------
EMPLOYEE                              TABLE
SYS_IL0000092103C00003$$              LOBINDEX
SYS_LOB0000092103C00003$$             LOBSEGMENT




Categories: DBA Blogs

Oracle 12c New Features - DBMS_UTILITY.EXPAND_SQL_TEXT

ContractOracle - Thu, 2013-06-27 20:34
As a DBA you occasionally get handed SQL statements many hundreds of lines long, and asked to help tune it.  Often the SQL selects from views based on views based on views, which can force the database to access the same table multiple times and join to itself, leading to poor performance.  To work out what the sql is actually doing the DBA needs to extract the sql from every view, merge it, then try to work out if it can be improved.  This can be time consuming, but 12c has introduced DBMS_UTILITY.EXPAND_SQL_TEXT to help.

The following gives and example of expanding a simple sql statement based on a view.


SQL> create table employee (emp_id integer, emp_name varchar2(20));

Table created.

SQL> insert into employee values (1,'John');

1 row created.

SQL> insert into employee values (2,'David');

1 row created.

SQL> commit;

Commit complete.

SQL> create view v1 as select * from employee;

View created.

SQL> create view v2 as select * from employee;

View created.

If we were just given the following piece of SQL we could run it through dbms_utility.expand_sql_text to get a better idea of what the logic in v1 and v2 is.  

SQL> select * from v1 union select * from v2;

    EMP_ID EMP_NAME
---------- --------------------
         1 John
         2 David

SQL> set linesize 32000 pagesize 0 serveroutput on
SQL> declare
   original_sql clob :='select * from v1 union select * from v2';
   expanded_sql clob := empty_clob();
begin
    dbms_utility.expand_sql_text(original_sql,expanded_sql);
    dbms_output.put_line(expanded_sql);
end;
/  
(SELECT "A3"."EMP_ID" "EMP_ID","A3"."EMP_NAME" "EMP_NAME" FROM  (SELECT "A4"."EMP_ID" "EMP_ID","A4"."EMP_NAME" "EMP_NAME" FROM TEST."EMPLOYEE" "A4") "A3")UNION (SELECT "A2"."EMP_ID" "EMP_ID","A2"."EMP_NAME" "EMP_NAME" FROM  (SELECT "A5"."EMP_ID" "EMP_ID","A5"."EMP_NAME" "EMP_NAME" FROM TEST."EMPLOYEE" "A5") "A2")

PL/SQL procedure successfully completed.

So we can see from the expanded query that the original sql was just doing a union of two identical selects from table TEST.EMPLOYEE, which we can easily simplify to a single query with better performance.

# I found the following reference from Jonathan Lewis which indicates this procedure previously existed in package DBMS_SQL2
Categories: DBA Blogs

KScope 13 - Wednesday

Brent Martin - Thu, 2013-06-27 05:14

I just made it back from the Mardi Gras celebration and my decision to blog at this point may not be my smartest decision ever but I feel like it’s now or never so here it goes.


Tom's Top Twelve Things About the Latest Generation of Database Technology


Tom Kyte


Started the morning with Tom Kyte and his session on Oracle 12C.  Say what you want about Oracle, but they keep innovating and improving their database platform.  There are a lot of features that we’ve been waiting for a long time (like defaulting to a sequence, default if null, etc) and being able to embed PL/SQL inline in an SQL is way cool.  But I was blown away with the new Row Pattern Matching functionality, and the Pluggable Database options will be very valuable to cloud providers and other companies who like to consolidate databases onto shared hardware and offer database as a service to the company.  Download the deck and get familiar with the new features.


OBIEE and Essbase Integration with BI Foundation Suite 11.1.1.7


Mark Rittman


Who knew Mark Rittman was from the UK?!  Anyway he had a great presentation about how to integrate Essbase with OBI, what kinds of problems you might run into, and what works well as well as what doesn’t.  Most of this stuff has been blogged about on the Rittman Mead blog so if you missed the session don’t worry.


What I heard was that BI Foundation 11.1.1.7 was just released back in April, but it has a lot of features that may make it work upgrading to.  Smartview can now report from the OBI logical model.  A lot of the Essbase integration wasn’t all that new (we’ve been able to plug Essbase into OBI’s semantic layer for some time), but with 11.1.1.7 Oracle has aligned the security managers. This allowed Oracle to get past some technical challenges around the integration and now the Essbase workspace can run inside of OBI.  It’s cool that Financial Reports can also run within this workspace so we’re getting closer to an integrated reporting view.


There’s also a developer preview where you can spin an Essbase cube off of OBI content.  It doesn’t have a lot of options, but it works and automates most of the steps that previously would have been manual.  Good stuff.


Beyond the Import Metadata Wizard


John McGale


John continued with the Essbase/OBI integration theme, but he was coming from the OBI side and had some great slides about how the Essbase and OBI disciplines were different.  I’m not an expert in either one, but what I heard that the data warehouse (OBI) discipline is all about star schemas and the Kimball methodology.  Essbase is all about how accountants think about their financial data and data is stored in hierarchies at the intersection of dimensions.  I might have heard him say that OBI can outperform Essbase.  Unfortunately I had to duck out for a conference call and to avoid a fistfight that had broken out but I do plan to download the slides just to see what I may have missed.


Streamline your Financial Close with an Integrated Tax Provision


Janette Kosior


New Orleans can be a crazy place, and after a night on Bourbon Street I thought I had seen it all.  Then I went to the HFM Integrated Tax Provision session.  Wow.


Ok, I shouldn’t give the tax accountants a hard time.  Heck, I doubt if any are actually at this conference since most of the audience (the ones wearing clothes anyway) were Hyperion admins.  But something about the topic had everybody in a party mood.


What happens in the Integrated Tax Provision session stays in the Integrated Tax Provision session, but I’m going to bend the code a bit to tell you something about this new application from Oracle.  First, it’s all built on top of HFM.  And why not? HFM is the perfect platform to leverage the dimensionality, complex business rules and robust reporting needed to deliver nice tax provision functionality.


So it’s deployed as a separate HFM-on-steroids application.  It has to be kept in sync with HFM which can be done through EPMA, which is more than you can say for CorpTax or your spreadsheets.   This is an initial release, but the speaker seemed confident that all of the bells and whistles needed were there and the system is rock solid.  There’s even a Financial Management Analytics Module that will let you do some awesome tax reports and dashboards.


On the down side, you have to buy a new license and pay maintenance on it (buzz kill), and the analytics module would be yet another license and maintenance (major buzz kill).


This is part of Oracle’s close manager, which automates your end-to-end close process and helps you build a world-class close process.  And that's enough to make accountants want to  P A R T Y!!!


 

Read More...

Oracle 12c New Features - Unified Auditing

ContractOracle - Thu, 2013-06-27 02:07
Oracle 12c introduces Unified Auditing, which consolidates database audit records including :-
  • DDL, DML, DCL
  • Fine Grained Auditing (DBMS_FGA)
  • Oracle Database Real Application Security
  • Oracle Recovery Manager 
  • Oracle Database Vault 
  • Oracle Label Security 
  • Oracle Data Mining 
  • Oracle Data Pump
  • Oracle SQL*Loader Direct Load
    The data is stored in the AUDSYS schema / SYSAUX tablespace.

      By default Unified Auditing is not enabled.  To enable it, shutdown the database and listener and relink :-

      make -f ins_rdbms.mk uniaud_on ioracle ORACLE_HOME=$ORACLE_HOME

      Then start the listener and database and confirm it is enabled.

      SQL> SELECT VALUE FROM V$OPTION WHERE PARAMETER = 'Unified Auditing'; 

      VALUE
      ---------------------------------------------------------------TRUE

      Unified Auditing can be configured to queue writes of audit data in SGA to improve performance, or immediately write to disk to reduce data loss in case of crash.


      To configure immediate write :-

      BEGIN 
      DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_PROPERTY(  
      DBMS_AUDIT_MGMT.AUDIT_TRAIL_UNIFIED,  
      DBMS_AUDIT_MGMT.AUDIT_TRAIL_WRITE_MODE,  
      DBMS_AUDIT_MGMT.AUDIT_TRAIL_IMMEDIATE_WRITE);
      END;
      /


      To configure queued writes :-

      BEGIN   
      DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_PROPERTY(   
      DBMS_AUDIT_MGMT.AUDIT_TRAIL_UNIFIED,      
      DBMS_AUDIT_MGMT.AUDIT_TRAIL_WRITE_MODE,   
      DBMS_AUDIT_MGMT.AUDIT_TRAIL_QUEUED_WRITE); 
      END; 
      /

      12C has a new parameter unified_audit_sga_queue_size. I did not change this.

      SQL> show parameter unified

      NAME                                 TYPE        VALUE
      ------------------------------------ ----------- ----------------
      unified_audit_sga_queue_size         integer     1048576

      New roles AUDIT_ADMIN and AUDIT_VIEWER are required to administer unified auditing.

      SQL> create user auditor identified by auditor;

      User created.

      SQL> grant create session to auditor;

      Grant succeeded.

      SQL> grant AUDIT_ADMIN to auditor;

      Grant succeeded.

      Create an audit policy with an action to capture SELECT on table TEST.SALARY.  It would also be possible to capture events DDL, RMAN, FGA, Data Pump etc.

      SQL> connect auditor/auditor@T12P1
      Connected.
      SQL> CREATE AUDIT POLICY audit_salary
      ACTIONS SELECT ON TEST.SALARY;


      Audit policy created.


      Enable the policy for user "nobody"

      SQL> AUDIT POLICY audit_salary by nobody;

      Audit succeeded.


      Login as "nobody" and select from table TEST.SALARY.

      SQL> connect nobody/nobody@T12P1
      Connected.
      SQL> select * from test.salary;

      no rows selected

      To flush the audit data to table execute DBMS_AUDIT_MGMT.FLUSH_UNIFIED_AUDIT_TRAIL :-

      SQL> connect / as sysdba
      Connected.
      SQL> EXEC SYS.DBMS_AUDIT_MGMT.FLUSH_UNIFIED_AUDIT_TRAIL;PL/SQL procedure successfully completed.

      Audit data can be extracted from table UNIFIED_AUDIT_TRAIL. You can see below there are audit records for the LOGON and the SELECT.


      SQL> connect auditor/auditor@T12P1
      Connected.


      SQL> SELECT ACTION_NAME, OBJECT_SCHEMA, OBJECT_NAME, EVENT_TIMESTAMP FROM UNIFIED_AUDIT_TRAIL
      WHERE DBUSERNAME = 'NOBODY';

      ACTION_NAME
      ----------------------------------------------------------------
      OBJECT_SCHEMA
      ------------------------------
      OBJECT_NAME
      ----------------------------------------------------------------
      EVENT_TIMESTAMP
      ----------------------------------------------------------------
      SELECT
      TEST
      SALARY
      27-JUN-13 03.24.07.677753 PM

      LOGON


      27-JUN-13 03.24.02.215469 PM


      To upload OS audit files to the DB :-
      EXEC DBMS_AUDIT_MGMT.LOAD_UNIFIED_AUDIT_FILES;
      SQL> desc unified_audit_trail
       Name                                      Null?    Type
      ----------------------------------------- -------- ----------------------------
      AUDIT_TYPE VARCHAR2(64)
      SESSIONID NUMBER
      PROXY_SESSIONID NUMBER
      OS_USERNAME VARCHAR2(30)
      USERHOST VARCHAR2(128)
      TERMINAL VARCHAR2(30)
      INSTANCE_ID NUMBER
      DBID NUMBER
      AUTHENTICATION_TYPE VARCHAR2(1024)
      DBUSERNAME VARCHAR2(30)
      DBPROXY_USERNAME VARCHAR2(30)
      EXTERNAL_USERID VARCHAR2(1024)
      GLOBAL_USERID VARCHAR2(32)
      CLIENT_PROGRAM_NAME VARCHAR2(48)
      DBLINK_INFO VARCHAR2(4000)
      XS_USER_NAME VARCHAR2(128)
      XS_SESSIONID RAW(33)
      ENTRY_ID NUMBER
      STATEMENT_ID NUMBER
      EVENT_TIMESTAMP TIMESTAMP(6) WITH LOCAL TIME ZONE
      ACTION_NAME VARCHAR2(64)
      RETURN_CODE NUMBER
      OS_PROCESS VARCHAR2(16)
      TRANSACTION_ID RAW(8)
      SCN NUMBER
      EXECUTION_ID VARCHAR2(64)
      OBJECT_SCHEMA VARCHAR2(30)
      OBJECT_NAME VARCHAR2(128)
      SQL_TEXT CLOB
      SQL_BINDS CLOB
      APPLICATION_CONTEXTS VARCHAR2(4000)
      CLIENT_IDENTIFIER VARCHAR2(64)
      NEW_SCHEMA VARCHAR2(30)
      NEW_NAME VARCHAR2(128)
      OBJECT_EDITION VARCHAR2(30)
      SYSTEM_PRIVILEGE_USED VARCHAR2(1024)
      SYSTEM_PRIVILEGE VARCHAR2(40)
      AUDIT_OPTION VARCHAR2(40)
      OBJECT_PRIVILEGES VARCHAR2(19)
      ROLE VARCHAR2(30)
      TARGET_USER VARCHAR2(30)
      EXCLUDED_USER VARCHAR2(30)
      EXCLUDED_SCHEMA VARCHAR2(30)
      EXCLUDED_OBJECT VARCHAR2(128)
      ADDITIONAL_INFO VARCHAR2(4000)
      UNIFIED_AUDIT_POLICIES VARCHAR2(4000)
      FGA_POLICY_NAME VARCHAR2(30)
      XS_INACTIVITY_TIMEOUT NUMBER
      XS_ENTITY_TYPE VARCHAR2(32)
      XS_TARGET_PRINCIPAL_NAME VARCHAR2(30)
      XS_PROXY_USER_NAME VARCHAR2(30)
      XS_DATASEC_POLICY_NAME VARCHAR2(30)
      XS_SCHEMA_NAME VARCHAR2(30)
      XS_CALLBACK_EVENT_TYPE VARCHAR2(32)
      XS_PACKAGE_NAME VARCHAR2(30)
      XS_PROCEDURE_NAME VARCHAR2(30)
      XS_ENABLED_ROLE VARCHAR2(30)
      XS_COOKIE VARCHAR2(1024)
      XS_NS_NAME VARCHAR2(30)
      XS_NS_ATTRIBUTE VARCHAR2(4000)
      XS_NS_ATTRIBUTE_OLD_VAL VARCHAR2(4000)
      XS_NS_ATTRIBUTE_NEW_VAL VARCHAR2(4000)
      DV_ACTION_CODE NUMBER
      DV_ACTION_NAME VARCHAR2(30)
      DV_EXTENDED_ACTION_CODE NUMBER
      DV_GRANTEE VARCHAR2(30)
      DV_RETURN_CODE NUMBER
      DV_ACTION_OBJECT_NAME VARCHAR2(128)
      DV_RULE_SET_NAME VARCHAR2(90)
      DV_COMMENT VARCHAR2(4000)
      DV_FACTOR_CONTEXT VARCHAR2(4000)
      DV_OBJECT_STATUS VARCHAR2(1)
      OLS_POLICY_NAME VARCHAR2(30)
      OLS_GRANTEE VARCHAR2(30)
      OLS_MAX_READ_LABEL VARCHAR2(4000)
      OLS_MAX_WRITE_LABEL VARCHAR2(4000)
      OLS_MIN_WRITE_LABEL VARCHAR2(4000)
      OLS_PRIVILEGES_GRANTED VARCHAR2(30)
      OLS_PROGRAM_UNIT_NAME VARCHAR2(30)
      OLS_PRIVILEGES_USED VARCHAR2(128)
      OLS_STRING_LABEL VARCHAR2(4000)
      OLS_LABEL_COMPONENT_TYPE VARCHAR2(12)
      OLS_LABEL_COMPONENT_NAME VARCHAR2(30)
      OLS_PARENT_GROUP_NAME VARCHAR2(30)
      OLS_OLD_VALUE VARCHAR2(4000)
      OLS_NEW_VALUE VARCHAR2(4000)
      RMAN_SESSION_RECID NUMBER
      RMAN_SESSION_STAMP NUMBER
      RMAN_OPERATION VARCHAR2(20)
      RMAN_OBJECT_TYPE VARCHAR2(20)
      RMAN_DEVICE_TYPE VARCHAR2(5)
      DP_TEXT_PARAMETERS1 VARCHAR2(512)
      DP_BOOLEAN_PARAMETERS1 VARCHAR2(512)
      DIRECT_PATH_NUM_COLUMNS_LOADED NUMBER


      More details can be found in the documentation :- http://docs.oracle.com/cd/E16655_01/network.121/e17607/audit_config.htm
      Categories: DBA Blogs

      Oracle 12c - need to start container AND pluggable databases.

      ContractOracle - Thu, 2013-06-27 01:56
      In Oracle 12c we start the Container Database (CDB) the same as we started previous database versions.

      [oracle@rac1 lib]$ sqlplus / as sysdba

      SQL*Plus: Release 12.1.0.1.0 Production on Thu Jun 27 14:47:35 2013

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

      Connected to an idle instance.

      SQL> startup
      ORACLE instance started.

      Total System Global Area 1653518336 bytes
      Fixed Size                  2289016 bytes
      Variable Size             989856392 bytes
      Database Buffers          654311424 bytes
      Redo Buffers                7061504 bytes
      Database mounted.
      Database opened.

      But then we find that the Pluggable Databases (PDBs) are still in "MOUNTED" state, so we will need to open them before we can login.

      SQL> select name, open_mode from v$pdbs;

      NAME                           OPEN_MODE
      ------------------------------ ----------
      PDB$SEED                       READ ONLY
      PDB1                           MOUNTED
      PDB2                           MOUNTED
      PDB3                           MOUNTED

      From CDB$ROOT we can manage any PDB.  

      SQL> show con_name

      CON_NAME
      ------------------------------
      CDB$ROOT

      To open one PDB :-

      SQL> alter pluggable database PDB1 open;

      Pluggable database altered.

      To open ALL PDBS :-

      SQL> alter pluggable database all open;

      Pluggable database altered.

      SQL> select name, open_mode from v$pdbs;

      NAME                           OPEN_MODE
      ------------------------------ ----------
      PDB$SEED                       READ ONLY
      PDB1                           READ WRITE
      PDB2                           READ WRITE
      PDB3                           READ WRITE

      Or we can move down to a PDB container to stop and start them individually.

      SQL> alter session set container=PDB1;

      Session altered.

      SQL> show con_name

      CON_NAME
      ------------------------------
      PDB1

      SQL> shutdown;
      Pluggable Database closed.
      SQL> startup;
      Pluggable Database opened.


      Startup of PDBs can be automated using a startup trigger.

      SQL> create or replace trigger Sys.After_Startup
                                after startup on database
      begin
         execute immediate 'alter pluggable database all open';
      end;
      /  

      Trigger created.

      SQL> shutdown immediate;
      Database closed.
      Database dismounted.
      ORACLE instance shut down.
      SQL> startup
      ORACLE instance started.

      Total System Global Area 1636814848 bytes
      Fixed Size                  2288968 bytes
      Variable Size             973079224 bytes
      Database Buffers          654311424 bytes
      Redo Buffers                7135232 bytes
      Database mounted.
      Database opened.

      SQL> select name, open_mode from v$pdbs;

      NAME                           OPEN_MODE
      ------------------------------ ----------
      PDB$SEED                       READ ONLY
      PDB1                           READ WRITE
      PDB2                           READ WRITE
      PDB3                           READ WRITE

      Categories: DBA Blogs

      Oracle 12c Limitations to RESOURCE, SELECT ANY DICTIONARY

      ContractOracle - Thu, 2013-06-27 01:38
      Oracle 12c has implemented a few improvements to the existing system privileges.  

      Dictionary tables containing password hashes (DEFAULT_PWD$, ENC$, LINK$, USER$, USER_HISTORY$XS$VERIFIERSare no longer included in the SELECT ANY DICTIONARY system privilege.  This makes it safer to give developers access to dictionary tables for tuning and debugging, without giving them the chance to run brute force attacks ...

      Unlimited Tablespace is no longer included in the RESOURCE role. This should reduce the number of times developers create segments in SYSTEM tablespace ....

      SQL> grant select any dictionary to god;

      Grant succeeded.

      SQL> grant resource to god;

      Grant succeeded.

      SQL> connect god/god@T12P1
      Connected.
      SQL> select password from user$;
      select password from user$
                           *
      ERROR at line 1:
      ORA-00942: table or view does not exist

      SQL> select default_tablespace from dba_users where username = 'GOD';

      DEFAULT_TABLESPACE
      ------------------------------
      USERS

      SQL> create table test(id integer) tablespace system;

      Table created.

      SQL> insert into test values (1);
      insert into test values (1)
                  *
      ERROR at line 1:
      ORA-01950: no privileges on tablespace 'SYSTEM'

      Categories: DBA Blogs

      Oracle 12c New Features - Data Redaction via DBMS_REDACT

      ContractOracle - Wed, 2013-06-26 21:55
      Oracle 12c has added functionality to redact data in specific columns depending on a policy configured by the DBMS_REDACT package.  

      First create table EMPLOYEE in schema TEST and grant select to GOD and NOBODY.

      SQL> connect test/test@T12P1
      Connected.
      SQL> create table employee (emp_id integer primary key, emp_name varchar2(10), salary number);

      Table created.

      SQL> grant select on employee to god;

      Grant succeeded.

      SQL> grant select on employee to nobody;

      Grant succeeded.

      SQL> insert into employee (emp_id, emp_name, salary) values (1,'John',100000);

      1 row created.

      SQL> insert into employee (emp_id, emp_name, salary) values (2,'Ben',80000);

      1 row created.

      SQL> commit;

      Commit complete.

      Now we create the data redaction policy using DBMS_REDACT.ADD_POLICY.  Only someone logged in as GOD should be allowed to see the values stored in TEST.EMPLOYEE.SALARY.  In this case we are using function type FULL which obscures all data, but other options include PARTIAL, RANDOM, REGEXP.

      SQL> connect system/password@T12P1
      Connected.
      SQL> BEGIN
        2  DBMS_REDACT.add_policy(object_schema => 'TEST'
        3  ,object_name => 'EMPLOYEE'
        4  ,policy_name => 'Salary Redaction'
        5  ,expression => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') != ''GOD'' OR SYS_CONTEXT(''USERENV'',''SESSION_USER'') IS NULL'
        6  ,column_name => 'SALARY'
        7  ,function_type => dbms_redact.FULL
        8  );
        9  END;
       10  /

      PL/SQL procedure successfully completed.

      When we are logged in as nobody the salary column is redacted.

      SQL> connect nobody/nobody@T12P1
      Connected.
      SQL> select * from test.employee;

                    EMP_ID EMP_NAME                 SALARY
      -------------------- ---------- --------------------
                         1 John                          0
                         2 Ben                           0

      But when we are logged in as god we can see the data.

      SQL> connect god/god@T12P1
      Connected.
      SQL> select * from test.employee;

                    EMP_ID EMP_NAME                 SALARY
      -------------------- ---------- --------------------
                         1 John                     100000
                         2 Ben                       80000

      Note that redaction policies do NOT apply to users with the EXEMPT REDACTION POLICY system privilege, which by default is granted via EXP_FULL_DATABASE and DBA roles.  This means that by default DBAs will still have access to redacted data.

      SQL> connect system/password@T12P1
      Connected.
      SQL> select * from test.employee;

                    EMP_ID EMP_NAME                 SALARY
      -------------------- ---------- --------------------
                         1 John                     100000
                         2 Ben                       80000

      SQL> select grantee, privilege from dba_sys_privs where privilege = 'EXEMPT REDACTION POLICY';

      GRANTEE
      -----------------------------------------------------------------
      EXP_FULL_DATABASE

      SQL> select grantee from dba_role_privs where granted_role = 'EXP_FULL_DATABASE';

      GRANTEE
      -----------------------------------------------------------------
      SYS
      DATAPUMP_EXP_FULL_DATABASE
      DBA
      DATAPUMP_IMP_FULL_DATABASE







      Categories: DBA Blogs

      Oracle database 12c

      Amardeep Sidhu - Wed, 2013-06-26 20:58

      So there is a new toy in the market for database geeks : Oracle has released database 12c. Every social platform is abuzz with the 12c activity. So thought that I should also complete the ritual Winking smile

      In this post Aman has already summed up many important links.

      Maria Colgan has posted some useful links here.

      And here is a link to a slidedeck about Upgrading and Migrating to 12c.

      Happy 12c’ing !

      Categories: BI & Warehousing

      Oracle 12c New Features - In Database Row Archiving

      ContractOracle - Wed, 2013-06-26 20:57
      Oracle 12c has a new feature called In Database Row Archiving.  Instead of deleting old records they can now be marked as archived, be invisible to running applications, but remain in the original table in case they need to be restored at a later date.  This should reduce the need for DBAs to restore old backups, and should keep auditors happy.

      First create a test table.

      SQL> create table employee (emp_id integer primary key, emp_name varchar2(10), archive_date date);

      Table created.

      SQL> insert into employee (emp_id, emp_name) values (1,'John');

      1 row created.

      SQL> insert into employee (emp_id, emp_name) values (2,'Ben');

      1 row created.

      SQL> commit;

      Commit complete.

      Now enable archival for the table.

      SQL> alter table employee row archival;

      Table altered.

      We can see from hidden attribute ORA_ARCHIVE_STATE=0 that the records are not archived.

      SQL> select * from employee;

      EMP_ID EMP_NAME   ARCHIVE_D
      ------ ---------- ---------
           1 John
           2 Ben

      SQL> select emp_id, emp_name, ora_archive_state from employee;

      EMP_ID EMP_NAME   ORA_ARCHIVE_STATE
      ------ ---------- -----------------------------------------------
           1 John       0
           2 Ben        0

      Now we want to archive the record for employee Ben (he resigned).

      SQL> update employee
      set ora_archive_state=dbms_ilm.archivestatename(1), archive_date=sysdate
      where emp_id=2; 

      1 row updated.

      SQL> commit;

      Commit complete.

      The record record for Ben is no longer visible to normal select operations.

      SQL> select * from employee;

      EMP_ID EMP_NAME   ARCHIVE_D
      ------ ---------- ---------
           1 John

      But if we set row archive visibility=all then we can see that the record still exists in the table.  

      SQL> alter session set row archival visibility = all;

      Session altered.

      SQL> select emp_id, emp_name, ora_archive_state from employee;

      EMP_ID EMP_NAME   ORA_ARCHIVE_STATE
      ------ ---------- -----------------------------------------------
           1 John       0
           2 Ben        1


      SQL> alter session set row archival visibility = active;

      Session altered.

      And while the record is invisible to the application, it is still considered by constraints.

      SQL> select * from employee;

      EMP_ID EMP_NAME   ARCHIVE_D
      ------ ---------- ---------
           1 John

      SQL> insert into employee (emp_id, emp_name) values (2,'Ben');
      insert into employee (emp_id, emp_name) values (2,'Ben')
      *
      ERROR at line 1:
      ORA-00001: unique constraint (TEST.SYS_C009859) violated

      And if we re-hire Ben, the record can be brought back from archive.

      SQL> alter session set row archival visibility = all;

      Session altered.

      SQL> update employee
      set ora_archive_state=dbms_ilm.archivestatename(0), archive_date=null
      where emp_id=2; 

      1 row updated.

      SQL> commit;

      Commit complete.

      SQL> alter session set row archival visibility = active;

      Session altered.

      SQL> select * from employee;

      EMP_ID EMP_NAME   ARCHIVE_D
      ------ ---------- ---------
           1 John
           2 Ben


      Categories: DBA Blogs

      Oracle 12c New Features - Partial Indexing on Partitioned Tables

      ContractOracle - Wed, 2013-06-26 03:42
      Oracle 12c allows DBAs to set specific table partitions "INDEXING OFF" and create indexes with "INDEXING PARTIAL".  This means that index partitions won't be created for the specified table partitions.  This allows DBAs to have multiple indexing strategies for different partitions, or to rapidly create indexes on specific partitions.

      Example :- create a partitioned table :-

      SQL> CREATE TABLE test_range
      (id  NUMBER(5),
      att1 char(1),
      att2 char(1),
      att3 char(1))
      PARTITION BY RANGE(id)
      (
      PARTITION id_10 VALUES LESS THAN(10),
      PARTITION id_20 VALUES LESS THAN(20)
      );

      Table created.

      Create a local index.  By default it will create index partitions for every table partition.

      SQL> create index test_index1 on test_range(att1) local;

      Index created.

      Now set indexing off for one partition, and create a second index with partial indexing enabled.

      SQL> alter table test_range modify partition id_20 indexing off;

      Table altered.

      SQL> create index test_index2 on test_range(att2) local indexing partial;

      Index created.

      Insert to create the segments.

      SQL> insert into test_range values (1,'a','a','a');

      1 row created.

      SQL> insert into test_range values (11,'b','b','b');

      1 row created.

      SQL> commit;

      Commit complete.

      And we can see that for index TEST_INDEX2 with PARTIAL INDEXING set, no segment was created for table partition ID_20 with INDEXING OFF.

      SQL> select index_name, partition_name, segment_created from dba_ind_partitions where index_owner = 'TEST';

      INDEX_NAME
      --------------------------------------------------------------------------------
      PARTITION_NAME
      --------------------------------------------------------------------------------
      SEGMENT_CREATED
      -------------------------
      TEST_INDEX1
      ID_10
      YES

      TEST_INDEX1
      ID_20
      YES

      TEST_INDEX2
      ID_10
      YES

      TEST_INDEX2
      ID_20
      NO

      SQL> select segment_name, segment_type, count(*) from dba_segments where owner = 'TEST' group by segment_name, segment_type;

      SEGMENT_NAME
      --------------------------------------------------------------------------------
      SEGMENT_TYPE         COUNT(*)
      ------------------ ----------
      TEST_RANGE
      TABLE PARTITION             2

      TEST_INDEX1
      INDEX PARTITION             2

      TEST_INDEX2
      INDEX PARTITION             1


      Categories: DBA Blogs

      What's in Oracle Database 12c for Java?

      Kuassi Mensah - Wed, 2013-06-26 00:05
      Looking to exploit the new Oracle Multitenant Container Database with Java?
      Have you ever needed to deploy Java applications with tens of thousands of concurrent users? If you are a Java architect, Java designer or wannabe looking to exploit new Oracle database 12c enhancements in the areas of performance, scalability, availability, security and manageability/ease-of-use, this is the paper for you.

       Have you ever experienced paying twice the same flight ticket, the same article or your taxes? Have you ever wanted the system to just deal with database failure and not ask you to restart your transaction from start? Upon database outages (hardware, software, network, or storage failure), four problems confront applications: hangs, errors handling, determining the outcome of in-flight work (i.e., last COMMIT), and the resubmission in-flight work.
      If you are application developer, database and system administrator, integrator or ISV looking to better exploit Oracle RAC and Active Data Guard to achieve maximum application availability, this is the paper for you (although with a Java focus).

      Oracle Database 12c is 'out' - some pleasant surprises

      Hans Forbrich - Tue, 2013-06-25 21:18
      Without fanfare, other than a "didyaknow" on Oracle-L, Oracle 12c for Linux and Solaris became available on Oracle's edelivery site.

      Some time later, the docs showed up at http://www.oracle.com/pls/db121/homepage and via http://docs.oracle.com (but not yet on tahiti.oracle.com) and on OTN's http://download.oracle.com

      My FIRST look at the documentation these days is at the Licensing guide.  For me, that's even more important than the New Features, the Concepts (especially the What's New chapter) and the Administrator's Guide.

      Wheeeeeeeeeeee!

      Personal Edition For Linux!!!  It's here!

      Finally.

      THANK YOU ORACLE.   And, since I was able to peek at the product early, that is the first of MANY thanks.

       -------

      Update:  One of the Oracle-L people pointed out that the Personal Edition for Linux has been available for 11.2 as well.  They snuck that in - but I am still very thankful.

      Personal Edition is for developers who need ALL the features and options (except RAC and OEM packs), as well as support, at a very low price.  The limitation - it's a One Named User Only license.
      Categories: DBA Blogs

      Pages

      Subscribe to Oracle FAQ aggregator