PDA

View Full Version : SQL Server, query all tables, possible?


bermanbp
06-09-2008, 04:31 PM
Hello,

I am helping out with a MSSQL that was hit with a sql injection attack. Which inserted script tags into many varchar fields. I was wondering if there was an easy way to search all varchar fields from ALL tables for this script. This is a rather large database and searching each column one by one would be very tedious.

Any tips/advice would be appreciated.

Thanks,
Brett

Brandoe85
06-09-2008, 10:08 PM
That's unfortunate. You can do this with using the Information Schema - here:
http://msdn.microsoft.com/en-us/library/ms186778.aspx

Good luck;