Hi @ACDBA
To find a table or a proc in the SQL across all databases you can use undocumented stored procedure sp_MSForEachDB.
Check this :
CREATE TABLE #temp_table ( type varchar(100), name varchar(100),database_name varchar(100))
EXEC sp_msforeachdb 'USE [?]; INSERT INTO #temp_table select type_desc, name,''?'' from sys.procedures WHERE name = ''name_to_find'''
EXEC sp_msforeachdb 'USE [?]; INSERT INTO #temp_table select type_desc, name,''?'' from sys.tables WHERE name = ''name_to_find'''
SELECT * FROM #temp_table
Best regards,
LiHong
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.