Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find Strings in DB

Status
Not open for further replies.

Ringers

Technical User
Feb 26, 2004
180
0
0
AU
Hi All,

I have started a new job and there is no DBA and anyone who knew anything about the Dimension and DB's here is gone. I have been asked to write reports based on the old excel spreadsheets, which is fine but trying to a piece of data in a dimension or across multiple instance and DB's is a real pain.

Does anyone know of a way to search a DB or Multiples DB's for a string such as 'Contact Centre'?

Thanks in advance.
 
Lots of dynamic SQL using the undocumented procedure sp_MSforeachdb and sp_MSforeachtable. You'll need to get the list of columns to search by using the sys.columns table. Look for any columns which have a data type which can support text values.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration)
MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI)
MCM (SQL 2008)
MVP

My Site
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top