Category: Technology

  • Find out total database file sizes on a Sql Server instance

    Sometimes you want to know how much space Sql Server databases on an instance are taking from a system. This should be the sum of all data files and log files. Note this is different from how much space actual data is taking. Here is one way to do it. Note it uses sysaltfiles, a…

  • Find out distributor and publisher info in SQL Server replication

    The script below is available in MSDN. I used it a few months ago but it took me some time to find it again, so I decided to put it here for my own reference. Purpose: find out information on distributor and publisher databases, articles, and publications in SQL Server replication. [code language=”sql”] –********** Execute…

  • Find the latest or newest modified file in a folder or directory with Perl

    I’ve worked on and off with Perl, but really want to be more proficient with it. I will do more automation with Perl and will share it here for my reader and as a reference for myself. I just created a Perl tag on this blog. Here is one script I cooked out today. It…

  • Enter Chinese and do msn chat on Ubuntu

    Version: Ubuntu 7.10, the Gutsy Gibbon released in Oct. 2007. I run it on VMWare Player. Assumption: Ubuntu is connected to the web. Do msn (Windows Live) chat on Ubuntu: 1. Application -> Add/Remove… 2. Click Internet tab on the left pane, then pick aMSN for install. As this writing, it has 4 stars under…

  • List Sql Server jobs and their owners and duration history

    [sourcecode language=”sql”] use msdb go select name, suser_sname(sysjobs.owner_sid) as owner from msdb..sysjobs go select sj.name,sjh.run_status,case sjh.run_status when 1 then ‘Sucess’ when 2 then ‘Retry’ when 3 then ‘Cancelled’ when 4 then ‘In Progress’ when 0 then ‘Failed’ End as ‘Run Status’,sjh.run_date as ‘Run Date’, CASE len(run_time) WHEN 1 THEN cast(’00:00:0′ + cast(run_time as char) as…