Home
Blog
About
Database administration
Operating systems
Development
Links


Following require login:
ScratchPad



Locations of visitors to this page


October 2011

2011-10-07

Did you know #6

In SQL Server, you can easily find details for an object by querying the local sysobjects table.
To find an object in all databases on a server you can use sp_MSforeachdb, e.g.

1> exec sp_MSforeachdb "Select '?' as dbname,* From [?]..sysobjects where name like '%55111Q%'"
2> go

Copyright HandyDBA 2012