

SELECT sql.text, qs.EXECUTION_COUNT, qs.*, p.* 
FROM sys.dm_exec_query_stats AS qs 
CROSS APPLY sys.dm_exec_sql_text(sql_handle) sql
CROSS APPLY sys.dm_exec_query_plan(plan_handle) p

select * from sys.dm_exec_plan_attributes(0x06000900DBE52F19B8611D05000000000000000000000000)

select * from

dbcc freeproccache
dbcc dropcleanbuffers

create login bob with password = 'StrongPW1'

create schema foo authorization bob
alter user bob with default_schema = foo

create user bob for login bob
grant select on dbo.authors to mary, bob

execute as user='bob'
select * from sysobjects where type = 'U'
revert

grant view definition on schema::dbo to bob


select * from information_schema.tables

select * from sysobjects where type = 'U'

select * from sys.tables


