Bruce,
We found that our website database had SQL Injection. We actually found it the first time a week ago and looked through couple of the tables, found scripts and fixed these tables. On Friday last week I was not there, but I found the site working OK.
Today we had the same problem. It's hard to tell if some tables were left unclean from the previous attack or it's a new one. I went through each table in the database and cleaned up the data (manually with update commands). I'm not sure that's a good measure, though.
On Monday we're going to figure out a plan to prevent these problems.
So, I was looking for a way to find out all tables all fields that may have < script > in them.
>>Hi everybody,
>>
>>How can I check all tables for some data in them?
>>
>>Thanks in advance.
>
>
>Can you describe a little better what you want?
>
>This query will return an approx row count for each table
>
>
>SELECT
> CONVERT(VARCHAR(30), OBJECT_NAME(id)) [Table Name],
> rows
>FROM sysindexes WITH (NOLOCK)
>WHERE object_name(id) NOT LIKE 'sys%'
> AND indid = 1
>ORDER BY 2 DESC
>
>
>or, are you looking for specific data?
If it's not broken, fix it until it is.
My Blog