Infrastructure at your Service

Category Archives: Oracle

Franck Pachot

Oracle: How to move OMF datafiles in 11g and 12c

By | Database management, Oracle | One Comment

With OMF datafiles, you don’t manage the datafile names. But how do you set the destination when you want to move them to another mount point? Let’s see how easy (and online) it works in 12c. And how to do it with minimal downtime in 11g. Testcase Let’s create a tablespace with two datafiles. It’s OMF and goes into /u01: SQL> alter system set db_create_file_dest=’/u01/app/oracle/oradata’ scope=memory; System altered. SQL> show parameter db_create_file_dest NAME TYPE VALUE…

 
Read More
Franck Pachot

Franck Pachot: Resize your Oracle datafiles down to the minimum without ORA-03297

By | Database management, Oracle | 32 Comments

Your datafiles have grown in the past but now you want to reclaim as much space as possible, because you are short on filesystem space, or you want to move some files without moving empty blocks, or your backup size is too large. ALTER DATABASE DATAFILE … RESIZE can reclaim the space at the end of the datafile, down to the latest allocated extent. But if you try to get lower, you will get: ORA-03297:…

 
Read More
Franck Pachot

What’s the consequence of NOLOGGING loads?

By | Database management, Oracle | No Comments

When you load data in direct-path and have the NOLOGGING attribute set, you minimize redo generation, but you take the risk, in case of media recovery, to loose the data in the blocks that you’ve loaded. So you probably run a backup as soon as the load is done. But what happens if you have a crash, with media failure, before the backup is finish? I encountered recently the situation but – probably because of…

 
Read More
Franck Pachot

Oracle 12.1.0.2.1 Set to Join Conversion

By | Database management, Oracle | No Comments

Recently, I described the Partial Join Evaluation transformation that appeared last year in Oracle 12c. I did it as an introduction for another transformation that appeared long time ago in 10.1.0.3 but was not used by default. And even in the latest Oracle 12c patchset 1 (aka 12.1.0.2.0) it is still not enabled. But it’s there and you can use it if you set optimizer_features_enabled to 12.1.0.2.1 (that’s not a typo!). Yes, that number looks…

 
Read More
Franck Pachot

Oracle 12.1.0.2: Wait event histograms in μs

By | Database Administration & Monitoring, Oracle | 2 Comments

When an Oracle Database spends a high percentage of its DB time in User I/O, I usually check the wait event histograms in order to see if the storage system is working well. But today, with storage going to SSD, most I/O are less than 1 milliseconds and we have no details about those wait times. Here is what is exposed by V$WAIT_EVENT_HISTOGRAM:   select event,wait_time_milli,wait_count from v$event_histogram where event like ‘db file sequential read’…

 
Read More
Franck Pachot

PDB media failure may cause the whole CDB to crash

By | Database management, Oracle | 3 Comments

Do you remember last year, when 12c arrived with multitenant, David Hueber warned us about the fact that a single PDB can, under certain conditions, generate a complete system downtime? We are beta testers and opened a SR for that. Now one year later the first patchset is out and obviously I checked if the issue was fixed. It’s a patchset afterall, which is expected to fix issues before than bringing new features. So the…

 
Read More
Franck Pachot

SQL monitoring 12.1.0.2 shows adaptive plans

By | Database management, Oracle | No Comments

In a previous post, I have described Adaptive Plans. Even if I prefer to show plans with the SQL Monitor active html format, I had to stick with the dbms_xplan for that because SQL Monitoring did not show all information about adaptive plans. This has been fixed in the Patchset 1 and I have run the same query to show the new feature. First, an adaptive plan can be in two states: ‘resolving’ where all…

 
Read More
Franck Pachot

Beyond In-Memory, what’s new in 12.1.0.2 ?

By | Database management, Oracle | No Comments

It’s just a patchset. The delivery that is there to stabilize a release with all the bug fixes. But it comes with a lot of new features as well. And not only the one that has been advertised as the future of the database. It’s a huge release. Let’s have a look at what’s new. First, it seems that it will be the only patchest for 12.1 Then, there is that In-Memory option awaited for…

 
Read More
Franck Pachot

Drilling down V$RECOVERY_AREA_USAGE

By | Database management, Oracle | 2 Comments

In a previous post I used X$KCCAGF to get more information about reclaimable archived logs in FRA, because there is a bug in standby (not opened) databases where archivelog deletion policy is ignored. I explained that the view V$RECOVERY_AREA_USAGE has only aggregated information about space reclaimable without the details about which files are reclaimable or not. Here I’ll explain how I came to X$KCCAGF and I’ll give the query to get all the detailed information…

 
Read More
Franck Pachot

Oracle EM agent 12c thread leak on RAC

By | Database management, Oracle | 4 Comments

In a previous post about nproc limit, I wrote that I had to investigate the nproc limit with the number of threads because my Oracle 12c EM agent was having thousands of threads. This post is a short feedback about this issue and the way I have found the root cause. It concerns the enterprise manager agent 12c on Grid Infrasctructure >= 11.2.0.2 NLWP The issue was: ps -o nlwp,pid,lwp,args -u oracle | sort -n…

 
Read More