473,385 Members | 2,243 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

Aug 29 '07 #1
7 14271
ra***************@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.server 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.
Aug 29 '07 #2
ra***************@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:
http://www.vsj.co.uk/dotnet/display.asp?id=249
--
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.
Aug 29 '07 #3
(ra***************@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 CommandBehaviour.KeyInfo
it does.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Aug 29 '07 #4
On 29 Ago, 22:38, Erland Sommarskog <esq...@sommarskog.sewrote:
>
SqlClient does not send this by default, if you use CommandBehaviour.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
http://msdn2.microsoft.com/en-us/lib...dbehavior.aspx
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

Sep 14 '07 #5
(ra***************@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
http://msdn2.microsoft.com/en-us/lib...dbehavior.aspx
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, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Sep 14 '07 #6
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.Connection = SQLConx
SQLCom.CommandType = System.Data.CommandType.StoredProcedure
SQLCom.CommandText = "myStoredProcedure"
SQLCom.Parameters.Add("@param", _param)
SQLConx.ConnectionString = SQLConnectionString
SQLConx.Open()
SQLDR = SQLCom.ExecuteReader()
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

Sep 24 '07 #7
(ra***************@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, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Sep 24 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Johnny Ruin | last post by:
Hi, Running a trace while operating my application (written in C++ w/SQLDataProvider) I'm seeing all my queries wrapped in SET FMTONLY OFF; SET NO_BROWSETABLE ON;my query here;SET NO_BROWSETABLE...
0
by: zamarrud | last post by:
Hello All, We are facing an issue with MS access ADP project (SQL SERVER 2000 on backend) in production environment. Currently 20 users are using the application and they have their own copies of...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.