Skip to content

Instantly share code, notes, and snippets.

View ozmoroz's full-sized avatar

Sergey Stadnik ozmoroz

View GitHub Profile
@ozmoroz
ozmoroz / inlineHandler.js
Created August 1, 2018 07:35
onClick via inline functions (don't do that)
handleClick = (…args) => (event) => {…}
<button onClick=(handleClick(…args)}>Button</button>
@ozmoroz
ozmoroz / schema_table_size.sql
Created January 1, 2018 10:53
Show sizes of all tables in an Oracle schema
-- Find the size of all tables in an Oracle schema
-- Script by Sergey Stadnik, http://ozmoroz.com
-- Licensed under CC BY with attribution required
-- Based on Stackoverflow.com discussion
-- http://stackoverflow.com/questions/264914/how-do-i-calculate-tables-size-in-oracle
DEFINE schema_name = 'replace_with_your_schema_name'
SELECT * FROM (
SELECT
@ozmoroz
ozmoroz / show_sessions.sql
Created January 1, 2018 10:43
Show information about Oracle sessions
--
-- Show information about Oracle sessions
--
SELECT s.inst_id, s.osuser, gps.qcsid, p.spid, s.sid, s.serial#
, s.machine, s.schemaname, s.program, w.event AS wait_event
FROM gv$session s
JOIN gv$process p ON p.addr = s.paddr
LEFT OUTER JOIN gv$session_wait w ON w.sid = s.sid
LEFT OUTER JOIN gv$px_session gps ON gps.sid = s.sid AND gps.serial# = s.serial#