Rob Gonda's Blog

ooooh nt security

wow, this I've never seen before ... a co-worker was backing up a SQL 2005 database, and somehow, he handle to delete all NTFS permissions in the mdf file... needless to say SQL couldn't open the database.

I logged in into the system and realize that is only had the SYSTEM account, so it even denied me access as an Administrator. When I tried to add permissions for the Administrators group, it said access denied, and let me choose Cancel, Retry, or Ignore ...

Solution: as weird as it sounds, if you choose ignore it will add the permissions regardless... then all you have to do is reboot and the NTFS will use the new permissions when it comes back ... amazing how M$ Windows works...

sql: view problems after altering a table

This is old news, I know ... but many people don't know it ... When using Views in Microsoft SQL 2000 (haven't checked 2005), after altering a table the view will not update itself automatically ... it will get completely messed up ... the views point to the column number, not name, therefore after adding a field, some of your columns will be shifted.

The solution is simple, yet confusing if you're not aware of it ... you can click edit the view, and all your columns will show fine, but if you open the view they'll be wrong ... all you have to do is edit the view, save it again, and close ... simple, but necessary ...

A co-worker ran into this today and lost precious hours until he chose to ask :) now you know, and knowing is half of the battle.

This blog is running version 5.9.003. Contact Blog Owner