Created
October 26, 2015 22:29
-
-
Save andyj/653b74ce491dc33dd9a0 to your computer and use it in GitHub Desktop.
Search all MSSQL databases on a server for a table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sp_MSforeachdb 'SELECT "?" AS DB, * FROM [?].sys.tables WHERE name like ''%tableNameYouAreSearchingFor%''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment