Search This Blog

Wednesday, September 19, 2007

MSSQL, - 2005 - search in the code of Store procedure,function, views and triggers

We had an sql function that we didn't know if is used for anywhere, so we decided to remove it. There was no reference to the store procedure in our code so the only place remaining was the sql store procedures, functions and triggers and views

To do this we use the sql query


select *
from sys.objects
where type_desc in ('SQL_SCALAR_FUNCTION','VIEW','SQL_STORED_PROCEDURE',
'SQL_SCALAR_FUNCTION','SQL_TRIGGER')
and OBJECT_DEFINITION (object_id) like '%MinPricePreCovered%'

No comments: