0
votes
1answer
67 views

Finding login or user name of last person to use a DB

The boss has asked for a list of DB names along with size and name of last person to use that DB. I've found resources for when a DB was last accessed but for by whom. How would I solve this? ...
4
votes
2answers
191 views

Is there a quick way to find all columns in SQL Server 2008 R2 that are encrypted/have encrypted data?

Is there a quick way to find all columns in SQL Server 2008 R2 that are encrypted/have encrypted data? I need to nullify the data in all encrypted columns in a development server (according to our ...
3
votes
3answers
133 views

Why is there a difference between these transaction DMVs in SQL Server 2008 R2?

When I execute the two queries below, SELECT session_id, transaction_id FROM sys.dm_tran_session_transactions; AND SELECT session_id, request_id, at.transaction_id FROM ...
5
votes
1answer
567 views

SQL Server 2008 R2 DMV Question

I have a query to retrieve the Top 10 queries based on total logical reads from the dm_exec_query_stats DMV. SELECT TOP 10 SUBSTRING(qt.TEXT, (qs.statement_start_offset/2)+1, ((CASE ...