Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2007
    Posts
    5

    Unanswered: last tsql command

    hi, how can i obtain the info of the last tsql command executed?, in the table sysprocess i only have the number of spid

    thanks so much

  2. #2
    Join Date
    May 2003
    Location
    Rochester, NY
    Posts
    135
    ...have you tried double-clicking the spid in Enterprise Manager->Management->Current Activity->Process Info?

    ...might give you what you're looking for...

  3. #3
    Join Date
    Jan 2007
    Posts
    5

    last tsql command

    hi, yes, but sql save it in someplace? i need to extract it to a table

  4. #4
    Join Date
    May 2003
    Location
    Rochester, NY
    Posts
    135
    Not that I'm aware of, you'd have to run profiler to capture the sql (even then I am not sure you can save it to a table...)

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by rocket39
    (even then I am not sure you can save it to a table...)
    Yes you can though MS recommend you write to a trace file and insert this into a table when you want to analyse. More efficient to write to a file at trace time basically.

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Mar 2005
    Location
    Netherlands
    Posts
    280
    @Mvrg76: Why have you opened a new thread???
    See http://www.dbforums.com/showthread.php?t=1613810

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •