MSSQL System dynamic management views

This page is about dms in mssql that I want to remember. The leanguage is in english as a little contribution to the internet community. The plan is to actualize everytime I say: „Hmm, useful.“

sys.dm_exec_describe_first_result_set

  • – shows dataset (query result set) create ddl statement
  • – This function is used in INTO statement I guess
  • – https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-exec-describe-first-result-set-transact-sql

Find fulltext in procedures

use <<what db to search>>   
go

select * from sys.objects o 
join sys.sql_modules m on (m.object_id = o.object_id)
where 1=1 
and m.definition like '%<<string to search>>%'

 





Leave a Comment

Napsat komentář

Vaše emailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *