Introduction
Dans cet article "Quels sont les ordres exécutés par Oracle lors d'un CREATE TABLE ? Trace 10046 et base 12c non CDB", nous avons regardé quels ordres SQL Oracle exécutait lors d'un CREATE TABLE dans une base 12c non CDB. Maintenant, nous allons voir la même chose mais pour une base CDB. Je mettrais beaucoup moins de commentaires car ces ordres sont bien plus nombreux, certaines sont assez explicites (notamment quand Oracle donne le type des opérations) alors que d'autres restent totalement obscurs.



Points d'attention
Vérifiez que votre trace ne remplisse pas votre disque dur.



Base de tests
Une base Oracle 12c avec l'architecture CDB.



Exemples

============================================================================================
Le CREATE TABLE

============================================================================================

On travaille avec une base Oracle 12c architecture CDB.
          SQL> select banner from v$version where rownum = 1;
          BANNER
          --------------------------------------------------------------------------------
          Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

          SQL> select cdb from v$database;
          CDB
          ---
          YES
        
Passons en mode trace 10046 pour identifier les opérations DML. Ne pas utiliser le user SYS sinon il y a trop d'opérations internes qui parasiteront la trace. Le niveau de la trace est 4 pour avoir les bind variables.
          CONNECT HR/HR@orcl;
          
Création d'une table : 3 colonnes, une Primary Key et donc un index.
          SQL> ALTER SESSION SET timed_statistics = TRUE;
          SQL> ALTER SESSION SET max_dump_file_size = unlimited;
          SQL> ALTER SESSION SET TRACEFILE_IDENTIFIER = 'zztest_create_table01.trc';
          SQL> ALTER SESSION SET events '10046 trace name context forever, level 4';

L'ordre SQL à tracer.
          SQL> CREATE TABLE ZZ01 (ID NUMBER primary key, NOM VARCHAR2(50), PRENOM VARCHAR2(50));

Ne pas oublier de désactiver la trace.
          SQL> ALTER SESSION SET events '10046 trace name context off';
         
Trouver le fichier de trace généré : Oracle ajoute un libellé devant le nom que j'ai saisi.
          SQL> SELECT value FROM   v$diag_info WHERE  name = 'Default Trace File';
          VALUE
          --------------------------------------------------------------------------------
          /u01/app/oracle/diag/rdbms/orcl12c/orcl12c/trace/orcl12c_ora_4616_zztest_create_table01.trc
          
          
On utilise TKPROFpour avoir un fichier de trace plus lisible. Attention, avec TKPROF, les bind variables ne sont pas reprises dans le fichier en sortie..
          Unix$ tkprof orcl12c_ora_4616_zztest_create_table01.trc orcl12c_ora_4616_zztest_create_table01.txt
          
        
============================================================================================
Les ordres SQL générés par Oracle

============================================================================================

J'enlève les infos autres que les ordres SQL proprement dit.
         
Les premiers SELECTs sur le dictionnaire de données servent à tester si l'objet à créer n'existe pas déjà. Les suivants servent à récupérer les valeurs par défaut des paramètres du CREATE TABLE puisque je n'en ai renseigné aucun.

Select sur les histogrammes?
          SQL ID: 0sbbcuruzd66f Plan Hash: 2239883476
          select /*+ rule */ bucket_cnt, row_cnt, cache_cnt, null_cnt, timestamp#,
            sample_size, minimum, maximum, distcnt, lowval, hival, density, col#,
            spare1, spare2, avgcln, minimum_enc, maximum_enc
          from
           hist_head$ where obj#=:1 and intcol#=:2
          
          
          SQL ID: 2sxqgx5hx76qr Plan Hash: 3312420081
          select /*+ rule */ bucket, endpoint, col#, epvalue, epvalue_raw,
            ep_repeat_count, endpoint_enc
          from
           histgrm$ where obj#=:1 and intcol#=:2 and row#=:3 order by bucket
          

Select sur les users.         
          SQL ID: 06gfrprr7w0r2 Plan Hash: 2709293936
          select name,password,datats#,tempts#,type#,defrole,resource$, ptime,
            decode(defschclass,NULL,'DEFAULT_CONSUMER_GROUP',defschclass), spare1,
            spare4,ext_username,spare2,nvl(spare3,16382),spare9,spare10
          from
           user$ where user#=:1
          
          
          SQL ID: 50vxqdkj4zu1w Plan Hash: 1457651150
          select user#,password,datats#,tempts#,type#,defrole,resource$,ptime,
            decode(defschclass,NULL,'DEFAULT_CONSUMER_GROUP',defschclass),spare1,spare4,
            ext_username,spare2,nvl(spare3,16382),spare9,spare10
          from
           user$ where name=:1
          

Select sur les tablespaces.         
          SQL ID: 57guu81bd4bc5 Plan Hash: 2397009925
          select name,online$,contents$,undofile#,undoblock#,blocksize,dflmaxext,
            dflinit,dflincr,dflextpct,dflminext, dflminlen, owner#,scnwrp,scnbas,
            NVL(pitrscnwrp, 0), NVL(pitrscnbas, 0), dflogging, bitmapped, inc#, flags,
            plugged, NVL(spare1,0), NVL(spare2,0), affstrength
          from
           ts$ where ts#=:1
          
          
L'ordre SQL de création de la table que j'ai saisi mais à ce niveau rien n'est encore fait dans le dictionnaire de données (les INSERT...).
          SQL ID: 2f1z0vx6h0gnf Plan Hash: 0
          CREATE TABLE ZZ01 (ID NUMBER primary key, NOM VARCHAR2(50), PRENOM
            VARCHAR2(50))
          

Select sur les objets de la base.         
          SQL ID: acmvv4fhdc9zh Plan Hash: 813480514
          select obj#,type#,ctime,mtime,stime, status, dataobj#, flags, oid$, spare1,
            spare2, spare3, signature, spare7, spare8, spare9, nvl(dflcollid, 16382),
            creappid, creverid, modappid, modverid, crepatchid, modpatchid
          from
           obj$ where owner#=:1 and name=:2 and namespace=:3 and remoteowner is null
            and linkname is null and subname is null
          

Select sur les tables de la base.          
          SQL ID: 9zbjgq87hy6uv Plan Hash: 2035254952
          select t.ts#,t.file#,t.block#,nvl(t.bobj#,0),nvl(t.tab#,0),t.intcols,
            nvl(t.clucols,0),t.flags,t.pctfree$,t.pctused$,t.initrans,t.maxtrans,
            t.rowcnt,t.blkcnt,t.empcnt,t.avgspc,t.chncnt,t.avgrln,t.analyzetime,
            t.samplesize,t.cols,t.property,nvl(t.degree,1),nvl(t.instances,1),
            t.avgspc_flb,t.flbcnt,t.kernelcols,nvl(t.trigflag, 0),nvl(t.spare1,0),
            nvl(t.spare2,0),t.spare4,t.spare6,ts.cachedblk,ts.cachehit,ts.logicalread,
            ts.im_imcu_count,ts.im_block_count,ts.im_sys_incarnation,
            ts.im_stat_update_time,ts.scanrate,nvl(t.acdrflags, 0),nvl(t.acdrtsobj#, 0),
            t.acdrdefaulttime, nvl(t.acdrrowtsintcol#, 0)
          from
           tab$ t,tab_stats$ ts where t.obj#= :1 and t.obj# = ts.obj# (+)
          
           
Autre select sur les objets de la base.         
          SQL ID: 87gaftwrm2h68 Plan Hash: 1072382624
          select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname
          from
           obj$ o where o.obj#=:1
          

Select sur les index de la base.                    
          SQL ID: 121ffmrc95v7g Plan Hash: 2542797530
          select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.type#,i.flags,i.property,
            i.pctfree$,i.initrans,i.maxtrans,i.blevel,i.leafcnt,i.distkey,i.lblkkey,
            i.dblkkey,i.clufac,i.cols,i.analyzetime,i.samplesize,i.dataobj#,
            nvl(i.degree,1),nvl(i.instances,1),i.rowcnt,mod(i.pctthres$,256),
            i.indmethod#,i.trunccnt,nvl(c.unicols,0),nvl(c.deferrable#+c.valid#,0),
            nvl(i.spare1,i.intcols),i.spare4,i.spare2,i.spare6,decode(i.pctthres$,null,
            null,mod(trunc(i.pctthres$/256),256)),nvl(i.evaledition#,1),
            nvl(i.unusablebefore#,0),nvl(i.unusablebeginning#,0), ist.cachedblk,
            ist.cachehit,ist.logicalread
          from
           ind$ i, ind_stats$ ist, (select enabled, min(intcols) unicols,
            min(to_number(bitand(defer,1))) deferrable#,min(to_number(bitand(defer,4)))
            valid# from cdef$ where obj#=:1 and enabled > 1 group by enabled) c where
            i.obj#=c.enabled(+) and i.obj# = ist.obj#(+) and i.bo#=:1 order by i.obj#
          
          
Select sur les colonnes de la base.
          SQL ID: 9t4vxdppkv534 Plan Hash: 3765558045
          select name,intcol#,segcol#,type#,length,nvl(precision#,0),decode(type#,2,
            nvl(scale,-127/*MAXSB1MINAL*/),178,scale,179,scale,180,scale,181,scale,182,
            scale,183,scale,231,scale,0),null$,fixedstorage,nvl(deflength,0),default$,
            rowid,col#,property, nvl(charsetid,0),nvl(charsetform,0),spare1,spare2,
            nvl(spare3,0), nvl(evaledition#,1),nvl(unusablebefore#,0),
            nvl(unusablebeginning#,0), case when (type# in (1,8,9,96,112)) then
            nvl(collid, 16382) else 0 end case, nvl(collintcol#,0), nvl(acdrrescol#, 0),
             nvl(spare7, 0)
          from
           col$ where obj#=:1 order by intcol#
          

Select sur les segments de la base.          
          SQL ID: 9tgj4g8y4rwy8 Plan Hash: 3755742892
          select type#,blocks,extents,minexts,maxexts,extsize,extpct,user#,iniexts,
            NVL(lists,65535),NVL(groups,65535),cachehint,hwmincr, NVL(spare1,0),
            NVL(scanhint,0),NVL(bitmapranges,0)
          from
           seg$ where ts#=:1 and file#=:2 and block#=:3
          

Select sur les audit de la base.          
          SQL ID: 04kug40zbu4dm Plan Hash: 4006480256
          select policy#, action#
          from
           aud_object_opt$ where object# = :1 and type = 2
          

Select sur les ??? de la base.          
          SQL ID: 5n1fs4m2n2y0r Plan Hash: 452367486
          select pos#,intcol#,col#,spare1,bo#,spare2,spare3
          from
           icol$ where obj#=:1
                   

Select sur les triggers liés à un user?
          SQL ID: bbah6s85fqjv4 Plan Hash: 2510613180
          select  decode(u.type#, 2, u.ext_username, u.name), o.name, trigger$.sys_evts,
             trigger$.type#  
          from
             obj$ o, user$ u, trigger$  where o.type# = 12 and
            ((bitand(trigger$.property, 8) = 8)  or (bitand(trigger$.property,  1048576)
             = 1048576)) and   (bitand(trigger$.property, 16) != 16)  and   
            trigger$.obj# = o.obj# and o.owner# = u.user# order by o.obj#
          

Select sur un trigger système?
          SQL ID: 5hrvvu1r771m5 Plan Hash: 415205717
          SELECT VALUE$
          FROM
           SYS.PROPS$ WHERE NAME = 'OGG_TRIGGER_OPTIMIZATION'
          

Select sur les dépendances entre objets de la base.          
          SQL ID: 3un99a0zwp4vd Plan Hash: 1475428744
          select owner#,name,namespace,remoteowner,linkname,p_timestamp,p_obj#,
            nvl(property,0),subname,type#,flags,d_attrs
          from
           dependency$ d, obj$ o where d_obj#=:1 and p_obj#=obj#(+) order by order#
          

Select sur ??? de la base.          
          SQL ID: 8swypbbr0m372 Plan Hash: 570326988
          select order#,columns,types
          from
           access$ where d_obj#=:1
          

A quoi correspondent tous ces SELECTs sur la table des triggers?
          SQL ID: 3k0c6241uw582 Plan Hash: 1964643588
          select actionsize
          from
           trigger$ where obj# = :1
          
          
          SQL ID: 07pcqtmt58zv9 Plan Hash: 1964643588
          select action#
          from
           trigger$ where obj# = :1
          
          
          SQL ID: 7akvnu9t168d3 Plan Hash: 1964643588
          select baseobject,type#,update$,insert$,delete$,refnewname,refoldname,
            whenclause,definition,enabled,property,sys_evts,nttrigcol,nttrigatt,
            refprtname,rowid,actionlineno,trignameline,trignamecol, trignamecolofs,
            actioncolno
          from
           trigger$ where obj# =:1
          

          SQL ID: 5wxyshspv54v4 Plan Hash: 1996182059
          select tc.type#,tc.intcol#,tc.position#,c.type#, c.length,c.scale,
            c.precision#,c.charsetid,c.charsetform, decode(bitand(c.property,8388608),
            8388608, c.spare3, 0)
          from
           triggercol$ tc,col$ c, trigger$ tr where tc.obj#=:1 and tc.intcol#=c.intcol#
            and tr.obj# = tc.obj# and (bitand(tr.property,32) != 32 or bitand(tc.type#,
            20) = 20) and (   c.obj#=:2 and (bitand(tc.type#, 1024) = :3 or tc.type# =
            0)      or c.obj#=:4 and bitand(tc.type#, 1024) = :5      or c.obj#=:6 and
            tc.type# = 0 and tc.position# = 0) union select type#,intcol#,position#,69,
            0,0,0,0,0,0 from triggercol$ where obj#=:7 and intcol#=1001 union select
            tc.type#,tc.intcol#,tc.position#,121,0,0,0,0,0,0 from triggercol$ tc,
            trigger$ tr where tr.obj# = tc.obj# and bitand(tr.property,32) = 32 and
            tc.obj# = :8 and bitand(tc.type#,20) != 20
          

Select sur les objets des users de la base.          
          SQL ID: 4zzxr8rvht74z Plan Hash: 3368685730
          select case when (bitand(u.spare1, 16) = 0) then         0        when
            (u.type# = 2) then         (u.spare2)        else         1        end
          from
           obj$ o, user$ u where o.obj# = :1 and o.owner# = u.user#
          

Select sur ??? de la base.          
          SQL ID: cn6hhn36a4rrs Plan Hash: 3845132125
          select con#,obj#,rcon#,enabled,nvl(defer,0),spare2,spare3,refact
          from
           cdef$ where robj#=:1
          
          
          SQL ID: gx4mv66pvj3xz Plan Hash: 2570921597
          select con#,type#,condlength,intcols,robj#,rcon#,match#,refact,nvl(enabled,0),
            rowid,cols,nvl(defer,0),mtime,nvl(spare1,0),spare2,spare3
          from
           cdef$ where obj#=:1
          

Select sur les ??? de la base.
          
          SQL ID: 53saa2zkr6wc3 Plan Hash: 3038981986
          select intcol#,nvl(pos#,0),col#,nvl(spare1,0)
          from
           ccol$ where con#=:1
          

Select sur les polices d'audit de la base?
          SQL ID: gngtvs38t0060 Plan Hash: 3679945446
          SELECT /*+ CONNECT_BY_FILTERING */ s.privilege#
          FROM
           sys.sysauth$ s        CONNECT BY s.grantee# = PRIOR s.privilege#             
                                AND (s.privilege# > 0 OR s.privilege# = -352)           
                               START WITH (s.privilege# > 0 OR s.privilege# = -352) AND
            s.grantee# IN     (SELECT c1.privilege# FROM sys.codeauth$ c1 WHERE c1.obj#
            = :1)            UNION                                                      
                            SELECT c2.privilege# FROM sys.codeauth$ c2 WHERE c2.obj# =
            :2              ORDER BY 1 ASC
          

Select sur ??? de la base.          
          SQL ID: fh5ufah919kun Plan Hash: 1697022209
          select /*+ index(idl_sb4$ i_idl_sb41) */ piece#,length,piece
          from
           idl_sb4$ where obj#=:1 and part=:2 and version=:3 order by piece#
          

          SQL ID: 03guhbfpak0w7 Plan Hash: 3246118364
          select /*+ index(idl_ub1$ i_idl_ub11) */ piece#,length,piece
          from
           idl_ub1$ where obj#=:1 and part=:2 and version=:3 order by piece#
          
          
          SQL ID: 9tt2m0mpc2qqp Plan Hash: 1319326155
          select /*+ index(idl_char$ i_idl_char1) */ piece#,length,piece
          from
           idl_char$ where obj#=:1 and part=:2 and version=:3 order by piece#
          
          
          SQL ID: a3jpjzh7mtwwp Plan Hash: 2317816222
          select /*+ index(idl_ub2$ i_idl_ub21) */ piece#,length,piece
          from
           idl_ub2$ where obj#=:1 and part=:2 and version=:3 order by piece#
          

Select sur les polices d'audit des objets de la base?
          SQL ID: 8nwsztmf3wt4w Plan Hash: 3290949889
          select privilege#,nvl(col#,0),max(mod(nvl(option$,0),2)),
            max(bitand(nvl(option$,0), 8) /8), max(bitand(nvl(option$,0), 16) /16),
            max(bitand(nvl(option$,0), 64) /64), max(bitand(nvl(option$,0), 128) /128)
          from
           objauth$ where obj#=:1 and grantee#=:2 group by privilege#,nvl(col#,0)
          

          
Tiens, c'est une nouveauté de la 12c, architecture CDB. Plusieurs tests en PL/SQL ont lieu maintenant.
Je vous laisse lire, c'est plus compréhensible que les SELECTs précédents.
          declare
           error boolean;
            st_syn_detected EXCEPTION;
             PRAGMA EXCEPTION_INIT(st_syn_detected, -995);
           BEGIN
             if((sys.dbms_standard.dictionary_obj_type!='SYNONYM')or(sys.dbms_standard.dictionary_obj_owner!='PUBLIC'))
             then
               return;
             end if;
             error :=
                CASE sys.dbms_standard.dictionary_obj_name
                   WHEN 'ST_GEOMETRY' THEN TRUE
                   WHEN 'ST_SURFACE' THEN TRUE
                   WHEN 'ST_POLYGON' THEN TRUE
                   WHEN 'ST_POINT' THEN TRUE
                   WHEN 'ST_MULTISURFACE' THEN TRUE
                   WHEN 'ST_MULTIPOINT' THEN TRUE
                   WHEN 'ST_MULTILINESTRING' THEN TRUE
                   WHEN 'ST_MULTICURVE' THEN TRUE
                   WHEN 'ST_LINESTRING' THEN TRUE
                   WHEN 'ST_GEOMCOLLECTION' THEN TRUE
                   WHEN 'ST_CURVE' THEN TRUE
                   WHEN 'ST_CURVEPOLYGON' THEN TRUE
                   WHEN 'ST_COMPOUNDCURVE' THEN TRUE
                   WHEN 'ST_CIRCULARSTRING' THEN TRUE
                   WHEN 'ST_INTERSECTS' THEN TRUE
                   WHEN 'ST_RELATE' THEN TRUE
                   WHEN 'ST_TOUCH' THEN TRUE
                   WHEN 'ST_CONTAINS' THEN TRUE
                   WHEN 'ST_COVERS' THEN TRUE
                   WHEN 'ST_COVEREDBY' THEN TRUE
                   WHEN 'ST_INSIDE' THEN TRUE
                   WHEN 'ST_OVERLAP' THEN TRUE
                   WHEN 'ST_OVERLAPS' THEN TRUE
                   WHEN 'ST_EQUAL' THEN TRUE
                   WHEN 'ST_OVERLAPBDYDISJOINT' THEN TRUE
                   WHEN 'ST_OVERLAPBDYINTERSECT' THEN TRUE
                   WHEN 'ST_GEOMETRY_ARRAY' THEN TRUE
                   WHEN 'ST_POINT_ARRAY' THEN TRUE
                   WHEN 'ST_CURVE_ARRAY' THEN TRUE
                   WHEN 'ST_SURFACE_ARRAY' THEN TRUE
                   WHEN 'ST_LINESTRING_ARRAY' THEN TRUE
                   WHEN 'ST_POLYGON_ARRAY' THEN TRUE
                   ELSE FALSE
                END;
          
             if(error) then
               raise st_syn_detected;
          
             end if;
           END;
          
          
          declare
           TYPE attrs_cur IS REF CURSOR;
           m_cur       attrs_cur;
           m_event varchar2(512);
           m_user  varchar2(512);
           m_owner varchar2(512);
           m_type  varchar2(512);
           m_name  varchar2(5120);
           m_column varchar2(5120);
           m_cnt   NUMBER;
           m_adt   NUMBER;
           m_stmt  varchar2(4000);
           m_stmt1 varchar2(4000);
           m_var   varchar2(512);
           m_o_stmt VARCHAR2(5120);
          PRAGMA AUTONOMOUS_TRANSACTION;
          begin
          
          
           m_stmt := 'select mdsys.GetMdsysEvent() from dual';
           execute immediate m_stmt into m_cnt;
           if ( m_cnt != 0 ) then
             return;
           end if;
          
           m_stmt:='select sys.dbms_standard.dictionary_obj_type from dual';
           execute immediate m_stmt into m_type;
           if(not (m_type='TABLE' or m_type='TRIGGER' or m_type='USER' or m_type='TABLESPACE'))
           then
             return;
           end if;
          
           m_stmt:='select sys.dbms_standard.dictionary_obj_owner from dual';
           execute immediate m_stmt into m_owner;
          
           m_stmt:='select sys.dbms_standard.dictionary_obj_name from dual';
           execute immediate m_stmt into m_name;
          
           m_stmt:='select sys.dbms_standard.sysevent from dual';
           execute immediate m_stmt into m_event;
          
          
           if ( m_type = 'TABLE' and m_event != 'DROP' and m_event != 'RENAME' ) then
             m_stmt := 'select mdsys.TblContainsAdt(:own, :tab) from dual';
             begin
               execute immediate m_stmt into m_adt using m_owner, m_name;
               exception when others then
                 m_adt := 1;
             end;
             if ( m_adt = 0 ) then
               return;
             end if;
           end if;
          
           m_stmt:='select SYS_CONTEXT(''USERENV'',''SESSION_USER'') from dual';
           execute immediate m_stmt into m_user;
          
          
Gestion des ALTER TABLEs pour les users différents de MDSYS et SYS?
            if (m_owner!='MDSYS' and m_owner!='SYS' and m_type='TABLE' and m_event='ALTER')
            then
              m_stmt:='select column_name from dba_tab_columns where owner=:1 and table_name=:2';
              begin
                open m_cur for m_stmt using m_owner,m_name;
                loop
                  fetch m_cur into m_column;
                  exit when m_cur%NOTFOUND;
                  m_stmt:='select sdo_geor_def.isDropColumn(:1) from dual';
                  execute immediate m_stmt into m_stmt1 using m_column;
                  if (trim(m_stmt1)='TRUE')
                  then
                    m_stmt:='begin sdo_geor_def.doAlterDropColumn(:1,:2,:3); end;';
                    execute immediate m_stmt using m_owner,m_name,m_column;
                  end if;
                end loop;
                close m_cur;
          
                EXCEPTION WHEN OTHERS THEN
                  IF m_cur%ISOPEN THEN
                    close m_cur;
                  END IF;
                RAISE;
              end;
            end if;
          
          
Gestion du DROP USER et du DROP TABLESPACE?
A quoi correspond cette table sdo_geor_ddl__table$$?
           if ((m_event='DROP' and m_type='USER') or (m_event='DROP' and m_type='TABLESPACE'))
           then
             m_stmt:='insert into sdo_geor_ddl__table$$ values (1)';
             EXECUTE IMMEDIATE m_stmt;
             commit;
           end if;
          
          Gestion du DROP TABLE?
           if (m_event='DROP' and m_type='TABLE')
           then
             if((m_user!='SYS' and m_user!='SYSTEM' and m_user!='MDSYS'and m_owner!='MDSYS' and m_owner!='SYS'))
             then
          
               m_stmt:='select /*+ FIRST_ROWS(1) */ count(*) from sdo_geor_sysdata_table where sdo_owner=:1 and RDT_TABLE_NAME=:2 and ROWNUM < 2';
               EXECUTE IMMEDIATE m_stmt into m_cnt using m_owner,m_name;
               if(m_cnt!=0)
               then
          
                 m_stmt:='select /*+ FIRST_ROWS(1) */ count(*) from sdo_geor_ddl__table$$ where ROWNUM < 2';
                 EXECUTE IMMEDIATE m_stmt into m_cnt;
                 if(m_cnt=0)
                 then
                    m_stmt:='call mderr.raise_md_error(''MD'', ''SDO'', -13391, ''The referenced raster data table(RDT) cannot be dropped.'')';
                    execute immediate m_stmt;
                 end if;
               end if;
             end if;
          
             m_stmt:='insert into sdo_geor_ddl__table$$ values (2)';
             EXECUTE IMMEDIATE m_stmt;
             commit;
           end if;
          
           if(m_user='SYS' or m_user='SYSTEM' or m_user='MDSYS'
             or m_owner='MDSYS' or m_owner='SYS')
           then
             return;
           end if;
          
          
Gestion du RENAME TABLE.
           if (m_event='RENAME' and m_type='TABLE')
           then
          
             m_stmt:='select /*+ FIRST_ROWS(1) */ count(*) from sdo_geor_sysdata_table where sdo_owner=:1 and RDT_TABLE_NAME=:2 and ROWNUM < 2';
             EXECUTE IMMEDIATE m_stmt into m_cnt using m_owner,m_name;
             if(m_cnt!=0)
             then
          
               m_stmt:='select /*+ FIRST_ROWS(1) */ count(*) from sdo_geor_ddl__table$$ where ROWNUM < 2';
               EXECUTE IMMEDIATE m_stmt into m_cnt;
               if(m_cnt=0)
               then
                  m_stmt:='call mderr.raise_md_error(''MD'', ''SDO'', -13391, ''The referenced raster data table(RDT) cannot be renamed directly.'')';
                  execute immediate m_stmt;
               end if;
             end if;
          
           end if;
          
           
Gestion du DROP TRIGGER.
           if (m_type='TRIGGER' and m_event='DROP')
           then
             m_stmt:='select REGEXP_SUBSTR(:1,''GRDMLTR_.+'',1,1,''i'') from dual';
             EXECUTE IMMEDIATE m_stmt into m_var using m_name;
             if(m_var is null)
             then
               return;
             end if;
          
          
             m_stmt:='select /*+ FIRST_ROWS(1) */ count(*) from sdo_geor_ddl__table$$ where ROWNUM < 2';
             EXECUTE IMMEDIATE m_stmt into m_cnt;
             if(m_cnt=0)
             then
               m_stmt:='call mderr.raise_md_error(''MD'', ''SDO'', -13391, ''GeoRaster DML triggers cannot be dropped.'')';
               execute immediate m_stmt;
             end if;
           end if;
          
           
Gestion du ALTER TRIGGER.
           if (m_type='TRIGGER' and m_event='ALTER')
           then
             m_stmt:='select sdo_geor_def.getSqlText from dual';
             execute immediate m_stmt into m_o_stmt;
             m_o_stmt:=nls_upper(trim(m_o_stmt));
             if(instr(m_o_stmt,' COMPILE ')>0 or instr(m_o_stmt,' ENABLE ')>0
               or substr(m_o_stmt,length(m_o_stmt)-8,8)=' COMPILE' or substr(m_o_stmt,length(m_o_stmt)-7,7)=' ENABLE' )
             then
               return;
             end if;
             m_stmt:='select REGEXP_SUBSTR(:1,''GRDMLTR_.+'',1,1,''i'') from dual';
             EXECUTE IMMEDIATE m_stmt into m_var using m_name;
             if(m_var is null)
             then
               return;
             end if;
          
          
             m_stmt:='select /*+ FIRST_ROWS(1) */ count(*) from sdo_geor_ddl__table$$ where ROWNUM < 2';
             EXECUTE IMMEDIATE m_stmt into m_cnt;
             if(m_cnt=0)
             then
               m_stmt:='call mderr.raise_md_error(''MD'', ''SDO'', -13391, ''GeoRaster DML triggers cannot be altered.'')';
               execute immediate m_stmt;
             end if;
           end if;
          
           
Gestion du CREATE TRIGGER.
           if (m_type='TRIGGER' and m_event='CREATE')
           then
             m_stmt:='select REGEXP_SUBSTR(:1,''GRDMLTR_.+'',1,1,''i'') from dual';
             EXECUTE IMMEDIATE m_stmt into m_var using m_name;
             if(m_var is null)
             then
               return;
             end if;
          
          
             m_stmt:='select /*+ FIRST_ROWS(1) */ count(*) from sdo_geor_ddl__table$$ where ROWNUM < 2';
             EXECUTE IMMEDIATE m_stmt into m_cnt;
             if(m_cnt=0)
             then
               m_stmt:='call mderr.raise_md_error(''MD'', ''SDO'', -13391, ''GeoRaster reserved names cannot be used to create regular triggers.'')';
               execute immediate m_stmt;
             end if;
           end if;
          
           Exception
             when others then
               if(sqlcode=-13391)
               then
                 m_stmt:=sqlerrm;
                 m_stmt:=substr(m_stmt,11);
                 m_stmt:='call mderr.raise_md_error(''MD'', ''SDO'', -13391,'''||m_stmt||''')';
                 execute immediate m_stmt;
               end if;
          end;

          
Allez, on reprend les ordres SELECT après le gros bloc PL/SQL.
Select sur les polices d'audit des objets de la base?
          SQL ID: 6h3cwmunz5z8q Plan Hash: 2968095032
          select col#, grantee#, privilege#,max(mod(nvl(option$,0),2)),
            max(bitand(nvl(option$,0), 8) /8), max(bitand(nvl(option$,0), 16) /16),
            max(bitand(nvl(option$,0),64) /64), max(bitand(nvl(option$,0), 128) /128)
          from
           objauth$ where obj#=:1 and col# is not null group by privilege#, col#,
            grantee# order by col#, grantee#
          
          
          SQL ID: a4n4ayr88dbhy Plan Hash: 2968095032
          select grantee#,privilege#,nvl(col#,0),max(mod(nvl(option$,0),2)),
            max(bitand(nvl(option$,0), 8) /8), max(bitand(nvl(option$,0), 16) /16),
            max(bitand(nvl(option$,0),64) /64), max(bitand(nvl(option$,0), 128) /128)
          from
           objauth$ where obj#=:1 group by grantee#,privilege#,nvl(col#,0) order by
            grantee#
          

Select sur ??? de la base.                  
          SQL ID: d7zvk9bn8dyr6 Plan Hash: 3646447030
          select /* QOSD */ /*+ index(do) */ dir_cnt
          from
           opt_directive_own$ do where dir_own# = :1
          
          
Récupération du type d'ordre DDL et des caractéristiques de l'objet concerné?
          SQL ID: dgqztvysuhmgy Plan Hash: 1388734953
          select mdsys.GetMdsysEvent()
          from
           dual

           
          SQL ID: bcv9qynmu1nv9 Plan Hash: 1388734953
          select sys.dbms_standard.dictionary_obj_type
          from
           dual
          
          
          SQL ID: ar9nmtmd28460 Plan Hash: 1388734953
          select sys.dbms_standard.dictionary_obj_owner
          from
           dual
          
          
          SQL ID: 4a3ccstvk0ssw Plan Hash: 1388734953
          select sys.dbms_standard.dictionary_obj_name
          from
           dual
          
          
          SQL ID: 12kw3xcxv1qpg Plan Hash: 1388734953
          select sys.dbms_standard.sysevent
          from
           dual
          
          
          SQL ID: 9vmhppbbkfjtg Plan Hash: 1388734953
          select mdsys.TblContainsAdt(:own, :tab)
          from
           dual
          
          
          SQL ID: d7y4tdacc7f3j Plan Hash: 1388734953
          select SYS_CONTEXT('USERENV','SESSION_USER')
          from
           dual
          

Select les polices d'autorisation de la base?
          SQL ID: 9ycc42xuxaj6a Plan Hash: 1218126112
          select distinct(-privilege#),mod(nvl(option$,0), 2), bitand(nvl(option$,0), 8)
             /8, bitand(nvl(option$,0), 16) /16, bitand(nvl(option$,0), 64) /64,
            bitand(nvl(option$,0), 128) /128
          from
           sysauth$ where grantee#=:1 and privilege#<0
          

Select sur les erreurs de l'ordre SQL précédent?
          SQL ID: 77mtwmnd4c4pk Plan Hash: 1589386835
          select obj#
          from
           objerror$
          

Select sur les synonymes de la base?
          SQL ID: ac805sb6btmg3 Plan Hash: 663321076
          select obj#, owner, node
          from
           syn$ where name=:1 and owner=:2
          
          
Création de l'objet proprement dit.
          SQL ID: arxwfzs160xzf Plan Hash: 0
          insert into obj$(owner#,name,namespace,obj#,type#,ctime,mtime,stime,status,
            remoteowner,linkname,subname,dataobj#,flags,oid$,spare1,spare2,spare3,
            signature, spare7, spare8, spare9, dflcollid, creappid, creverid, modappid,
            modverid, crepatchid, modpatchid)
          values
          (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18, :19,:20,:21,
            :22,decode(:23,0,null,:23),:24,:25,:26,:27,:28,:29)
          
          
La base est en mode DEFERRED SEGMENT donc pas de création de segment lors du CREATE TABLE.  
          SQL ID: 50kvjc2sgknx6 Plan Hash: 0
          insert into deferred_stg$ (obj#, pctfree_stg, pctused_stg, size_stg,
            initial_stg, next_stg, minext_stg, maxext_stg, maxsiz_stg, lobret_stg,
            mintim_stg, pctinc_stg, initra_stg, maxtra_stg, optimal_stg, maxins_stg,
            frlins_stg, flags_stg, bfp_stg, enc_stg, cmpflag_stg, cmplvl_stg,
            imcflag_stg, ccflag_stg, flags2_stg)
          values
           (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,        :16,:17,:18,:19,
            :20,:21,:22,:23,:24,:25)
          

Select sur les tables de la base.                  
          SQL ID: gd28w82ct6rva Plan Hash: 2970138452
          select audit$
          from
           tab$ where obj# = :1
          

Gestion des contraintes d'intégrité liés à la création de la table?
          SQL ID: 7ub921xztd5pt Plan Hash: 2367994939
          select con#,spare1
          from
           con$ where owner#=:1 and name=:2
          
          
          SQL ID: bajr90ryjd2w8 Plan Hash: 2574219287
          update con$ set con#=:3,spare1=:4
          where
           owner#=:1 and name=:2
          
          
          SQL ID: 8nhg2pdrzs3ww Plan Hash: 0
          insert into con$(owner#,name,con#,spare1)
          values
          (:1,:2,:3,:4)
          

Select sur les segments déférrés?         
          SQL ID: 0yn07bvqs30qj Plan Hash: 866645418
          select pctfree_stg, pctused_stg, size_stg,initial_stg, next_stg, minext_stg,
            maxext_stg, maxsiz_stg, lobret_stg,mintim_stg, pctinc_stg, initra_stg,
            maxtra_stg, optimal_stg, maxins_stg,frlins_stg, flags_stg, bfp_stg, enc_stg,
             cmpflag_stg, cmplvl_stg,imcflag_stg, ccflag_stg, flags2_stg
          from
           deferred_stg$  where obj# =:1
          
          
Création de l'index sur la PK.
          SQL ID: 9yfq57pk77yxg Plan Hash: 50052196
          CREATE UNIQUE INDEX "HR"."SYS_C0013011" on "HR"."ZZ01"("ID") NOPARALLEL
          
       
          SQL ID: 35hatv0pj8hw7 Plan Hash: 3028021260
          select  decode(u.type#, 2, u.ext_username, u.name), o.name, trigger$.sys_evts,
             trigger$.type#  
          from
           obj$ o, user$ u, trigger$  where o.type# = 12 and bitand(trigger$.property,
            16) = 16   and trigger$.baseobject = :1 and trigger$.obj# = o.obj#   and
            o.owner# = u.user# order by o.obj#
          
          
          SQL ID: 4cv3nc10n5rw0 Plan Hash: 4291532097
          select p.valchar
          from
           sys.optstat_user_prefs$ p, sys.obj$ o, sys.user$ u where p.obj#=o.obj#   and
            u.user#=o.owner#   and u.name=:1   and o.name=:2   and p.pname=:3
          
          
          SQL ID: c8h20n1d0k95m Plan Hash: 1097271556
          select /*+ no_parallel */ spare4
          from
           sys.optstat_hist_control$ where sname=:1
          
          
UPDATE de l'objet créé?
          SQL ID: c3utnxsnrx8tk Plan Hash: 2683643009
          update obj$ set obj#=:4, type#=:5,ctime=:6,mtime=:7,stime=:8,status=:9,
            dataobj#=:10,flags=:11,oid$=:12,spare1=:13,spare2=:14,spare3=:15,signature=
            :16,spare7=:17,spare8=:18,spare9=:19, dflcollid=decode(:20,0,null,:20),
            creappid=:21,creverid=:22, modappid=:23,modverid=:24,crepatchid=:25,
            modpatchid=:26
          where
           owner#=:1 and name=:2 and namespace=:3 and remoteowner is null and linkname
            is null and subname is null
          
          
Gestion des partitions?  
          SQL ID: 35ra2cdwvqg1w Plan Hash: 3362549386
          select parttype, partcnt, partkeycols, flags, defts#, defpctfree, defpctused,
            definitrans, defmaxtrans, deftiniexts, defextsize, defminexts, defmaxexts,
            defextpct, deflists, defgroups, deflogging, spare1, mod(spare2, 256)
            subparttype, mod(trunc(spare2/256), 256) subpartkeycols,
            mod(trunc(spare2/65536), 65536) defsubpartcnt, mod(trunc(spare2/4294967296),
             256) defhscflags, mod(trunc(spare2/1099511627776), 4096) defimcflags,
            mod(trunc(spare2/4503599627370496), 8) defimcpl, mod(spare3, 256)
            interval_dty, rowid, defmaxsize, mod(trunc(spare3/256), 256)
            subptn_interval_dty, mod(trunc(spare3/65536), 256) defccflags,
            mod(trunc(spare3/16777216), 256) defimcflags2, mod(trunc(spare3/4294967296),
             256) defhscflags2
          from
           partobj$ where obj# = :1
          
          
          
Encore du PL/SQL!
          declare
           m_event   varchar2(512);
           m_owner   varchar2(512);
           m_type    varchar2(512);
           m_name    varchar2(5120);
           m_adt     NUMBER;
           m_cnt     NUMBER;
           m_stmt    varchar2(4000);
           m_ret     varchar2(3000);
           m_ret1     varchar2(512);
          begin
          
          
Récupération du type de l'ordre DDL et du type de l'objet impacté.
           m_stmt := 'select mdsys.GetMdsysEvent() from dual';
           execute immediate m_stmt into m_cnt;
           if ( m_cnt != 0 ) then
             return;
           end if;
          
           m_stmt:='select sys.dbms_standard.dictionary_obj_type from dual';
           execute immediate m_stmt into m_type;
           if(not (m_type='TABLE' or m_type='TRIGGER' or m_type='USER' or m_type='TABLESPACE'))
           then
             return;
           end if;
          
           m_stmt:='select sys.dbms_standard.dictionary_obj_owner from dual';
           execute immediate m_stmt into m_owner;
          
           m_stmt:='select sys.dbms_standard.dictionary_obj_name from dual';
           execute immediate m_stmt into m_name;
          
           m_stmt:='select sys.dbms_standard.sysevent from dual';
           execute immediate m_stmt into m_event;
          
          
           if ( m_type = 'TABLE' and m_event != 'DROP' and m_event != 'RENAME' ) then
             m_stmt := 'select mdsys.TblContainsAdt(:own, :tab) from dual';
             begin
               execute immediate m_stmt into m_adt using m_owner, m_name;
               exception when others then
                 m_adt := 1;
             end;
             if ( m_adt = 0 ) then
               return;
             end if;
           end if;
          
           if((instr(nls_upper(m_name),'MDRT_')>0) and m_event='DROP')
           then
             return;
           end if;
          
          
           if (m_owner!='MDSYS' and m_owner!='SYS' and m_type='TABLE' and m_event='CREATE')
           then
             m_stmt:='select sdo_geor_def.listAllGeoRasterFieldsStr(:1,:2) from dual';
             execute immediate m_stmt  into m_ret  using m_owner,m_name;
             m_ret:=trim(m_ret);
             while (length(m_ret)!=0) loop
               if (instr(m_ret,' $$__## ')!=0)
               then
                 m_ret1:=trim(substr(m_ret,1,instr(m_ret,' $$__## ')-1));
                 m_ret:=trim(substr(m_ret,instr(m_ret,' $$__## ')+8));
               else
                 m_ret1:=trim(m_ret);
                 m_ret:='';
               end if;
               m_stmt:='begin SDO_GEOR_UTL.createDMLTrigger(:1,:2); end;';
              execute immediate m_stmt using m_owner||'.'||m_name,m_ret1;
             end loop;
             return;
           end if;
          
          
            if (m_name!='MDSYS' and m_type='USER' and m_event='DROP')
            then
               m_stmt:='call sdo_geor_def.doDropUserAndTable()';
               execute immediate m_stmt;
            end if;
          
            if (m_owner!='MDSYS' and m_owner!='SYS' and m_type='TABLE' and m_event='DROP')
            then
               m_stmt:='call sdo_geor_def.doDropUserAndTable()';
               execute immediate m_stmt;
            end if;
          
            if (m_owner!='MDSYS' and m_owner!='SYS' and m_type='TABLE' and m_event='TRUNCATE')
            then
               m_stmt:='call sdo_geor_def.doTruncateTable()';
               execute immediate m_stmt;
            end if;
          
            if (m_owner!='MDSYS' and m_owner!='SYS' and m_type='TABLE' and m_event='ALTER')
            then
               m_stmt:='call sdo_geor_def.doAlterRenameTable()';
               execute immediate m_stmt;
            end if;
          
            if (m_owner!='MDSYS' and m_owner!='SYS' and m_type='TABLE' and m_event='RENAME')
            then
               m_stmt:='call sdo_geor_def.doRenameTable()';
               execute immediate m_stmt;
            end if;
          
          
           if (m_event='DROP' and m_type='TABLE')
           then
             m_stmt:='delete from sdo_geor_ddl__table$$ where id=2';
             EXECUTE IMMEDIATE m_stmt;
           end if;
          
           if ((m_type='USER' and m_event='DROP') or (m_type='TABLESPACE' and m_event='DROP'))
           then
             m_stmt:='delete from sdo_geor_ddl__table$$';
             EXECUTE IMMEDIATE m_stmt;
           end if;
          
           Exception
             when others then
               if(sqlcode=-13391)
               then
                 m_stmt:=sqlerrm;
                 m_stmt:=substr(m_stmt,11);
                 m_stmt:='call mderr.raise_md_error(''MD'', ''SDO'', -13391,'''||m_stmt||''')';
                 execute immediate m_stmt;
               end if;
          end;
          
          
INSERT dans la table des colonnes indexées?
          SQL ID: bxa794dmp6z7w Plan Hash: 0
          insert into icol$(obj#,bo#,intcol#,pos#,segcol#,segcollength,offset,col#,
            spare1,spare2,spare3)
          values
          (:1,:2,:3,:4,0,0,0,:5,:6,:7,:8)
          
          
INSERT dans la table des index. Ma table a une PK donc un index doit être créé.
          SQL ID: auhy7gptp3g2d Plan Hash: 0
          insert into ind$(bo#,obj#,ts#,file#,block#,intcols,type#,flags,property,
            pctfree$,initrans,maxtrans,blevel,leafcnt,distkey,lblkkey,dblkkey,clufac,
            cols,analyzetime,samplesize,dataobj#,degree,instances,rowcnt,pctthres$,
            indmethod#,trunccnt,spare1,spare4,spare2,spare6,evaledition#,
            unusablebefore#,unusablebeginning#)
          values
          (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,
            :22,decode(:23,1,null,:23),decode(:24,1,null,:24),:25, :32*256+:26,:27,:28,
            :29,:30,:31,:33,decode(:34,1,null,:34),decode(:35,0,null,:35),decode(:36,0,
            null,:36))
          
          
INSERT dans la table des tables des infos sur ma table.  
          SQL ID: cctshhyrn67um Plan Hash: 0
          insert into tab$(obj#,ts#,file#,block#,bobj#,tab#,intcols,kernelcols,clucols,
            audit$,flags,pctfree$,pctused$,initrans,maxtrans,rowcnt,blkcnt,empcnt,
            avgspc,chncnt,avgrln,analyzetime,samplesize,cols,property,degree,instances,
            dataobj#,avgspc_flb,flbcnt,trigflag,spare1,spare6,acdrflags,acdrtsobj#,
            acdrdefaulttime,acdrrowtsintcol#)
          values
          (:1,:2,:3,:4,decode(:5,0,null,:5),decode(:6,0,null,:6),:7,:8,decode(:9,0,null,
            :9),:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23,:24,:25,
            decode(:26,1,null,:26),decode(:27,1,null,:27),:28,:29,:30,:31,:32,:33,:34,
            :35,:36,:37)
          
          
INSERT dans la table des colonnes de ma table.
          SQL ID: 06vfu0r0xxfjt Plan Hash: 0
          insert into col$(obj#,name,intcol#,segcol#,type#,length,precision#,scale,
            null$,offset,fixedstorage,segcollength,deflength,default$,col#,property,
            charsetid,charsetform,spare1,spare2,spare3,evaledition#,unusablebefore#,
            unusablebeginning#,collid,collintcol#,acdrrescol#, spare7)
          values
          (:1,:2,:3,:4,:5,:6,decode(:5,182/*DTYIYM*/,:7,183/*DTYIDS*/,:7,decode(:7,0,
            null,:7)),decode(:5,2,decode(:8,-127/*MAXSB1MINAL*/,null,:8),178,:8,179,:8,
            180,:8,181,:8,182,:8,183,:8,231,:8,null),:9,0,:10,:11,decode(:12,0,null,:12)
            ,:13,:14,:15,:16,:17,:18,:19,:20,decode(:21,1,null,:21),decode(:22,0,null,
            :22),decode(:23,0,null,:23),decode(:24,0,null,:24),decode(:25,0,null,:25),
            decode(:26,0,null,:26),:27)
          
          
INSERT dans la table ccol$. A quoi sert-elle?
          SQL ID: 909ysvbz0uqd8 Plan Hash: 0
          insert into ccol$(con#,obj#,intcol#,pos#,col#,spare1)
          values
          (:1,:2,:3,decode(:4,0,null,:4),:5, :6)
          
          
          INSERT dans la table cdef$. A quoi sert-elle?
          SQL ID: dmh17scdhqz3z Plan Hash: 0
          insert into cdef$(obj#,con#,type#,intcols,condlength,condition,robj#,rcon#,
            match#,refact,enabled,cols,defer,mtime,spare1,spare2,spare3)
          values
          (:1,:2,:3,decode(:4,0,null,:4),decode(:5,0,null,:5),:6,decode(:7,0,null,:7),
            decode(:8,0,null,:8),decode(:9,0,null,:9),decode(:10,0,null,:10),
            decode(:11,0,null,:11),:12, decode(:13,0,null,:13),:14,:15,:16,:17)
          
          
          SQL ID: 14fy467qw1j7t Plan Hash: 190265630
          select 1
          from
           sys.streams$_prepare_ddl p  where  ((p.global_flag = 1 and :1 is null) or    
                   (p.global_flag = 0 and p.usrid = :2)) and rownum = 1
          
          
          SQL ID: 959zc6wq090jm Plan Hash: 0
          ALTER SESSION SET events '10046 trace name context off'
         

============================================================================================
Conclusion

============================================================================================
         

Sympa, Oracle nous fait un résumé du contenu de la trace : pour un CREATE TABLE en 12c CDB, Oracle gère 107 ordres SQL alors que j'en avais que trente pour la base non CDB; mais c'était une table sans PK ni index.

          Trace file: orcl12c_ora_4616_zztest_create_table01.trc
          Trace file compatibility: 12.2.0.0
          Sort options: default

           1  session in tracefile.
         21  user  SQL statements in trace file.
         86  internal SQL statements in trace file.
        107  SQL statements in trace file.
          69  unique SQL statements in trace file.
     30391  lines in trace file.
            9  elapsed seconds in trace file.

Attention, si je fais une recherche sur le libellé SQL ID, Oracle ne me sort que 67 (et non pas 69) occurrences dans ce fichier trace format TKPROF, ce qui signifie que les ordres SQL exécutés plusieurs fois, à cause des valeurs des bind variables?, ne sont pas dupliqués ici. Il faut voir le fichier de trace brut pour comprendre ce que fait réellement Oracle.

Je note aussi que pour Oracle il y a 21 ordres SQL utilisateur et 86 ordres internes alors que je n'ai saisi qu'un seul ordre SQL!
          
Ah, au fait, 30391 lignes dans le fichier brut de traces... Pfiou, tout ça juste pour un CREATE TABLE...
         
En résumé, mon CREATE TABLE a généré les mises à jour suivantes dans le dictionnaire de données (je ne parle pas ici des INSERT des blocs PL/SQL qui ne me semblent pas être indispensables au CREATE TABLE).
Neuf INSERTs
          insert into obj$
          insert into deferred_stg$
          insert into con$
          insert into icol$
          insert into ind$
          insert into tab$
          insert into col$
          insert into ccol$
          insert into cdef$
         
Deux UPDATEs
          update con$
          update obj$