Monday, 10 December 2007

How to enable hibernate in Windows Vista

Apparently, Windows Vista prefers to use a bastardisation of standby and hibernate as a default, storing memory contents to disk as well as low powered state in RAM.

It doesn't help much if you want to power down your machine to transport it to another location though!

To re-enable hibernate use the following command as an administrator:
    powercfg -h on

See this KB article for more information.

Sunday, 9 December 2007

Moving Windows Sharepoint Services Databases in SQL 2005

I was migrating an old WSS 2.0 site on SQL 2000, to WSS 3.0 on SQL 2005, and didn't like where the default databases were being created.

I detached the databases, moved them to thier new location, and re-attached them.
This changed the owner from "NT Authority\Network Service" to my account.

I used the following SQL code to change the owner back:
  USE whichever_database
  EXEC sp_changedbowner 'NT Authority\Network Service'

Thanks to Kalen Delaney for that!