Friday, October 27, 2006

SQL Server: Search for a Column Name in a Database

SELECT TABLE_NAME,COLUMN_NAME
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
COLUMN_NAME LIKE '%column%'
ORDER BY TABLE_NAME

Windows 2003 Server - IIS 6.0: Service Unavailable When Using Custom Account for Identity

When you try to use a custom account to have the application pool in IIS 6.0 run its identity, it's very likely that you'll end up with the following error: Service Unavailable.

This error is not descriptive enough as the reasons could be plenty. If you go to the application pool, you'll find that it has been disabled. The event log gives that clue with this error:

A failure was encountered while launching the process serving application pool 'Name of Applicaiton Pool'. The application pool has been disabled.

In order to solve this problem, you need to go Administritive Tools --> Local Security Policy. Go to Security Settings --> Local Policies --> User Rights Management, look for 'Logon as a service', click on Properties, and add the user account you are trying to use as a service account.

I've read that you have to restart the server after making these changes. I've also been told that adding that account to the IIS_WPG group would automatically give that right to the user account. I haven't tested the latter option (it's possible that restarting the service automatically adds the user to IIS_WPG).