Unsure of SQL batch

  • Hi Guys

    Wondering if anyone could shed some light on the below SQL batch.

    The master database is running this query from an anonymous login:

    (@P1 varchar(30),@P2 int,@P3 varchar(40))SELECT "timestamp","Profile ID","Page ID","Personalization ID","Date","Time",DATALENGTH("Page Metadata Delta") FROM "VUNA_LIVE"."dbo"."Profile Metadata" WHERE "Profile ID"=@P1 AND "Page ID"=@P2 AND "Personalization ID"=@P3

    Is this something to be cautious about?

    Regards

  • Looks like application code. What are you worried about exactly?

    -- Gianluca Sartori

  • I'm not, the Manager of the client is "worried" the the master database has a process running now for a few days :\

  • Running? I suppose it's not.

    What does

    SELECT status FROM sys.dm_exec_requests WHERE session_id = [session_id of the process]

    return?

    -- Gianluca Sartori

  • No rows returned.

    I know it's not running anything, but why is it still there though?

  • Is it in sys.dm_exec_sessions?

    -- Gianluca Sartori

  • No, but I'm picking it up in the activity monitor

  • The command you posted comes from the "Details" window? Is the "Command" column empty or does something show up?

    In the first case, it's the last command run from that connection but not running now, in the latter the session is actually running something. There's a big difference between the two.

    If it's an idle connection, probably an application left it open and forgot to close.

    -- Gianluca Sartori

  • Thanks so much! Makes sense 🙂

  • It was the latter

  • ruan.keyser (10/4/2011)


    It was the latter

    Perfect. Glad I could help.

    -- Gianluca Sartori

Viewing 11 posts - 1 through 10 (of 10 total)

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