Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
laddu
Constraint Violating Yak Guru
332 Posts |
Posted - 2009-12-16 : 18:04:01
|
How to know the default isolation level of sql server thru MANAGEMENT STUDIO |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2009-12-17 : 07:27:50
|
dbcc useroptions |
 |
|
laddu
Constraint Violating Yak Guru
332 Posts |
Posted - 2009-12-17 : 08:49:42
|
quote: Originally posted by lionofdezert dbcc useroptions
@tkizer@lionofdezertThanks for your reply.DBCC useroptions is know for each database isolevel level or server level.I am trying to understand the below scriptBEGIN-- Do not lock anything, and do not get held up by any locks.SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED-- What SQL Statements Are Currently Running?SELECT [Spid] = session_Id, ecid, [Database] = DB_NAME(sp.dbid), [User] = nt_username, [Status] = er.status, [Wait] = wait_type, [Individual Query] = SUBSTRING (qt.text,er.statement_start_offset/2,(CASE WHEN er.statement_end_offset = -1THEN LEN(CONVERT(NVARCHAR(MAX), qt.text)) * 2ELSE er.statement_end_offset END -er.statement_start_offset)/2),[Parent Query] = qt.text, Program = program_name, Hostname, nt_domain, start_timeFROM sys.dm_exec_requests erINNER JOIN sys.sysprocesses sp ON er.session_id = sp.spidCROSS APPLY sys.dm_exec_sql_text(er.sql_handle)as qtWHERE session_Id > 50 -- Ignore system spids.AND session_Id NOT IN (@@SPID) -- Ignore this current statement.ORDER BY 1, 2ENDWhat happens if we use read uncommited, any impact on production database? or above script is for only query?Is there any other ways to find out the slow running queries, If you would help me, really I really it. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
laddu
Constraint Violating Yak Guru
332 Posts |
Posted - 2009-12-17 : 10:40:59
|
When you say SQL Profiler what counters we need to add to find out, sorry kind of new to this |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|
|