Saturday, April 18, 2009

NLB vs. Hardware

Joel Oleson has a good article about Microsoft's Network Load Balancing (software-based), hardware-based load balancing, and some good pointers for when not to use NLB.

Saturday, April 4, 2009

Vista x64 Error: Profile Service Failed Logon

Logging onto my home network I received the following error this week:
The User Profile Service service failed the logon.
User profile cannot be loaded.
I found the following two solutions online but chose the second because my profile contained a great deal of information (desktop icons, etc.) that I didn't want lost (I do use Windows Live OneCare but I didn't trust that I had current backup)...
  1. Delete profile and restore from backup (this is the official Microsoft solution - Article ID: 947215).

  2. In the Windows Registry locate the key for your profile (under HKLM\Software\Microsoft\Windows NT\CurrentUser\ProfileList\), delete the one with the .bak extension, and rename the Temp profile.

Thursday, April 2, 2009

Find All SQL Server Stored Procedures Containing Table Reference

This a real quick and dirty approach for locating all procedures in a SQL Server (2000/2005/2008?) database that contain a reference to a table name, or any other database object or string for that matter.


use [db name]
select distinct o.name
from syscomments c
inner join sysobjects o on o.id = c.id
where o.type = 'p'
and c.text like '%
[name of db object or string] %'
--and o.name not like 'rpt_%'
order by o.name

In the 'where' clause above the sysobjects.type field is limited to 'p' for [stored] procedure. Another common type I have been searching in lately is a function 'fn'. Someone compiled a helpful list of sysobject types, comparing SQL Server 2000, 2005, and 2008 here.