Category: Operating Systems

Getting SQL Server table size with Powershell

<# —————————————————————————————————————- Author: ******** Enterprise Architecture Date: May 5, 2018 Purpose: List table sizes Revisions: Initial – SDH 2018-05-05 To-do: – —————————————————————————————————————- #> $conn = New-Object System.Data.SqlClient.SqlConnection $conn.ConnectionString = "Server=********\NCRWO;database=NCRWO_TransactionLog;Integrated Security=true;MultipleActiveResultSets=true" $conn.Open() $cmd = New-Object System.Data.SqlClient.SqlCommand $cmdInner = New-Object System.Data.SqlClient.SqlCommand…

Who installed which packages when

Just a quick how-to this morning… # for id in $(yum history list all | grep showard | awk '{print $1}' | head -1); do echo "****************************************************"; yum history info ${id}; done **************************************************** Loaded plugins: product-id, rhnplugin, search-disabled-repos, security, subscription-manager…

Spinlocks, does Oracle use them?

I often write simple C programs to better understand how a given enterprise software program works. Latches in the Oracle database are “in memory locks that protect critical sections of code”. Oracle kernel developers decide that a given section of…

Adding a system call to Linux

These are *old* notes (2010 or so). I remember doing this, and it was interesting enough that I thought I should post it. It may be easier now. I experimented with the following on CentOS 5.1 running on an i686…

Impact of socket.SO_REUSEADDR

This is often used to get around an “address already in use” error. If you know the previous server program has been shutdown, you can set this socket option prior to the initial server bind, and then restart your program.…

PowerShell for *nix people

PowerShell is becoming (has become) the replacement for VBScript on Microsoft operating systems. It is a fairly robust scripting language that I think most administrators will be happy to see. If you have a supported Microsoft operating system (i.e., not…