September 5, 2016 at 3:06 am
Comments posted to this topic are about the item Simple Object and String Search within Objects
Thanks & Regards, Kartik M Kumar..
September 26, 2016 at 12:54 am
This is fantastic. Thank You
I often search for things, but change the DB manually.
I often search for column names as well, so took the liberty in adding the below in your coding format to search for column names as well.
Set @Command = ''
Set @command = N'Insert into ##t001 Select ''[?]'' DataBaseName, o.name+'' - ''+c.name Object_name,''Column'' ObjectType, ''''
from [?].sys.objects o Join [?].sys.columns c On c.object_id = o.object_id where c.name like ''%'+@SearchText+'%'''
Execute sp_MSforeachdb @command, N'?'
September 26, 2016 at 7:13 am
Nice script. I will have a use for this. Thanks.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy