RDBMS ORACLE - DDL MINUS - Genera uno script per verificare il contenuto di due tabelle
ELCARO
by
3w ago
 Di seguito una query che genera la ddl per una minus tra due tabelle ed inserisce il contenuto in una tabella di appoggio. SELECT    'INSERT INTO DM_ITI.APPO_COUNT_DIFF '||CHR(10)||MNS||CHR(10)||'COMMIT;' DDL_MINUS FROM  (SELECT     'SELECT COUNT(1) , '''||TAB||''' TAB_NAME FROM ('||CHR(10)|| MN ||');' AS MNS  FROM ( SELECT   LISTAGG(SEL_MINUS, chr(10)||' MINUS '||CHR(10))                              WITHIN GROUP (ORDER BY COL_ORD) MN, TAB      FROM ..read more
Visit website
RDBMS ORACLE - Funzione SecondsSinceFromTimestamp IBM-DS Vs ORACLE
ELCARO
by
1M ago
La funzione SecondsSinceFromTimestamp in IBM- DataStage:   SecondsSinceFromTimestamp(DATA_FINE_EVENTO, DATA_INIZIO_EVENTO)   effettua una differenza tra due timestamp in secondi. Da documentazione IBM: In oracle non esiste una funzione che effettua questa differenza, per cui occorre creare una funzione  custom da richiamare.  La funzione che è stata creata ha lo stesso nome di quella presente in  IBM-DS. --------------------------------------------------------------------------------------------------------- create or replace  FUNCTION SecondsSinceFromTimes ..read more
Visit website
RDBMS ORACLE - Statistiche di uno schema DB
ELCARO
by
5M ago
 Di seguito alcuni comandi per raccogliere le statistiche di uno schema oracle: DBMS_UTILITY.ANALYZE_SCHEMA --> viene utilizzato per raccogliere statistiche per tutte le tabelle, i cluster e gli indici di uno schema. Examples: EXEC DBMS_UTILITY.ANALYZE_SCHEMA('SCOTT','COMPUTE'); EXEC DBMS_UTILITY.ANALYZE_SCHEMA('SCOTT','ESTIMATE', estimate_rows => 1000); EXEC DBMS_UTILITY.ANALYZE_SCHEMA('SCOTT','ESTIMATE', estimate_percent => 25); EXEC DBMS_UTILITY.ANALYZE_SCHEMA('SCOTT','DELETE'); Note: È anche possibile analizzare l'intero database con il ..read more
Visit website
SQL developer error with "disable modules and continue"
ELCARO
by
6M ago
Nel caso in cui state utilizzando SQLDEVELOPER e ricevete un errore del tipo: "Warning - could not install some modules: oracle.java_annotations - org.netbeans.InvalidException: Netigso: D:\sqldeveloper-4.0.2.15.21-no-jre\sqldeveloper\ide\lib\annotations.jar: Not found bundle:oracle.java_annotations oracle.ide_boot  ecc." Allora occorre fare un pò di pulizia nella system_cache di sqldeveloper. L'esempio di seguito è per UBUNTO. Una volta cancellata la directory si può aprire nuovamente ODI ..read more
Visit website
UBUNTU - How do I mount shared folders in Ubuntu using VMware
ELCARO
by
1y ago
Per condividere una directory tra host e VM occorre prima accedere a vmware "Virtual Machine Settings" e spostarsi su "Options".  In questo tab accedere a "Shared Folders" e configurare una directory di cui fare lo share.  Lato Ubuntu una volta configurato vmware effettuare la configurazione del file fstab. Ma prima occorre configurare i tools di vmware su Ubuntu. Eseguire il seguente comando per abilitare i tools: sudo apt-get install open-vm-tools open-vm-tools-desktop A questo punto accedere al file fstab ed aggiungere la stringa che permette la mount della directory presente su ..read more
Visit website
ODI 12c - Shell Unix for Test if Agent ODI is Up o Down
ELCARO
by
1y ago
 Di seguito una semplice shell per verificare se un agent ODI sia o meno attivo. #!/bin/bash # Set the Oracle ODI Agent URL AGENT_URL="http://localhost:25910/oraclediagent" # Check the status of the ODI Agent #echo "curl -so /dev/null -w "%{http_code}" $AGENT_URL" STATUS_CODE=$(wget --server-response $AGENT_URL  2>&1 | awk '/^  HTTP/{print $2}' | grep 200 | awk '{print NR}') echo $STATUS_CODE # Check the HTTP status code of the ODI Agent #if [ $STATUS_CODE == "200" ]; then if [ $STATUS_CODE == "1" ]; then     echo "Oracle ODI Agent is running."     ..read more
Visit website
ODI 12c - How to Program Conditional Clauses Using ODI Substitution Methods
ELCARO
by
1y ago
 Come rendere una procedura ODI dinamica durante la chiamata da parte dell'Agent. Supponiamo di dover effettuare la insert in una tabella leggendo una select che occorre comporre in maniera dinamica ad ogni chiamata a seconda del valore di input. Il che vuol dire che se io ho in input ad esempio un valore leggo dalla tabella A altrimenti leggo dalla tabella B e cosi' via. INSERT INTO <....> if valore di input A1 then SELECT A1 FROM A1 if valore di input A2 then SELECT A1 FROM A2  ... if valore di input An-1 then SELECT A1 FROM An-1 if valore di input An then SELECT A1 FROM An ..read more
Visit website
RDBMS ORACLE - Query di analisi dello spazio occupato
ELCARO
by
1y ago
 Di seguito alcune query per l'analisi dello spazio occupato da un DB oracle, basate sull'analisi dei datafile/tablespace e tabelle AWM. CRESCITA DATABASE BASATO SU DATAFILE SELECT (select min(creation_time) from v$datafile) ""Create Time"", (select name from v$database) ""Database Name"", ROUND((SUM(USED.BYTES) / 1024 / 1024 ),2) ""Database Size MB"", ROUND((SUM(USED.BYTES) / 1024 / 1024 ) - ROUND(FREE.P / 1024 / 1024 ),2) ""Used Space MB"", ROUND(((SUM(USED.BYTES) / 1024 / 1024 ) - (FREE.P / 1024 / 1024 )) / ROUND(SUM(USED.BYTES) / 1024 / 1024 ,2)*100,2) ""Used in % MB"", ROUND((FREE ..read more
Visit website
BIAPPS - INFORMATICA - Query per estrarre l'associativa Workflow / Mapping di Informatica
ELCARO
by
2y ago
 Di seguito una query per poter associare i workflow ai mapping eseguiti in Informatica. Tutto internamente ad Informatica: ------------------------------------------------------------------- --- QUERY ESTRAZIONE associativa WF_MAPPING in INFORMATICA      --- --- Da eseguire come utente sys sul database che contiene il repository di INFORMATICA   --- ------------------------------------------------------------------- SELECT distinct          SUB.SUBJ_NAME subject_area_info ,         WF.WORKFLOW_NAME, opb_task.TASK_NAME ..read more
Visit website
RDBMS - Funzioni per criptare e decriptare una stringa
ELCARO
by
3y ago
Di seguito un paio di funzioni per criptare e decriptare un testo. Gli algoritmi utilizzati sono :  A =DES3_CBC_PKCS5  D =ENCRYPT_AES256 +CHAIN_CBC +PAD_PKCS5; Di seguito le funzioni: -------------------------------------------------------------------------------- --- funzione per cifrare un testo --- ALGORITMO =  ---    A =DES3_CBC_PKCS5 ---    D =ENCRYPT_AES256 +CHAIN_CBC +PAD_PKCS5; --- ES: select pkg_gest_plsql_odi.cifra('Questo è un testo molto lungo da cifrare, contiene anche ritorni a capo etc...',  'MIACHIAVE012345678901234','D') cifrato  fr ..read more
Visit website

Follow ELCARO on FeedSpot

Continue with Google
Continue with Apple
OR