SET NO_BROWSETABLE ON ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • raymond_b_jimenez@yahoo.com

    SET NO_BROWSETABLE ON ?

    I've noticed in my .NET application (with ADO) that whenever a query
    is done to SQL Server, a query executing
    SET NO_BROWSETABLE ON
    is done before.
    This has an huge impact on performance, as the round-trip to the
    server takes the same time as the correct query. I believe that if
    "SET NO_BROWSETABLE ON" wasn't executed, performance would almost
    double and network traffic would be reduced.
    I've tried to find a reasonable answer on the net for this, but
    haven't managed. Has someone noticed this and knows how to correct it?

    rj

  • Bob Barrows [MVP]

    #2
    Re: SET NO_BROWSETABLE ON ?

    raymond_b_jimen ez@yahoo.com wrote:
    I've noticed in my .NET application (with ADO)
    Classic ADO? I.E., with ADODB?
    or ADO.Net?

    I was going to paste in my standard "dotnet" reply, but I just noticed
    that you crossposted to some dotnet groups. You need to be aware that
    classic (non-dotnet) ado and ado.net are two very different things. This
    question is off-topic in one of the ado groups you included in your
    crosspost. It is also off-topic in the sqlserver.serve r group. Since I
    am posting via msnews, this reply will not likely make it to the comp
    group. When you follow up to this, please remove the off-topic groups
    from your post.

    that whenever a query
    is done to SQL Server, a query executing
    SET NO_BROWSETABLE ON
    is done before.
    This has an huge impact on performance, as the round-trip to the
    server takes the same time as the correct query. I believe that if
    "SET NO_BROWSETABLE ON" wasn't executed, performance would almost
    double and network traffic would be reduced.
    I've tried to find a reasonable answer on the net for this, but
    haven't managed. Has someone noticed this and knows how to correct it?
    I've never noticed this, but i am sure the technique used to execute
    your queries might have something to do with it. Be sure to post a small
    repro script to whichever group you follow up with

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Comment

    • Bob Barrows [MVP]

      #3
      Re: SET NO_BROWSETABLE ON ?

      raymond_b_jimen ez@yahoo.com wrote:
      I've noticed in my .NET application (with ADO) that whenever a query
      is done to SQL Server, a query executing
      SET NO_BROWSETABLE ON
      is done before.
      This has an huge impact on performance, as the round-trip to the
      server takes the same time as the correct query. I believe that if
      "SET NO_BROWSETABLE ON" wasn't executed, performance would almost
      double and network traffic would be reduced.
      I've tried to find a reasonable answer on the net for this, but
      haven't managed. Has someone noticed this and knows how to correct it?
      >
      This may help:

      --
      Microsoft MVP -- ASP/ASP.NET
      Please reply to the newsgroup. The email account listed in my From
      header is my spam trap, so I don't check it very often. You will get a
      quicker response by posting to the newsgroup.


      Comment

      • Erland Sommarskog

        #4
        Re: SET NO_BROWSETABLE ON ?

        (raymond_b_jime nez@yahoo.com) writes:
        I've noticed in my .NET application (with ADO) that whenever a query
        is done to SQL Server, a query executing
        SET NO_BROWSETABLE ON
        is done before.
        This has an huge impact on performance, as the round-trip to the
        server takes the same time as the correct query. I believe that if
        "SET NO_BROWSETABLE ON" wasn't executed, performance would almost
        double and network traffic would be reduced.
        I've tried to find a reasonable answer on the net for this, but
        haven't managed. Has someone noticed this and knows how to correct it?
        Which .Net Data provider do you use?

        ADO (the one is not worthy to be called Classic, but which is not .Net)
        spits this out, and it is about impossible to stop.

        SqlClient does not send this by default, if you use CommandBehaviou r.KeyInfo
        it does.


        --
        Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

        Books Online for SQL Server 2005 at

        Books Online for SQL Server 2000 at

        Comment

        • raymond_b_jimenez@yahoo.com

          #5
          Re: SET NO_BROWSETABLE ON ?

          On 29 Ago, 22:38, Erland Sommarskog <esq...@sommars kog.sewrote:
          >
          SqlClient does not send this by default, if you use CommandBehaviou r.KeyInfo
          it does.
          >
          For all the docs I've seen till now, KeyInfo really seems like the
          most interesting option. A couple of remarks:
          1-I use an ExecuteReader with no parameters, so no CommandBehavior is
          being used.
          2-I do not see any "SET FMTONLY OFF" being executed, despite some
          people complaining about that on the net. If one sees
          Provides a description of the results of the query and its effect on the database.

          it would also be appearing in my case.

          I'm now looking into the SqlCommand and SQLConnection classes to see
          if something can make the "SET NO_BROWSETABLE ON" disappear. Anyone
          got a clue?

          rj

          Comment

          • Erland Sommarskog

            #6
            Re: SET NO_BROWSETABLE ON ?

            (raymond_b_jime nez@yahoo.com) writes:
            For all the docs I've seen till now, KeyInfo really seems like the
            most interesting option. A couple of remarks:
            1-I use an ExecuteReader with no parameters, so no CommandBehavior is
            being used.
            2-I do not see any "SET FMTONLY OFF" being executed, despite some
            people complaining about that on the net. If one sees
            Provides a description of the results of the query and its effect on the database.

            it would also be appearing in my case.
            >
            I'm now looking into the SqlCommand and SQLConnection classes to see
            if something can make the "SET NO_BROWSETABLE ON" disappear. Anyone
            got a clue?
            Since I don't see SET NO_BROWSETTABLE ON in my test setup, it's a bit
            difficult to advice. Maybe you can post a sample program which produces
            the dreaded NO_BROWSETABLE? Preferrably this should be a simple
            command-line program without GUI.


            --
            Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

            Books Online for SQL Server 2005 at

            Books Online for SQL Server 2000 at

            Comment

            • raymond_b_jimenez@yahoo.com

              #7
              Re: SET NO_BROWSETABLE ON ?

              There is some hope... I've put my code in a new test environment, and
              it does not issue "SET NO_BROWSETABLE ON". I've debugged the situation
              further, and found some interesting differences doing some networking
              debugging (using Wireshark):

              -When I connect in the production environment, the one that gets "SET
              NO_BROWSETABLE ON", the "App Name" is set to "Microsoft (R) .Net
              Framework" and "Library Name" is set to OLEDB
              -When I connect in the testing environment, both "App Name" and
              "Library Name" are set to ".Net SqlClient Data Provider".

              The "App Name" that appears in Wireshark is the same that appears in
              SQL Profiler.

              An adapted code example follows:
              -----------------------------------------
              Dim SQLConx As SqlConnection = New SqlConnection
              Dim SQLCom As SqlCommand = New SqlCommand
              Dim SQLDR As SqlDataReader

              Try
              SQLCom.Connecti on = SQLConx
              SQLCom.CommandT ype = System.Data.Com mandType.Stored Procedure
              SQLCom.CommandT ext = "myStoredProced ure"
              SQLCom.Paramete rs.Add("@param" , _param)
              SQLConx.Connect ionString = SQLConnectionSt ring
              SQLConx.Open()
              SQLDR = SQLCom.ExecuteR eader()
              SQLConx.Close()
              Catch exc As Exception
              -----------------------------------------

              What's stranger is the OLEDB reference. I'm not using it in my code,
              but it appears in the network trace. What might I be missing?

              rj

              Comment

              • Erland Sommarskog

                #8
                Re: SET NO_BROWSETABLE ON ?

                (raymond_b_jime nez@yahoo.com) writes:
                -When I connect in the production environment, the one that gets "SET
                NO_BROWSETABLE ON", the "App Name" is set to "Microsoft (R) .Net
                Framework" and "Library Name" is set to OLEDB
                Apparently you are using OleDbConnection etc in production. With OleDb
                Client you may experience NO_BROWSETABLE more often.




                --
                Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

                Books Online for SQL Server 2005 at

                Books Online for SQL Server 2000 at

                Comment

                Working...