If you're a fan of Office Space...

Office Space Kit, including:

  • Red Stapler
  • Initech Mug
  • "Is this Good for the Company?" Sign
  • Starter "Flair"
  • "PC Load Letter" Copy Machine Sticker
  • Your Very Own "Jump To Conclusions" Mat

An Initech mug by itself:

Norton Ghost 12.0: My latest favorite tool

Just used Norton Ghost to upgrade/replace a hard drive that was in the early stages of failing--it had had a few intermittent blue screen/reboots:

This was a HP Pavilion zv5000 laptop with a 60GB drive and XP Home.

Event Viewer showed several things of note around the reboot times:
Got a bug check: 0x0000007a (0xc03dd9a4, 0xc000000e, 0xf7669130, 0x0737e860)

The error is The device .DeviceIdeIdePort0, did not respond within the timeout period.

An error was detected on device DeviceHarddisk0D during a paging operation.

Ran the whole chkdsk /r and chkdsk /f bit. Found 4KB in bad sectors--but more importantly, I heard the tell-tale sound of a hard drive beginning to fail.

Miraculously, Ghost 12.0 was able to make a disk copy of the hard drive (and properly resize) to an 80 GB hard drive. The only catch left is that the "bad sector" flags are copied as well. Not a big deal in this case, but here's a page with a resolution: The $BadClus metatfile.

Because of the failing drive, the copy operation for 10 GB of data (4500 RPM drive) took close to two hours. I'd imagine the faster hard drive in better condition would have a significantly better transfer rate.

Once the disk copy was finished, I swapped hard drives out and the new drive booted almost exactly as old. One glitch: XP Pro/2003 boot option was added as a second option, in addition to the valid XP Home boot. No problem... I just had to edit the boot.ini.

Norton Ghost 12.0: My latest favorite tool

Just used Norton Ghost to upgrade/replace a hard drive that was in the early stages of failing--it had had a few intermittent blue screen/reboots:

This was a HP Pavilion zv5000 laptop with a 60GB drive and XP Home.

Event Viewer showed several things of note around the reboot times:
Got a bug check: 0x0000007a (0xc03dd9a4, 0xc000000e, 0xf7669130, 0x0737e860)

The error is The device .DeviceIdeIdePort0, did not respond within the timeout period.

An error was detected on device DeviceHarddisk0D during a paging operation.

Ran the whole chkdsk /r and chkdsk /f bit. Found 4KB in bad sectors--but more importantly, I heard the tell-tale sound of a hard drive beginning to fail.

Miraculously, Ghost 12.0 was able to make a disk copy of the hard drive (and properly resize) to an 80 GB hard drive. The only catch left is that the "bad sector" flags are copied as well. Not a big deal in this case, but here's a page with a resolution: The $BadClus metatfile.

Because of the failing drive, the copy operation for 10 GB of data (4500 RPM drive) took close to two hours. I'd imagine the faster hard drive in better condition would have a significantly better transfer rate.

Once the disk copy was finished, I swapped hard drives out and the new drive booted almost exactly as old. One glitch: XP Pro/2003 boot option was added as a second option, in addition to the valid XP Home boot. No problem... I just had to edit the boot.ini.

Further refined Find Text in Column Name

Now returns table (or function which returns a table) and column name.


CREATE FUNCTION Find_Text_In_Column_Name (@StringToSearch varchar(100))
RETURNS @fColumnNames TABLE (tablename sysname, colname sysname)
AS
BEGIN
SET @StringToSEarch = '%' + @StringToSearch + '%'
INSERT @fColumnNames
SELECT DISTINCT SO.NAME, SC.NAME
FROM syscolumns SC (NOLOCK)
INNER JOIN
sysobjects SO (NOLOCK)
ON SC.id = SO.id
WHERE SC.NAME LIKE @StringToSearch
ORDER BY SC.Name
RETURN
END

Functions to find text in column names and in stored procedures and function definitions

Implemented in SQL Server:
This function finds a text string in a stored procedure or function definition:


CREATE FUNCTION Find_Text_In_SP_or_FN (@StringToSearch varchar(100))
RETURNS @fNames TABLE (name sysname)
AS
BEGIN
SET @StringToSearch = '%' + @StringToSearch +'%'
INSERT @fNames
SELECT DISTINCT SO.Name
FROM sysobjects SO (NOLOCK)
INNER JOIN syscomments SC (NOLOCK) on SO.ID = SC.ID
AND (SO.Type = 'P' OR SO.Type LIKE '%F%')
AND SC.Text LIKE @stringtosearch
ORDER BY SO.Name
RETURN
END
GO

This function finds a text string in a column name:


CREATE FUNCTION Find_Text_In_Column_Name (@StringToSearch varchar(100))
RETURNS @fColumnNames TABLE (colname sysname)
AS
BEGIN
SET @StringToSEarch = '%' + @StringToSearch + '%'
INSERT @fColumnNames
SELECT DISTINCT SC.NAME
FROM syscolumns SC (NOLOCK)
WHERE SC.NAME LIKE @StringToSearch
ORDER BY SC.Name
RETURN
END
GO

Some example usage for the novices:


select * from Find_Text_In_SP_or_FN('addr')
GO
Select * from Find_Text_In_Column_Name('city')
GO
Select * from Find_Text_In_Column_Name('state')
GO