April 29, 2009 at 2:13 pm
I see a performance boost when i use READ UNCOMMITTED and want to use it on all my servers where database are used only for reading, we do not write anything there, all updates will be done in staging server and pushed to production and so i am not worried about dirty reads.
How would i setup READ UNCOMMITTED at server level or any other ways so that evry user log into the server and tried to read the data it shud be under this isolation level instead of explicilty setting this option for each session.
April 29, 2009 at 2:22 pm
Tara (4/29/2009)
How would i setup READ UNCOMMITTED at server level or any other ways so that evry user log into the server and tried to read the data it shud be under this isolation level instead of explicilty setting this option for each session.
Why not just set the database(s) to read-only, in that case.
ALTER DATBASE your_database_name_here SET READ_ONLY
April 29, 2009 at 2:23 pm
If you don't do any changes at all, mark the databases as readonly and SQL will take no locks when querying it.
There's no other way to make read uncommitted the default, for good reason. It can result in incorrect results if the tables are actually been modified.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 29, 2009 at 2:23 pm
I'm not sure if you can achieve it on a server or db level setting, I'd be interested to know as well,. but one thing you can do to help speed up reads a bit is to create a readonly filegroup and move your data there.
_____________
Donn Policarpio
April 29, 2009 at 2:44 pm
Does it mean unless i make the database READ ONLY, i can set the isolation at server level or database level??
April 29, 2009 at 3:00 pm
The only isolation level that you can set at a database level is Read Committed Snapshot (the optimistic concurrency version of read committed). Other than that, isolation levels are set on a connection level and have to be done for each connection.
If a DB is read only, there's no need for SQL to take locks as nothing can change. Hence any queries against that DB essentially run as if they were in read-uncommitted isolation level
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 29, 2009 at 3:41 pm
when you say connection level how do i do that? do u mean session level. can i set someone to this isolation when he logs in with rdp session.
April 29, 2009 at 3:59 pm
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
That's on a SQL connetion, not a rdp connection.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 29, 2009 at 4:39 pm
I don't understand why you want to do that but here is a shot.
If that person using RDP is going to use SSMS you can set the default Isolation level for the connections to Read uncommitted under:
Tools->Options->Query Execution->SQL Server->Advanced -> SET TRANSACTION ISOLATION LEVEL
* Noel
April 29, 2009 at 4:48 pm
noeld
i think that is waht i was looking but when i set there does it apply to whole sql server on that box?
April 29, 2009 at 7:29 pm
Nope, it justs applies to connections opened thru tht SSMS.
MJ
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply