October 2010 Entries

I've encountered a LOT of posts on this--some of them represent a LOT of unnecessary work.

Here's the simple way:

1. Navigate to Administrative Tools.

2. Go to Internet Information Services (IIS)

3. If you last looked at something, Navigate to ABOVE your server name -- where it says "Internet Information Services"

4. Look to the right. You should see something that looks like this:

computer                         local              version
--------------------------       -------            -------------
YourComputerName                 yes                IIS V6.0


You're DONE!


The sys.tables and sys.columns objects will return this information for you. The following SQL statement will bring bring back all the colunns in all the tables ordered by the table name then the column name.



tbl.name AS table_name,


(schema_id) AS schema_name,


.name AS column_name


sys.tables AS tbl


JOIN sys.columns col ON tbl.OBJECT_ID = col.OBJECT_ID


BY schema_name, table_name;








The objects that help you find this info in SQL Server are in sys.tables and sys.columns

SELECT tbl.name AS table_name,
SCHEMA_NAME(schema_id) AS schema_name
col.name AS
FROM sys.tables AS
INNER JOIN sys.columns col ON tbl.OBJECT_ID = col.
WHERE col.name LIKE
ORDER BY schema_name, table_name;

This will bring back every table that has a reference to '%YourColumnNameHere%'