July 26, 2016 at 12:00 pm
I have been given a table name HCWKP
However I have no idea which database holds the table ?
How can we write some SQL to find which database holds the table ?
July 26, 2016 at 12:09 pm
qucik google threw up this
any good for you?
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 26, 2016 at 12:14 pm
Or you could try SQL Search (free product): http://www.red-gate.com/products/sql-development/sql-search/
July 26, 2016 at 12:22 pm
Luis Cazares (7/26/2016)
Or you could try SQL Search (free product): http://www.red-gate.com/products/sql-development/sql-search/
Disclosure, I work for Redgate.
This will search all databases on your instance if you like. You'll have to connect to each instance separately, but once there, you can search in any database.
July 26, 2016 at 12:42 pm
EXEC sp_MSforeachdb 'SELECT "?" AS DB, * FROM [?].sys.tables WHERE name like ''%HENCDP%'''
This works fine
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply