On Denali I saw many negative ObjectID values in sys.all_objects. Here is how I found out that each local temp table gets a negative ObjectID.
Finding Every Object That Uses a Column
Find an object that uses a column with dependency metadata and module text search, then check dynamic SQL and application code.
SQL SERVER – System Stored Procedure sys.sp_tables
Most people run SELECT * FROM sys.tables to list tables. If you do not need all those details, sys.sp_tables returns tables and views with schema names.
SQL SERVER – Find Total Number of Transactions on Interval
How many Transactions run on your server per minute? A handy script reads sys.dm_os_performance_counters twice with a WAITFOR DELAY between the reads.
SQL SERVER – Get Query Running in Session
I forgot the simple syntax to get query running in session and ended up on my own old post. Here is the one method I use most during performance tuning.
SQL SERVER – Check the Isolation Level with DBCC useroptions
What isolation level is your session using? Run DBCC useroptions to see it, along with dateformat, datefirst, language and other SET options.
SQL SERVER – Find Max Worker Count using DMV – 32 Bit and 64 Bit
Does doubling the CPUs double the worker threads? No. Use sys.dm_os_sys_info to find Max Worker Count, and see the formula for 32 bit and 64 bit.






