Monday, March 19, 2012

Database Search

Hi

I would like to know whether any tools are there to search in a database. Ex. i am using sql server2005 and in my db, more than 1000 tables r there.

i want to search for a perticular column. This search should be on tables, sps, functions, triggers....etc.

If anybody aware of any tool for this or any code in dotnet to develop such tool, pls let me know.

Regards

Sanjay

There may be tools .. I dont know. But you can use System tables to seach for columns .. if you want to go with Plain SQL .. ( may be create your own Tool )

System Tables ..

- Sysobjects
- Sysindex
- Syscolumns ETC...

|||

Hi

As u said, using system tables is ti possible to search in stored procedures, functions, ...etc

Regards

Sanjay

|||

Hi,

This may help you, please try this out.

select*from sysobjects s

innerjoin syscolumns con s.id= c.id

where c.namelike'%user%'--and s.xtype like 'p'

Thanks

Gaurang Majithiya

No comments:

Post a Comment