472,958 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How does one set read-uncommitted on the entire DB?

Rather than setting by session I would like to configure the DB as read
uncommitted.

Thanx Advance.
Mar 1 '06 #1
5 8707
Robert (ro***********@boeing.com) writes:
Rather than setting by session I would like to configure the DB as read
uncommitted.


You can set the database read-only to eliminate locking entirely.

But else you can't do it, and that is probably a good thing. Dirty reads
is nothing you should engage in as a matter of routine. Maybe you should
review indexing in your database instead.
--
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
Mar 1 '06 #2
Thanx Erland, unfortunately read-only is not a viable option. We have be
reviewing the database and are putting in indexes and hints on the queries
to determine if the locking will become less of a problem. The users are
engaged in some practices that have been going on for awhile and there
application keeps timing out when a lock is placed on a table for more that
30 seconds. The biggest problem we have seen are the locks created by the
ad hoc queries from Access and Excel. Until we can convince the dbo to
setup an olap database or stop using Access I think the problems will
continue.
"Erland Sommarskog" <es****@sommarskog.se> wrote in message
news:Xn**********************@127.0.0.1...
Robert (ro***********@boeing.com) writes:
Rather than setting by session I would like to configure the DB as read
uncommitted.


You can set the database read-only to eliminate locking entirely.

But else you can't do it, and that is probably a good thing. Dirty reads
is nothing you should engage in as a matter of routine. Maybe you should
review indexing in your database instead.
--
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

Mar 2 '06 #3
Robert (ro***********@boeing.com) writes:
Thanx Erland, unfortunately read-only is not a viable option. We have
be reviewing the database and are putting in indexes and hints on the
queries to determine if the locking will become less of a problem. The
users are engaged in some practices that have been going on for awhile
and there application keeps timing out when a lock is placed on a table
for more that 30 seconds. The biggest problem we have seen are the
locks created by the ad hoc queries from Access and Excel. Until we can
convince the dbo to setup an olap database or stop using Access I think
the problems will continue.


Judging from your description, I don't think having a universal dirty read
would address your problem, even if it existed. The default timeout in
many client API (which is a really stupid idea, if you ask me) is not
related to locking, but the client API getting bored if does not see a
result set within 30 seconds. If this due to a complex query plan with,
NOLOCK is not going to help you. (But it may of course prevent writers
from being blocked.)

All client APIs permit you to set the timeout, but there may be a
problem if the queries are submitted without any real programming
code. You cannot set the timeout on the connect string. In ADO,
which is what you use from Access and Excel I guess, you set the
command timeout on the Connection or Command objects.

Note that query timeout is unrelated to SQL Server. All SQL Server sees
is a request to cancel the query batch.

--
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
Mar 2 '06 #4
SQL 2005 - Row level versioning works very nice for this purpose.

Mar 6 '06 #5
pb648174 (go****@webpaul.net) writes:
SQL 2005 - Row level versioning works very nice for this purpose.


Yes, snapshot isolation can be a very good way to resolve locking issues.
And note that there is a database switch: ALTER DATABASE db SET
READ_COMMITTED_SNAPSHOT ON. This changes the default isolation level of
READ COMMITTED to use the snapshot instead.

However, I got the feeling that Robert's problem rather was long-running
queries, and not blocking.
--
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
Mar 7 '06 #6

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

Similar topics

15
by: Håkan Persson | last post by:
Hi. I am trying to set up a simple HTTP-server but I have problems reading data that is beeing POSTed. class httpServer(BaseHTTPServer.BaseHTTPRequestHandler): def do_POST(self): input =...
3
by: AC Slater | last post by:
In regards to the following code: char tmp; myifstread.read(tmp,5); Does tmp = '\0' by definition? E.g. does .read put the null terminator? If not, why would it be that for months the...
4
by: Ollie Cook | last post by:
Hi, I am having some difficulty with read(2) and interrupting signals. I expect I am misunderstanding how the two work together, so would appreciate some guidance. I am trying to 'time out' a...
5
by: Arvind P Rangan | last post by:
Hi, i like to read an existing xml file which has a schema defined to it, and then write or add data to the existing xml file using vb.net/c#. May be this Question has been answered earlier....
7
by: Dave Coate | last post by:
Hi everyone, I am looking for a way to 'override' file security and read the Owner of a file to which I have no access. I am a system administrator, as such I have administrative rights to all...
3
by: Dave Coate | last post by:
Hello again, I am going to re-post a question. I got some excellent suggestions from Rob and Mattias on this but their ideas did not solve the problem. Here is the original post: ...
3
by: JenHu | last post by:
Hi, I want read line by line and characters. The characters are fix length text file, no specific delimited method between each fields. The first line is header line, the last line is footer. ...
5
by: Piotr | last post by:
I have a qestion about reading file in C++. How can I read a file line by line (i.e. putting a line ends wtih \n in a string) I tried the following, it does read the file, but it does not read...
5
by: barbara_dave | last post by:
Hi All, I need to read data from a Excel spreadsheet, but I got the problem when I tried the code below: StringBuilder sbConn = new StringBuilder();...
21
by: rahul sinha | last post by:
When you type one character and press enter, it prints two values, so it turns out that it does read "enter" from the input buffer. What does getchar actually return on reading enter? Moreover I...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.