Nov 122010

Just one of the various niggles in the SQL Server Management Studio 2008, if by mistake you set up a user and fail to uncheck the “enforce password policy” box (you may have good reason for this, but if you’re on a dev machine as I was it’s a bit of overkill I think), you may encounter access problems when accessing the system from for example a scripting language like Coldfusion or PHP.  In the case of Coldfusion the error looks like:

[Macromedia][SQLServer JDBC Driver][SQLServer]Login failed for user ‘cf_user’. Reason: The password of the account must be changed.

At this point it’s reasonably obvious that you must go in and change the user properties under Security > Users in SSMS.  However, havign created the user when one tries to remove this check box you will encounter (always I think)

The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON.

This is a bug in the software, and while it is possible to actually change the password programatically thus:

USE Master
ALTER LOGIN [somelogin] WITH PASSWORD = ‘samepassword’
ALTER LOGIN [somelogin] WITH

If you want to just reset this policy the easiest way is to just delete the user and then create it again making sure to leave the enforce password policy unchecked first time around.  There will be no problem saving it initially thus.

Oct 202010

OK if you’ve installed Apache on Windows of any flavour you’re used to the occasional weird thing happening and preventing it from working, one of the most annoying is the ubiquitous “Cannot open logs” error in the System event log.  This invariably means that something is listening on Port 80.  To prove this for yourself you can go to your run command and enter:

netstat -o -n -a | findstr 0.0:80

The last number here is the process ID using it.  This is most often IIS or other web relates service and is easy to resolve, but every so often (very often it would seem looking around on google) it appears to be PID 4 – which according to the Windows Task Manager is the NT Kernel and System.  Not very helpful given killing this will result in a blue screen of death.  Anyway tonight after much fiddling around I discovered that the thing that was hogging port 80 was nothing to do with IIS or web anything, it was SQL server reporting services.   I turned off anything that resembled a SQL server services and voila Apache started again, no need for a reboot which had hitherto been my only solution.  So problems with PID 4 listening to port 80?  Check your SQL services and turn them off!

Addendum to  PID 4 listening to port 8 – Apache cannot start

Thanks to Tauseef  below who has also mentioned that “A new service called “Web Deployment Agent Service” (MsDepSvc) can also trigger “System” with PID=4 to listen on port 80.”

Bharat below (thanks Bharat) has also contributed “Web Deployment Agent service was triggering “System” with Port id= 4 to use Port 80. I disabled it in Services, changed back to Port 80 in Apache config and bingo, Apache started working on its default port. Then I uninstalled Microsoft Web Deploy 2.0 to permanently remove this problem.

Sanoop says (Thanks!) – ‘For me the service “branch cache” had hold of port 80.’