Infrastructure at your Service

Oracle 12c Archives - Blog dbi services

Franck Pachot

Dynamic Sampling vs. Extended Statistics

By | Oracle | No Comments

On datawarehouse databases, I frequently recommend increasing the level of dynamic sampling because: Queries have complex predicates with AND, OR, IN(), ranges and correlated values for which the optimizer cannot estimate the cardinality properly Queries are long anyway (compared to OLTP) and can afford more parse time to get an optimized execution plan However, there’s a drawback with this approach because sometimes the dynamic sampling estimation may give bad estimations, and supersedes the static statistics…

 
Read More
Franck Pachot

Multitenant internals: INT$ and INT$INT$ views

By | Oracle | No Comments

This month, I’ll talk – with lot of demos – about multitenant internals at DOAG conference. The multitenant dictionary architecture starts with a simple idea: system metadata and data are in CDB$ROOT and user metadata and data are in PDB. And it could have been that simple. When a session connected to a PDB needs to read some system information, the session context is switched to the CDB$ROOT container and reads from CDB$ROOT SYS tablespace…

 
Read More
Franck Pachot

Wrong result with multitenant, dba_contraints and current_schema

By | Oracle | No Comments

Multitenant architecture is not such a big change and this is why I recommend it when you start a project in 12c or if you upgrade to 12.2 – of course after thoroughly testing your application. However, there is a point where you may encounter problems on dictionary queries, because it is really a big change internally. The dictionary separation has several side effects. You should test carefully the queries you do on the dictionary…

 
Read More
Franck Pachot

Active Data Guard services in Multitenant

By | Oracle | No Comments

A database (or the CDB in multitenant) registers its name as the default service. When a standby database is on the same server, or same cluster, you have no problem because this database name is the db_unique_name which is different between the primary and the standby(s). In multitenant, in addition to that, each PDB registers its name as a service. But the PDB name is the same in the primary and the standby database. This…

 
Read More
Franck Pachot

12c dbms_stats.gather_table_stats on GTT do not commit

By | Oracle | No Comments

In my UKOUG OracleScene article on 12c online statistics and GTT I mentioned the following: A final note about those 12c changes in statistics gathering on GTT. In 11g the dbms_stats did a commit at the start. So if you did gather stats after the load, you had to set the GTT as ON COMMIT PRESERVE ROWS. Or you just vacuum what you’ve loaded. That has changed in 12c. If you now choose to do…

 
Read More
Franck Pachot

When PDB name conflicts with CDB name

By | Business Intelligence, Oracle | No Comments

Going to multitenant architecture is not a big change. The administration things (DBA, monitoring, backups) connect to the CDB and the application things connect to the PDB. Without the multitenant option, it is still recommended to go to the CDB architecture. The non-CDB is deprecated and the multitenant architecture brings interesting features. People often ask how to name the CDB and the PDB, especially when they have naming rules or policies in the company. My…

 
Read More
Franck Pachot

Bequeath connect to PDB: set container in logon trigger?

By | Database Administration & Monitoring, Oracle | No Comments

There are little changes when you go to multitenant architecture and one of them is that you must connect with a service name. You cannot connect directly to a PDB with a beaqueath (aka local) connection. This post is about a workaround you may have in mind: create a common user and set a logon trigger to ‘set container’. I do not recommend it and you should really connect with a service. Here is an…

 
Read More