Here is an annoying problem. You are dealing with dozens of SQL Server databases and you are looking for a particular table in one of the databases. How can you find the table? Do you click through all of the databases to find the one that houses that table?
Here is a simple query to find a table:
declare @tableName varchar(200) = ‘Sales.SalesOrderDetail’;
Select name as DatabaseName from sys.databases
where Object_ID(QUOTENAME(name) + ‘.’ + @tableName ) is not null;
I have not tested whether there are permission issues with the script or not. As soon as I get my SQL Server running again, I will test this.