View security extension BEQUEATH CURRENT_USER Oracle Database 12C release 1 (12.1)

This new feature in Oracle 12C changes behavior of calling functions within views. In previous releases all functions used within a view were called using rights of creator of the view (DEFINER rights) no matter if the functions used pragma AUTHID CURRENT_USER(INVOKER rights).

In Oracle 12C you can specify dedicated pragma  during view creation BEQUEATH CURRNT_USER so all functions that are using AUTHID CURRENT_USER will be called with INVOKER rights.

It’s worth to read article: Authid current_user, authid definer

Continue reading

Install Oracle 12C Release 1 (12.1) on Centos Linux 7

This article presents how to install Oracle 12C(12.1.0.1) Release 1 on Centos Linux 7.

Read following article how to install Centos Linux 7: Install Centos Linux 7 (for comfort set 2G memory for your virtual machine before proceeding with Oracle software installation).

Software

Software for 12CR1 is available on OTN or edelivery

Database software

linuxamd64_12c_database_1of2.zip 
linuxamd64_12c_database_2of2.zip

Continue reading

Install Oracle 11G Release 2 (11.2) on Centos Linux 7

This article presents how to install Oracle 11G on Centos Linux 7.

Read following article how to install Centos Linux 7: Install Centos Linux 7 (for comfort set 2G memory for your virtual machine before proceeding with Oracle software installation).

Installation software is available on OTN, edelivery version 11.2.0.1 or Oracle support(old metalink) 11.2.0.4. In this installation I’m presenting installation for 11.2.0.4 but for previous version 11.2.0.X it shouldn’t be different.

Database software – 11.2.0.4

p13390677_112040_Linux-x86-64_1of7.zip 
p13390677_112040_Linux-x86-64_2of7.zip

Continue reading

Install Centos Linux 7

This article presents how to install CentOS Enterprise Linux 7.

I assume you have already downloaded CentOS Enterprise Linux 7 64 bit(about 4 G) and you know how to use VirtualBox 64 bit(100M). Create virtual machine with default settings for RedHat Linux 64 bit. For start 1GB ram and 64G for disk is enough plus increase video memory to 128M and turn on acceleration 3D. Rest of options you can keep default.

Centos7_01

Continue reading

Role and Privileges Analysis Oracle Database 12C release 1 (12.1)

It’s very nice new feature in Oracle Database 12C helping quickly analyze  what roles and privileges are used inside database and by who.

Quick summary about this extension and its features:

  • new PL/SQL package DBMS_PRIVILEGE_CAPTURE to run analysis
    • for both system privileges and object privileges
    • on application module level or user session level
    • in dedicated time
  • create reports that describe used privileges and objects
  • no need to use database vault
  • can show used and unused privileges for system and objects so it’s easy to decide what can be revoked, changed(grant less powerful roles, privileges) to make more secured database

role and privileges analysis

Continue reading

Oracle user defined aggregate function

From time to time Oracle seems to be limited in aggregate functions. However Oracle delivers possibility to create own aggregate function using built-in framework ODCIAggregate routines

Each of the four ODCIAggregate routines required to define a user-defined aggregate function codifies one of the internal operations that any aggregate function performs, namely:

  • Initialize – ODCIAggregateInitialize – initialize the computation of the user-defined aggregate
  • Iterate – ODCIAggregateIterate – calculates aggregations
  • Merge – ODCIAggregateMerge – combines aggregation iterations
  • Terminate – ODCIAggregateTerminate – retuns aggregation value

ODCIAggregate

Continue reading

Install Oracle Enterprise Manager 12C release 4(12.1.0.4) on OEL 5/6

This article presents installation of new Oracle Enterprise Manager 12C version 12.1.0.4 on Oracle Linux OEL5, OEL6. It can be installed using Oracle 12C Release 1 so it’s up to you weather you use database version 11G Release 2 or 12C Release 1 as your repository.

Read following articles to find out how to install Linux OEL5,6.

Read following articles to find out how to install Oracle Database 11G Release 2

Read following articles to find out how to install Oracle Database 12C Release 1

This installation was done using following software:

  • Oracle Virtual Box – 64 bit
  • Oracle Enterprise Linux 6 – 64 bit
  • Oracle Database 11G Release 2(11.2.0.4) – 64 bit for Linux
  • Oracle Oracle Enterprise Manager 12C release 4(12.1.0.4) – 64 bit for Linux

Binaries Oracle Enterprise Manager 12C (12.1.0.4)

em12104_linux64_disk1.zip - enterprise software
em12104_linux64_disk2.zip - enterprise software
em12104_linux64_disk3.zip - enterprise software

You need at least 5GB of memory for this installation so check your VirtualBox settings before proceeding.

Continue reading

DBMS_PARALLEL_EXECUTE

If you are developer no doubt you have situation that you need to run your code in parallel. I’m not talking about running DML, DDL in parallel – read following article to understand how to do it effectively – Effective parallel execution for DML, DDL in Oracle.

I’m talking about running many independent pieces of your code – SQL, PL/SQL. Everybody knows it can be done using DBMS_SCHEDULER package, however it requires a lot of steps to be done. Define programs, jobs, chains, schedules.

To simplify this process Oracle has introduced very nice package that can help you do it very quickly DBMS_PARALLEL_EXECUTE.

Following picture describes general concept of this package

chunks_1

Continue reading