Guest Blog

Home / SQL Server 2005 / Guest Blog


  • JohnW

    Grant, I posted this on the MVP blog, but it seems to be pending moderation; on the first query, I get an error stating that ‘Arithmetic overflow error converting expression to data type int; haven’t figured it out yet.

    I can run the CTE alone and get ~30 records, with the largest timestamp of 1721618323. Target system is 2008 R2 x64 with SP0 CU8 64 GB memory.

    As a side note, AWE can be nonzero on 64 bit systems if Lock Pages In Memory is enabled; while the need for that is reduced, it is not yet eliminated.

  • I’m assuming by first query you don’t mean the SELECT * one. We’d have to be talking about the date conversion. It’s not necessary for the query itself. That bit of code I picked up off the MSDN forums. It worked very consistently on everything I tested it on & I’ve seen it used by multiple others. Maybe try substituting SYSDATETIME for GETDATE.

  • JohnW

    Grant, that was it. I borrowed a line from a similar post I saw later in the day from sqlskills and get the correct results.

    DATEADD(ms, (-1 * ((dosi.cpu_ticks / CONVERT ( float,(dosi.cpu_ticks / dosi.ms_ticks)))
    – rb.timestamp)), GETDATE()) AS RmDateTime

  • Hi,

    I ran across your site, and really appreciate the content. I run a dba website and I am always seeking opportunities to write some guest blog posts for quality sites such as yours. Would you be interested? I have a variety of content, but if you have something specific that you want to focus on for your readers, I would be glad to write something up. If this is of interest to you, please get back with me.


    Brian Hines | Online Marketing Specialist | Remote Database Administration

  • Thanks for the interest, but I’m pretty much a one-man show here. However, if you’re interested in writing opportunities, I’d suggest SQL Server or They are both always needful of good articles.

OK, fine, but what do you think?