Archives: 02/18/2016

Versioning

SELECT ps_ordine, ps_variazione_ordine, versions_xid, versions_starttime, versions_endtime, versions_operation FROM sigo_ordini_mercati VERSIONS BETWEEN TIMESTAMP TO_DATE(‘201602181000’, ‘YYYYMMDDHH24MISS’) AND TO_DATE(‘201602181200’, ‘YYYYMMDDHH24MISS’) WHERE dt_consegna=’20160218′ and cd_pdv=1 and cd_deposito=95 and cd_int=’0350000035′ ORDER BY versions_starttime

Currently running SQL statements

SELECT SUBSTR(V$SESSION.USERNAME, 1, 8) USERNAME, V$SESSION.OSUSER OSUSER, V$SQLAREA.DISK_READS DISK_READS, V$SQLAREA.BUFFER_GETS BUFFER_GETS, SUBSTR(V$SESSION.LOCKWAIT, 1, 10) LOCKWAIT, V$SESSION.PROCESS PID, V$SESSION_WAIT.EVENT EVENT, V$SQLAREA.SQL_TEXT SQL, V$SQLAREA.SQL_FULLTEXT SQL_FULL FROM V$SESSION_WAIT, V$SQLAREA, V$SESSION WHERE V$SESSION.SQL_ADDRESS = V$SQLAREA.ADDRESS AND V$SESSION.SQL_HASH_VALUE = V$SQLAREA.HASH_VALUE AND V$SESSION.SID = V$SESSION_WAIT.SID(+) AND V$SESSION.STATUS = ‘ACTIVE’ AND V$SESSION_WAIT.EVENT != ‘client message’ ORDER BY V$SESSION.LOCKWAIT ASC, V$SESSION.USERNAME;

DBMS_LOCK (using lock in a stored)

DECLARE v_lockhandle VARCHAR2(200); v_RET INTEGER; BEGIN — INIZIO TEST LOCK IF v_lockhandle IS NULL THEN dbms_lock.allocate_unique(‘LOCK_MOV’, v_lockhandle); END IF; IF dbms_lock.request(v_lockhandle, dbms_lock.x_mode, 0) != 0 THEN SP_INS_LOG_ERROR(v_DS_PROC, 0, ‘Procedura gia” in uso [LOCK]’, null, ‘system’, ‘N’, ‘ORACLE’); RETURN; END IF; — FINE TEST LOCK — LINE 1 — — LINE 2 — — LINE N…

Go Top