Basically, this script is very useful for SQL Server DBA. You can find any text, comments, object in SQL Server.
Below is a different Demo script.
/*Find any text or object in SQL Server Objects*/
SELECT *FROM sys.objects
WHERE OBJECT_DEFINITION (OBJECT_ID) LIKE '%tbl_Employee%'
/*Find any text or object in SQL Server Comments*/
SELECT DISTINCT sysob.name
FROM syscomments AS sysco
INNER JOIN sysobjects AS sysob ON sysco.id=sysob.id
WHERE sysco.TEXT LIKE '%Order%'
/*Find any column in database*/
WHERE COLUMN_NAME LIKE '%<Your Column Name>%'
Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.
If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.
I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.