473,856 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Connection settings for SQL Server 2000

It is recommended that the following settings be set for all
connections so that the optimizer will perform well on indexed views
and stuff.

SET QUOTED_IDENTIFI ER ON
SET ARITHABORT ON
SET CONCAT_NULL_YIE LDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
SET NUMERIC_ROUNDAB ORT OFF

I am using ASP.NET and SqlClient. What is the best method ensure
these settings on each connection? I am not always able to control
the settings from the server side since some clients already have
restrictions on how these should be set.

Thanks
Nov 18 '05 #1
1 1437
use stored procs, and build the procs with these settings. if the proc uses
dynamic sql, explicitly set in the sp.

-- bruce (sqlwork.com)

"Calvin Slater" <Ca***********@ Hotmail.com> wrote in message
news:ec******** *************** ***@posting.goo gle.com...
It is recommended that the following settings be set for all
connections so that the optimizer will perform well on indexed views
and stuff.

SET QUOTED_IDENTIFI ER ON
SET ARITHABORT ON
SET CONCAT_NULL_YIE LDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
SET NUMERIC_ROUNDAB ORT OFF

I am using ASP.NET and SqlClient. What is the best method ensure
these settings on each connection? I am not always able to control
the settings from the server side since some clients already have
restrictions on how these should be set.

Thanks

Nov 18 '05 #2

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

Similar topics

5
6667
by: Jesper Carstensen | last post by:
We are running an ASP application. That is fairly simple. It selects from one table (15.000 records), and updates into another table. But when we execute the ASP script, it reports the following error, after completing between 70%-80%. This varies each time it runs "Microsoft OLE DB Provider for SQL Server error '80004005'
3
5303
by: Florian | last post by:
I need to set multiple values for some SQL statements, for example SET NUMERIC_ROUNDABORT OFF GO SET ANSI_PADDING,ANSI_WARNINGS,CONCAT_NULL_YIELDS_NULL,ARITHABORT,QUOTED_IDENTIF IER,ANSI_NULLS ON GO in a .sql file, but would like to reset them to their previous settings
6
2164
by: H | last post by:
This is a question that has haunted me for quite some time. if you build a 4 tier database application where the 4th tier is the database server (MS SQL 2000), where do you build the connection string? The obvious answer is to hard code it into the middle layer and use a config file. The problem is the database application needs to be distributed to purchasing clients. Therefore, you do not know, at development, what the SQL
5
1808
by: Dave Dudley | last post by:
Hi, I have a new ASP .Net project that has been developed on our development machine and connects to SQL Server 2000 on the same machine. It is connecting via a connection string similiar to: Data Source=;Initial Catalog=;uid=;Password=
7
1533
by: Keith Norris | last post by:
I cannot successfully create a connection object in a web form. In the page_load event I try the following code: Dim sConnection As String = "server=MIDATLANTICUS;" & _ database=Pubs;integrated security=SSPI" Dim conTest As New SqlConnection conTest.ConnectionString = sConnection conTest.Open() conTest.Close()
4
1407
by: William | last post by:
I am using SQL MSDE edition due to financial reasons (it's free). I have a question regarding connection strings. Almost every publication, online example or website uses some version of the following connection string: data source=localhost;initial catalog=pubs;user id=sa and it seems to work for them. However, in my particular setup I have to use either the server name or '(local)' including the parenthesis. Any deviation returns...
4
1215
by: Pieter | last post by:
Hi, I have some nasty error when deploying my application (VB.NET 20002) on the users-computers. I'm using an SQL 2000 database. The problem I guess is the fact that I had a local SQL 2000 and a local SQL 2005. I used to develop on a network SQL 2000 (the same which the users are connecting too), and everything works fine. But now I am not in the office for 2 weeks, so I have to develop on my local SQL 2000 instance. I send them
5
8527
by: Mitya Mitriev | last post by:
Hi I created ASP.NET 2.0 web application that uses SQL Server 2000 database and it works perfectly when website and Sql server were on local machine. Then I installed application on production server. Database is placed on another server. I received the error: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings...
5
7706
by: OJ | last post by:
Hi, I am at a loss here, I have a c# asp.net website which connects to a remote SQL Server 2000 db via a connection string. If I set the website up in the filesystem and use the inbuilt cassini webserver in VS2005 then everything is rosy. If I then set up the website on the local IIS 5.1 the site no longer connects and returns this error: An error has occurred while establishing a connection to the server. When connecting to SQL Server...
1
12546
by: Vikram S | last post by:
Hi All, I have an ASP.NET 2.0 web application on a web server and a separate machine for SQL Server 2000 Database. I am using a Connectionstring based on Sql Authentication to connect to the the SQL 2000 Database. Now, When I open the web page on the Web Server itself, I am able to successfully connect to the Database which confirms that the connection string is correct. However when I open the same web page from another client
0
9919
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11061
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10699
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9534
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7932
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5960
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4578
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4176
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.