Infrastructure at your Service

12.2 Archives - Blog dbi services

Franck Pachot

12cR2 Application Containers and Foreign Keys

By | Database management | 2 Comments

Application Container brings a new way to share data among databases, and adds a new dimension to referential integrity. A foreign key in an application PDB can reference a row belonging to a root data link table. But then, should a delete on the root validate that there are no orpheans in the application PDBs? And what if those PDBs are closed at the time of this delete? Here is a small example.  

 
Read More
Franck Pachot

12cR2 auditing all users with a role granted

By | Database management | 2 Comments

12.1 introduced Unified Auditing where you define policies and then enable them. As with the traditional audit, you enable them for all users or for specific users. The unified auditing adds a syntax to audit all users except some listed ones. 12.2 adds a syntax to audit a group of users, defined by the role granted. This is the best way to enable a policy for a group of users, including those created later.  

 
Read More
Franck Pachot

Which privilege for CREATE PLUGGABLE DATABASE from DB LINK?

By | Database management | One Comment

When cloning a PDB from a remote CDB you need to define a database link to be used in the CREATE PLUGGABLE DATABASE … FROM …@… command. The documentation is not completely clear about the privileges required on the source for the user defined in the database link, so here are the different possibilities. Remote clone Here is what the documentation says: So you can connect to the CDB or to the PDB. In order…

 
Read More
Franck Pachot

12cR2 needs to connect with password for Cross-PDB DML

By | Database management | No Comments

In a previous post, I explained that Cross-PDB DML, executing an update/delete/insert with the CONTAINERS() clause, seems to be implemented with implicit database links. Connecting through a database link requires a password and this blog post is about an error you may encounter: ORA-01017: invalid username/password; logon denied This blog post also explains a consequence of this implementation, the big inconsistency of CONTAINERS() function because the implementation is completely different for queries (select) and for…

 
Read More
Franck Pachot

random “ORA-01017: invalid username/password” in 12cR2

By | Database management | 4 Comments

Since 12cR2 is out, we give our 12c new feature workshop with hands-on exercises on 12.1 and 12.2 releases. When I gave it last month, I had a small problem when doing demos: sometimes the connections as sysdba failed with “ORA-01017: invalid username/password”. It was at random, about one every 5 login attempts and I was sure that the password did not change. As I give another of this training next week, I tried to…

 
Read More
Franck Pachot

12cR2 Cross-container DML – insert into container()

By | Database management | No Comments

Multitenant has been introduced in 12.1.0.1 with the goal to share resources but isolate data. However, having all PDBs in the same root may be convenient to manipulate data in multiple PDBs. In the first patchset, 12.1.0.2, a way to query cross-container has been introduced for the CDB administrator to see data in other containers. In the second release, 12.2.0.1, this goes further with the introduction of Application Containers and cross-PDB DML. Currently, not all…

 
Read More
Joël Cattin

Oracle 12cR2 : Optimizer Statistics Advisor

By | Database Administration & Monitoring, Database management, Development & Performance | No Comments

The Optimizer Statistics Advisor is a new Advisor in Oracle 12.2. The goal of this Advisor is to check the way you gather the statistics on your database, and depending on what is found, it will makes some recommendations on how you can improve the statistics gathering strategy in order to provide more efficient statistics to the CBO. This Advisor is also able to generate remediation scripts to apply the statistics gathering “best practices”. The…

 
Read More
Franck Pachot

12cR2 RMAN> REPAIR

By | Database management | One Comment

Do you know the RMAN Recovery advisor? It detects the problems, and then you: RMAN> list failure; RMAN> advise failure; RMAN> repair failure; You need to have a failure detected. You can run Health Check if it was not detected automatically (see https://blog.dbi-services.com/oracle-12c-rman-list-failure-does-not-show-any-failure-even-if-there-is-one/). In 12.2 you can run the repair directly, by specifying what you want to repair.  

 
Read More