Character selection by location in a string

Suppose you had a 4 character field (prefx), and you wanted to find all those records where the 2nd and 4th characters were numeric, with the other two being alphabetic.  Here’s a neat, simple solution:

select * from TableName where prefx like‘[A-Z][A-Z][A-Z][0-9]’

Monitoring Log File Growth in SQL Server

We recently had to ‘migrate’ a vendor supplied database with a vendor-supplied process.  We were warned that the database log file could grow some 10,000% !!!!  Not finding that particularly palatable, I upped the transaction log backup to every minute.  I needed some scripts that would allow me to monitor the process and verify that I could escape the vendor’s dire prediction.  The scripts that follow did just that… Continue reading “Monitoring Log File Growth in SQL Server”

Creating an instance of the COM component Error with SSMS

For the 4th time, I’ve tried to open a job step and been prevented with this mysterious error “Creating an instance of the COM component” …  The fix is normally simple, just navigate to the C:\Program Files\Microsoft SQL Server\100\DTS\binn directory and
run the following command (from a DOS box):

REGSVR32.EXE dts.dll

15 seconds later you should get a window stating it was successful.

Why can’t I see more job history?

I’ve been a DBA for a long time… and it still takes me a minute of thinking before I remember how to see more job history.  Furthermore, it takes a second try before I remember that the “Maximum job history rows per job” is the number of steps * the number of job runs. So, if each job run has 100 steps, and your setting (as below) is “200” for the “Max rows per job”, then you’re only going to see 2 job runs in history. Continue reading “Why can’t I see more job history?”

Reboot–the last resort

Simple, weird problem, long research, short answer.  The other evening, “something strange” happened to one of my clustered (active-active) boxes.  When i arrived in the morning, the linked servers from each of the nodes to the other node was failing with the message: “Unable to complete login process due to delay in login response”. (Microsoft SQL Server, Error: 258)”  Linked servers to and from all other Sql boxes were functioning.  After much research, at the end of the day i had each node rebooted.  Following the reboot process, the linked servers worked again.  Done.