Search your entire server for a string across all databases! MSSql 2000

You can use this query to search your entire server for a string. It will search views, stored procs, triggers, everything. All the sql text in your database is stored in system tables under each database. There are a few hardships to overcome in order to search. 1.) Text is split into 4000 character chunks. So every 4k chunk has a colID to note its position in the stack of rows .  The names are stored...

October 9th, 2009 by B.Harding 

Store an IP Address in a human-readable Int64 (bigint)

Lets say you have an  ip address in a string such as  “127.1.2.3” This code will store the information in an int64 (C#) or bigint (SQL) in with three places per octet. 127001002003 The highest this number could go is 255,255,255,255.00 which is too large for a 32 bit integer. Hence the Int64. In SQL an 64 bit Integer is big int so that is what you’ll need to store in an MS-SQL Database. I...

September 29th, 2009 by B.Harding 

Restore failed for Server ./SQLEXPRESS

A wise man once told me: “The quatilty of your life is directly proportional to the quality of your backups”. I have come to respect this advice greatly. A few weeks ago my dedicated server went down. The incompitent tech support at AIT was unable to get it working again. It took them 16 days to decide the drive was toast. All data was lost.  Luckily I was somewhat prepared and had been...

February 12th, 2009 by B.Harding