Archive for December 2008
First problem with Vista
The Vista splash screen would appear as normal and after that a blank screen would appear and just hang there.
After a few reboots I realised that the problem was not as simple as I had thought initially and so I decided to boot from the Vista install DVD and then go to the repair screen.
I tried to restore to an earlier restore point but I got a message that the system needed repair and upon clicking OK to repair the system the process just hung for hours.
My next approach was to go to the command line and try chkdsk and this did not work because the system just hang as well. I tried all the various switches that go with chkdsk and it was the same end result.
When I tried sfc /scannow I got the message that 'Windows Resource Protection could not perform the requested
operation' and so obviously the command line was not going to work.
The next step was to try and do a repair and this just hang overnight. The last step was to try and re-install and this also failed. I just got a screen that said 'Please wait' and waited
for more many hours and nothing happened and finally I decided to just reformat the Vista partition and do a fresh install.
To reformat the drive I just used the XP install CD and after that finished I installed Vista and this time there were no problems.
I am still not sure what caused the problem in the first place but it looks like the Vista partition had some problems and I still think had chkdsk not hung the problems would have been solved.
At least now everything is back to normal.
Finding tables where column is used
Say to find every table where the column UserID is used in a SQL sever database I would use:
Select SyO.Name from Sysobjects SyO
Inner Join Syscolumns SyC
ON SyO.ID = SyC.ID where SyC.Name = 'UserID'
and SyO.Xtype = 'U'
The Xtype = 'U' condition makes sure you just look at tables and not stored procedures or views etc where the column may also be used.
Another method to use would be:
Select Table_name from
information_Schema.columns
where Column_name='UserID'
This second method gives all the areas where that UserID column is used.