Shrinking SQL Server logs

Here is a great little script that comes in handy when you need to shrink your transaction logs.Not really meant for production systems though!


USE MyDatabase
GO
Backup Log MyDatabase WITH TRUNCATE_ONLY
GO
DBCC SHRINKFILE (MyDatabase_Log, 1)
GO

SQLServer

Comments (0)

Permalink

Making the switch to Dvorak

I recently decided to switch over to the Dvorak keyboard layout. For those of you not familiar with it, this is an alternative to the standard qwerty layout which was designed for efficiency and ease of use. This is my second day, so this is short and sweet. I’ll keep you updated…

Uncategorized

Comments (0)

Permalink

IE making server requests when changing cursor styles

I found a really interesting (annoying) behavior the other day with the way internet explorer handles cursor styles.

We had just launched the website for a major metropolitan airport, and noticed an astonishing number of 404 requests to a non existent page entitled /somepath/normal .

Searching the code for “normal” only returned a couple of css hits… As it turns out, we had a table with the following code:

<tr onmouseover="this.cursor.style='pointer'"
onmouseout="this.cursor.style='normal'" >

The first thing you may notice about the code above is that there is no css cursor style called ‘normal’, it should be ‘default’ or simply ”.

How would this result in a wackload of webhits you ask? It turns out that when Internet Explorer does not recognize the style name of a cursor style, it assumes that you are providing a url to an image to use.

Therefore, whenever a user waved their mouse over their flight search results on our search page, we had multiple requests sent to the server… one for each row in the table. You can imagine what this would mean for a busy site…

Uncategorized

Comments (0)

Permalink

New iPod

So I got a new iPod. So far, no thoughts… I have plugged it in and have had a “Do not disconnect” message for the last 8 hrs…

So I patiently wait, and reorganize my music collection…

[Follow up]
Clearly I'm a tool… since the warning is simply because the unit needs to be undocked before removing.

My iPod rocks!

Uncategorized

Comments (0)

Permalink

Cron on Windows using Cygwin

One of the things I hate about Windows is their crappy Schedules Tasks utililty. It is really quite akward to set up a recurring task that runs more often than every day. Also, if you are in a corporate environment that makes you change your password monthly, all your schedules tasks stop working… Crap!What to do? Cygwin to the rescue!For those of you not familiar with Cygwin, it is a unix like environment for Windows which provides most of the GNU utilities running from a familiar bash shell (Familiar to *nix fans anyway).To set up Cron as a windows nt service, you need to have a cygwin installation with cron and cygrunsrv installed.

To install as a service:

 

cygrunsrv -I cron -p /usr/sbin/cron -a -D

 

To start the service:

 

net start cron

 

You may then edit your crontab with:

 

crontab -e

 

Happy Cronning!

Uncategorized

Comments (0)

Permalink