Posts

Dropping Columns

Oracle 8i introduced the ability to drop a column from a table. Prior to this it was necessary to drop the entire table and rebuild it. Now you can mark a column as unused (logical delete) or delete it completely (physical delete). Logical Delete On large tables the process of physically removing a column can be very time and resource consuming. For this reason you may decide to logically delete it.   ALTER TABLE table_name SET UNUSED (column_name);  ALTER TABLE table_name SET UNUSED (column_name1, column_name2); Once this is done the columns will no longer be visible to the user. If at a later date you have time to physically delete the columns this can be done using the following.   ALTER TABLE table_name DROP UNUSED COLUMNS; On large tables you can reduce the amount of undo logs accumulated by using the CHECKPOINT option which forces a checkpoint after the specified number of rows have been processed.   ALTER TABLE table_name DROP UNUSED COLUMN...

Firefox - Zugriff auf lokale Dateien erlauben

Um mit dem Firebox Browser auf lokale Dateien zugreifen zu können, ist folgende Property zu setzen: capability.policy.localfilelinks_policy.sites Beispiele: file:///Q:/Projekte/Test.pdf file://///abc/fs/Projekte/Test.pdf

ODI: IKM Optionen per Choice auswählen

Bild
Optionen eines IKM können per Choice mit verschiedenen Werten hinterlegt werden. Diese werden in der Spalte "Default Value" eingetragen. Nach Auswahl des "Type" Choice öffnet sich bei Klick auf "Default Value" ein Dialog zum Anlegen und Bearbeiten der Auswahleinträge. Quelle: https://blogs.oracle.com/dataintegration/odi-12c-improving-usability-of-km-recipes

Incremental Statistics on Partitioned Objects

Ab Oracle 12.2 können die Statistiken z.B. partitionierter Tabellen "inkrementel" erstellt werden. Dadurch entfällt z.B. in DWH-Umgebungen der sehr aufwändige Full-Table-Scan nachdem nur eine Partition geladen wurde. Um incremental statistics nutzen zu können, muss dieses für die Tabelle eingeschaltet werden: Einstellungen prüfen: select     DBMS_STATS.GET_PREFS('ESTIMATE_PERCENT', 'HM19_STAGE', 'I_OKV_FALL_FZ') ESTIMATE_PERCENT   , DBMS_STATS.GET_PREFS('GRANULARITY', 'HM19_STAGE', 'I_OKV_FALL_FZ') GRANULARITY   , DBMS_STATS.GET_PREFS('INCREMENTAL', 'HM19_STAGE', 'I_OKV_FALL_FZ') INCREMENTAL   , DBMS_STATS.GET_PREFS('INCREMENTAL_LEVEL', 'HM19_STAGE', 'I_OKV_FALL_FZ') INCREMENTAL_LEVEL   , DBMS_STATS.GET_PREFS('PUBLISH', 'HM19_STAGE', 'I_OKV_FALL_FZ') PUBLISH   , DBMS_STATS.GET_PREFS('APPROXIMATE_NDV_ALGORITHM', 'HM19_STAGE', 'I_OKV_...

SQL: Abfrage Tabellen mit Spaltenliste, Datentypen und Kommentaren

kleine Abfrage zu Tabellen und Spalten (inkl. Datentypen und Kommentare): select TC.TABLE_NAME      , TC.COLUMN_NAME      , TC.DATA_TYPE      , TC.DATA_LENGTH      , COC.COMMENTS      , TC.COLUMN_ID   from USER_TAB_COLS TC   join USER_COL_COMMENTS COC on TC.TABLE_NAME = COC.TABLE_NAME and TC.COLUMN_NAME = COC.COLUMN_NAME  where TC.TABLE_NAME in ('D_1', 'D_2', 'D_3') union all select TABLE_NAME      , null      , null      , null      , COMMENTS      , 0   from USER_TAB_COMMENTS  where TABLE_NAME in ('D_1', 'D_2', 'D_3')  order by TABLE_NAME, COLUMN_ID ;

APEX-User im Logging mitschreiben

Um aus der Session des aktuellen APEX-User abzugreifen gibt es folgende sys_context abfragen: -- Apex-User abfragen select sys_context('APEX$SESSION', 'APP_USER') from dual; -- DB-Umgebung abfragen select substr(SYS_CONTEXT ('USERENV', 'DB_NAME'),-1) UMGEBUNG from dual; Weitere Möglichkeiten (mindestens ab APEX 19.1): sys_context('APEX$SESSION', 'APP_USER') sys_context('APEX$SESSION', 'APP_ID') sys_context('APEX$SESSION', 'WORKSPACE_ID')   sys_context('APEX$SESSION', 'APP_SESSION')   Ergänzend noch die bekannten Klassiker: SYS_CONTEXT ('USERENV', 'SESSION_USER') SYS_CONTEXT ('USERENV', 'OS_USER') SYS_CONTEXT ('USERENV', 'DB_NAME')

APEX auto refresh region

Um auf einer APEX-Seite eine Region (z.B. classic report) in regelmäßigen Abständen zu aktualisieren, sind folgende zwei Schritte nötig: 1) beim Report unter Advanced / StaticID - eine Static-ID vergeben, im Bsp: P2_ODI_MONITOR 2) etwas weiter unten unter Header and Footer / Header Text folgenden JS-Snip eintragen: &ltscript type="text/javascript"&gt setInterval("$('#P2_ODI_MONITOR').trigger('apexrefresh');", 5000); &lt/script&gt