Articles Posted by the Author:

  • My Learning Goals 2018

    My Learning Goals 2018

    I thank Malathi (b|t) for hosting TSQL Tuesday #97. Topic for this month is  “Setting learning goals for 2018″.

    TSQL2SDAY-300x300

    I want to acknowledge that my learning goal will change with time and it happens every year. My first priority is my employer. I need to learn, improve and implement what the company need. Beside that I also want to learn things that are of my personal interest.

    Microsoft Professional Program for Big Data track

    I want to finish what I started in 2017 but did not get enough time to work on. BigDataPorgressMicrosoft Professional …


  • Reading All Available SQL Error logs

    Reading All Available SQL Error logs

    There are many blog posts available online about reading SQL Server Error Log or SQL Server Agent Error Log. What I needed was to search for a string (or string within a string) in all available error logs. Save the results in a table. That way I can find the frequency and pattern of the occurrence. I am also aware that PowerShell commands can read error logs and there are few posts available online for doing that. I did not find one with everything I needed. I wrote 2 versions of this, one as a stored procedure that you can …



  • TSQL Tuesday #93 -Do Not Drive During Interview

    TSQL Tuesday #93 -Do Not Drive During Interview

    I thank Kendra Little (b|t) for hosting TSQL Tuesday #93. Topic for this month Interviewing Patterns & Anti-Patterns. What advice do you have for people preparing for or going through an interview?.

    TSQL2SDAY-300x300

    After initial phone screening I went for in person interview. I was scheduled to meet 5 interviewer. Last person in the list was the manager to whom I will report if I work there. Things went very well with the first 4 interviewer. I was looking forward to meet the manager. I was told the manager is not onsite and they will connect …


  • Extended Event duration Millisecond or Microsecond?

    Extended Event duration Millisecond or Microsecond?

    There was a question in dba.stackexchange.com titled “module_end extended events duration in microseconds?” that I answered and it was Microsecond in that instance.
    Later on I questioned myself if the duration is always in Microseconds for extended events. I found, it is a mix of Millisecond, Microsecond and some are unknown meaning famous NULL. I wrote below tsql code to determine which is what.

    SELECT p.name package_name,
           o.name event_name,
           c.name event_field,
           DurationUnit= CASE
                             WHEN c.description LIKE '%milli%' 
                             THEN SUBSTRING(c.description, CHARINDEX('milli', c.description),12)
                             WHEN c.description LIKE '%micro%' 
                             THEN SUBSTRING(c.description, CHARINDEX('micro', c.description),12)
                             ELSE NULL
                         END,
           c.type_name field_type,
           c.column_type column_type
    FROM sys.dm_xe_objects o
    JOIN