Comments (8)
I've actually seen this when the user's database context is something else - for example, say they're executing the query from master, but querying objects in another database. The overall session's isolation level really is Read Committed (because it's run from master), but people think it's supposed to be RCSI because they're querying objects in other databases.
If you run into a situation where you can prove that the DMV's results are wrong, and you can reproduce it with a query, I'd definitely love to hear about it and we can go from there. But otherwise, until I see proof, I hate to say this, but I have to assume it's what I mentioned in the first paragraph.
from sql-server-first-responder-kit.
Hi Brent,
Thank's a lot for this informative answer.
What whe have done to progress with this issue is adding the column r.database_id in the output of the sp_BlitzWho stored procedure.
For the case we have capture with the bad value for the isolation level, r.database_id is indeed null.
This is not a suprise since a left join is done on sys.dm_exec_requests AS r.
Best regards.
from sql-server-first-responder-kit.
OK, cool, there we go! Good work, glad to hear it.
from sql-server-first-responder-kit.
Will the sp_BlitzWho procedure be modified to correct that bug Brent?
from sql-server-first-responder-kit.
Sorry, I'm not understanding what the bug is? If r.database_id is null, I don't understand what change you'd want us to make.
You might want to submit a pull request with the changes you're proposing?
from sql-server-first-responder-kit.
To be consistant :
Instead of having this line:
WHEN s.transaction_isolation_level = 2 AND EXISTS (SELECT 1 FROM sys.databases WHERE name = DB_NAME(r.database_id) AND is_read_committed_snapshot_on = 1) THEN ''Read Committed Snapshot Isolation''
Maybe this line would be better:
WHEN s.transaction_isolation_level = 2 AND EXISTS (SELECT 1 FROM sys.databases WHERE name = COALESCE(DB_NAME(r.database_id), DB_NAME(blocked.dbid), ''N/A'') AND is_read_committed_snapshot_on = 1) THEN ''Read Committed Snapshot Isolation''
Since this logic is used at some other places in this stored procedure.
from sql-server-first-responder-kit.
OK, can you make the changes you want to see in the proc, and then test them in your environment first to make sure you're getting the results you desire?
You're asking me to change something that I don't see, can't reproduce, etc. By all means, I want to help, but I need you to help me too. Is that fair?
from sql-server-first-responder-kit.
It is fair Brent.
Best regards
from sql-server-first-responder-kit.
Related Issues (20)
- sp_BlitzFirst: add warning about approaching max worker threads
- sp_BlitzFirst: plan cache results show up when they shouldn't
- Installing sp_DatabaseRestore produces a ton of warnings about CommandExecute
- Deprecating sp_AllNightLog, sp_BlitzInMemoryOLTP, and sp_BlitzQueryStore
- sp_BlitzFirst: better Azure SQL DB start time detection
- Missing entry in master.dbo.SqlServerVersions table HOT 1
- sp_BlitzFirst: Wait Stats Details does not display correct number of seconds that the server spent waiting HOT 4
- Inserted columns are incorrect (probably just swapped) in a couple of places HOT 1
- Name column from sys.schemas accessed using [NAME] rather than [name] HOT 1
- Database count does not exclude all databases that will be excluded HOT 1
- Can DB_NAME() ever return a different value to sys.databases.name? HOT 1
- Typos in the index script HOT 1
- DROP TABLE IF EXISTS is use, but Blitzindex should be compatibel with SQL Server 2014 and below HOT 1
- sp_BlitzIndex fails if you don't have permissions to query sys.sql_expression_dependencies
- sp_BlitzLock - Add the ability to filter to a specific type of deadlock
- sp_Blitz: Add more Query Store best practice checks. HOT 2
- sp_BlitzIndex has dependency on depricated procedure sp_BlitzInMemoryOLTP HOT 1
- README.md: sp_AllNightLog is still in the table of contents HOT 3
- sp_DatabaseRestore: Add param to enable service broker on restore HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sql-server-first-responder-kit.