April 23, 2013 at 1:53 am
Hi.
If I execute the sys.dm_exec_query_stats I get back dbids like f.e. 32512 which I can't resolve with db_name. Which database is referenced here?
Greetz
Query Shepherd
April 23, 2013 at 2:18 am
32767, the system resource database.
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 23, 2013 at 3:04 am
Could you explain this a bit more in detail, what the system resource db is and why it is used?
But then I ask myself why allmost 99% have not dbid 5, as it should be? All the statments gets fired against the database having the dbid 32512?
Greetz
Query Shepherd
April 23, 2013 at 3:28 am
http://www.google.com/search?q=What+is+the+system+resource+database
DBID 32767, no all commands do not run against it. But then, why do you think most queries in cache should have run against database 5?
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 23, 2013 at 7:06 am
Because this is the database the statements should refer?
Greetz
Query Shepherd
April 23, 2013 at 8:31 am
Go and take a look at what the commands are that reference that hidden DB. You'll notice that there's no references to user tables, no user procedures, they'll all be system views/procedures/tables.
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 23, 2013 at 8:36 am
Sorry gail, but this are the normal queries that should be executed on my production db pointing to this weird dbid...
...ah maybe this is correlated tp the sp_executesql-usage?
Greetz
Query Shepherd
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply