SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Object Search


Object Search

Author
Message
Sean Smith (SSC)
Sean Smith (SSC)
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1492 Visits: 1012
Comments posted to this topic are about the item Object Search
Tim Edwards-235208
Tim Edwards-235208
SSC Journeyman
SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)

Group: General Forum Members
Points: 75 Visits: 379
I think it is worth noting that the @v_Search_String parameter should not contain any wildcards (i.e., %) as the stored procedure adds that to the parameter. I didn't realize that at first and was not getting anything back on my test system when I knew the string existed. Going through the code, I quickly discovered that the wildcards are added to the string in the parameter for you and my adding them caused it to read the wildcard as a literal character that was part of the search string.
Sean Smith (SSC)
Sean Smith (SSC)
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1492 Visits: 1012
When I originally designed the procedure it actually functioned the way you wanted it to. After a peer review with some colleagues, they all argued for the opposite (never can win it seems LOL). Since you've familiarized yourself with the code you should be able to adjust it to fit your needs.

Thanks for the feedback.
Tim Edwards-235208
Tim Edwards-235208
SSC Journeyman
SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)

Group: General Forum Members
Points: 75 Visits: 379
No problem. That works fine for me, just needed to figure it out and wanted to let everyone else know how to pass the search string parameter to the stored procedure so they don't run into the same thing.
Sean Smith (SSC)
Sean Smith (SSC)
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1492 Visits: 1012
Good idea and thanks for posting this. I may end up adding a "use or search" for wildcards switch in a later version. This would make it more flexible.
Douglas Osborne-229812
Douglas Osborne-229812
Old Hand
Old Hand (311 reputation)Old Hand (311 reputation)Old Hand (311 reputation)Old Hand (311 reputation)Old Hand (311 reputation)Old Hand (311 reputation)Old Hand (311 reputation)Old Hand (311 reputation)

Group: General Forum Members
Points: 311 Visits: 375
I'm not clear if this will allow for searches within SSIS packages?
Sean Smith (SSC)
Sean Smith (SSC)
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1492 Visits: 1012
Honestly, never tried (but I would think no). Sorry, haven't dealt much with SSIS packages. Try a search string that you know is in an SSIS package and see if it brings back any results. Post the results if you don't mind.
Moneer-479830
Moneer-479830
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 35
Hi, I am trying to search a string from the object definitions like this and getting no result

EXECUTE dbo.usp_Object_Search
@Search_String = N'fiscal/2'
,@Database_Name = N'Test'
,@Search_Against = 'D'

Above Test is my database name and fiscal/2 is the string in one of the stored procedures. Please help, this is looking awesome procedure if it work for my situation.
Thanks
Sean Smith (SSC)
Sean Smith (SSC)
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1492 Visits: 1012
Moneer-479830 (6/20/2014)
Hi, I am trying to search a string from the object definitions like this and getting no result

EXECUTE dbo.usp_Object_Search
@Search_String = N'fiscal/2'
,@Database_Name = N'Test'
,@Search_Against = 'D'

Above Test is my database name and fiscal/2 is the string in one of the stored procedures. Please help, this is looking awesome procedure if it work for my situation.
Thanks


Is the database in question case sensitive?
Andre 425568
Andre 425568
Mr or Mrs. 500
Mr or Mrs. 500 (514 reputation)Mr or Mrs. 500 (514 reputation)Mr or Mrs. 500 (514 reputation)Mr or Mrs. 500 (514 reputation)Mr or Mrs. 500 (514 reputation)Mr or Mrs. 500 (514 reputation)Mr or Mrs. 500 (514 reputation)Mr or Mrs. 500 (514 reputation)

Group: General Forum Members
Points: 514 Visits: 209
Does this procedure also pick up Indexes? It does not look like it in the Valid Object type list. How can I add Indexes to this search?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search