Long running query

  • I am monitoring long running queries on my SQL Server and this specific query is initiated by MSAS box. To complete, It takes 25-30 minutes on an average and i failed to understand as to what is it doing:

    DECLARE @OlapEvent BIGINT;SELECT @OlapEvent = ObjIdUpdate(2);SELECT (@OlapEvent & convert(bigint, 0xffff000000000000)) / 0x0001000000000000 AS Status, (@OlapEvent & convert(bigint, 0x0000ffff00000000)) / 0x0000000100000000 AS DbId, @OlapEvent & convert(bigint, 0xffffffff) AS ObjId;

    Can somebody please take a moment and suggest, what this query is doing?

  • [font="Verdana"]Are you sure that's the query that is taking all of the time? I can run it on an instance here, and it returns instantly.

    I haven't heard of the ObjIdUpdate function, and it doesn't appear to be in books online. Have you tried googling it?

    [/font]

  • Thanks for the answer.

    Yes positive this is the query taking that long time. How am i capturing these results? Well I have put filtered conditions on profiler to capture anything running over 10 minutes and this is what i see on my profiler. This query is ran against the ApShell database (User database) what i have on my production SQL Server.

    Yes i google and did quiet a bit research as well. unforttunately could not find any lead on this.

    Apprecaited if any input on this.

    Thanks,

  • Hi,

    He launched the query and the result is immediate.

    Check Activity Monitor to see if there is any process blocking.

  • This query is coming from Analysis server on a hourly bases. I checked the server and dont have any blocking going.

    Dont know why its taking so long.

  • HI,

    I am trying to find an answer for the same problem. Every time that particular query runs it shuts down AS so we have to stop and start AS. I don’t know if you are using only AS or if there is an Application in front of it. In our case it is. So I am not sure if AS does it or if it a call from the Application itself. But we also have a cube that’s called ApShell that came with the application.

  • AppShell. Ugggh...you're dealing with SAP BPC as well? What a pain in the *** application.

    I'm given to understand that ObjIDUpdate() is SSAS proactive caching. I'm still trying to sort out what it actually does. It occasionally takes upwards of an hour to run in our (underutilized) environment.

    Aaron Alton
    Blogging at The HOBT

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply