Category: Technology

  • 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…

  • List last running status of enabled jobs in Sql Server

    Script below. This one works better for Sql Server 2000. I will do a version for Sql Server 2005, when I get a chance. It didn’t work very well on Sql Server 2005 because Ad Hoc Distributed Queries is disabled by default. set nocount on IF OBJECT_ID(‘tempdb..#TmpJobs’) IS NOT NULL DROP TABLE #TmpJobs SELECT *…