SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    Chopped Liver bronze trophy imaginekitty's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    1,494
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Viewing incoming SQL on MSSQL server?

    I've looked this up on the googles and such and all of the ideas don't seem to work with my datacontext for some reason.

    I just want to see the SQL queries that are being sent to my server so that I can make sure they are being properly parameterized.

    I'm using SQL Server 2008 Express locally. Quick and dirty is fine as it's not for release.

    Thanks.

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,649
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    If you have the full-blown SQL Server Management tools, check out SQL Server Profiler. If you are using Linq 2 Sql, check out http://l2sprof.com/home

    Also, I think you can force parameterization in Sql 2008. Not sure exactly how to do this.

  3. #3
    Chopped Liver bronze trophy imaginekitty's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    1,494
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    If you have the full-blown SQL Server Management tools, check out SQL Server Profiler. If you are using Linq 2 Sql, check out http://l2sprof.com/home

    Also, I think you can force parameterization in Sql 2008. Not sure exactly how to do this.
    I tried out the Profiler and for some reason it showed no queries or stored procedure occurrences. (?)

    Something's wrong here.

    I'm downloading the l2sprof now. I'll give it a go.

    edit - same results. zero queries. :shrug:

  4. #4
    Chopped Liver bronze trophy imaginekitty's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    1,494
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I got the profiler working. I must have missed a checkbox somewhere.

    Everything seems to be parameterized properly.

  5. #5
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,649
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    One trick is that if your app is using a user instance, it isn't the same connection as something like localhost/sqlexpress.


Bookmarks

Posting Permissions

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