Weekly script #2 pid_from_sid.sql

A fairly easy script today that isn’t really hard to work out for yourself but I find it useful to have this script kicking around for when you find high resource using Oracle server process and you want to identify the offending SQL. set pages 1000; set lines 200; col username for a10; select b.status,a.inst_id,a.PID “Ora PID”,a.SPID “Server PID”, a.LATCHWAIT,b.Program, b.Username,b.Osuser,b.machine, b.terminal,a.terminal,b.Process “Client Process” from … Continue reading Weekly script #2 pid_from_sid.sql

Weekly Script #1 – ssh_key_scp.sh

Since I dont post on here to often I will try and post a weekly script that I find useful day-to-day. First up is a short simple script to scp your private key to a defined server. Usage is pretty simple call the script with the username@hostname e.g ./ssh_key_scp.sh username@hostname If no ssh key already exists the script gives you the option to generate one. … Continue reading Weekly Script #1 – ssh_key_scp.sh