Diskpart Clean! (When USB Stick and ESXi want to part ways)

I've been doing a lot of work lately in virtual environments, trying new hardware, configuring, testing, reconfiguring, testing again. Anyhow, I picked up a few SanDisk Cruzer Fits recently to make the whole test deployment go a bit faster, these things rock by the way 16GB for around $10 on Amazon FTW!

Now that my testing has concluded, I'd really like to use these for storage or some other purpose and remove my demo installs of the latest and greatest ESXi, easy right? pop it in, format...not so fast! If you're running Windows you're in for some fun. You can't format it, you can see the partitions in Disk Management, but you can't delete them, the OS will give you several nasty messages, you're screwed right? Never fear!

  1. Fire up a command prompt as administrator
  2. Run DISKPART
  3. LIST DISK
  4. SELECT DISK # (Where # is the number of the USB disk you want to wipe)
  5. CLEAN ALL
It will take a few minutes, but when it's finished, your USB disk will be squeaky clean and zeroed out. Just format to your desired file system and go play!

ColdFusion 9.0.1 on Java 7u3 by request

Pelican + Data Backup...mmmm

After going through another hair pulling data disaster a few weeks ago, (from which I recovered 100%) I decided to invest in a backup solution. Taking a hard look at all of my data, I concluded that I have just over 1 TB of data that can never be replaced, photos, source code, documents, etc...

My solution? 2x2TB hard drives each containing an exact copy of the other. If you've ever seen my home office, you'd know it would be a bad idea to leave these drives just laying around with the rest of the techno-junk (valuable treasure), as it would only be a matter of time until they were scavenged for one of my projects :) I looked at data vaults, fire safes, and other such items and decided that for the price and ease of portability that a Pelican 1400 case with anti-static foam would fit the bill.

This setup allows for ease of transport to an off-site location, while keeping the drives nice and snug in a water tight, pressure regulated, anti-static environment. If one drive happens to fail for any number of reasons, there's its buddy to save the day.

Glass Board Writing Surface...DIY style

So let's say you want a stylish looking white board, there's everything out there from flimsy standard issue office supply store boards that stain, to high end porcelain boards that you'll have to shell out major bucks for one that's larger than a couple of feet. I was faced with this dilemma not too long ago, and being the creative sort of person I am, I decided to design my own.

What sort of surface material would I use, I thought.

Metal? - chrome plated would look snazzy, but too expensive and heavy.

Plastic? - too "low-end" looking, stains, scratches easily.

Glass? - non-porous, rigid, sexy, inexpensive. Oh yeah! glass it is!

So with my surface material locked in, the next piece of the puzzle was to determine how exactly to fix it to the wall. Several days of bewildered home improvement store workers and internet research later I had found it, sign standoffs. Conveniently located at http://www.signstandoffs.com/

I would be using what are called "through standoffs" ,aptly named, as they are designed to go through the material you are mounting.

All of this in retrospect, and to you the reader, may seem quite obvious. However there was a lot of research into the types of glass to use, edge distances, hole diameters, and surface stresses before just going ape and drilling holes in glass. This thing, after all, is going to be hanging on a wall and being used daily so this is not something you want breaking, it could chop your hands off...or worse :) Respect your building materials!

I happened to have a couple of glass companies near by, I'm sure you probably will too, check the phone book or the interwebs. The company I used mainly deals with table tops, windows, and picture frames. So when I said I wanted a 3 foot piece of glass with 4 holes drilled in it you can just imagine the conversation.

me: yeah, how much would it cost for a thirty-six by thirty-six inch sheet of glass with four holes drilled in the corners?

glass man: ...holes?

me: yeah...four of them. three quarter inches in diameter.

glass man: is it for a table top?

me: nope, it's going on the wall.

glass man: huh? why do you want to do that?

me: to use as a white-board ...made of glass.

glass man: ...never heard of that before...weird...hang on I'll get you a quote...

There were several such exchanges like this during the various points from ordering to dropping off sketches to picking up the glass. They thought I was out of my mind then, now they just ask how many I'll be making and what size :)

Glass:

  • 1/4" thick - don't go any thinner or you'll be sorry. You can go thicker to say 3/8" but remember: glass is fracking heavy! (about 3lbs per sq/ft for 1/4")
  • Annealed (think guillotine rather than beads). Why not tempered? There are additional constraints when dealing with tempered glass when you want to put holes in it, also, the edges are exposed and tempered glass is weakest on its edges.
  • Polished edges - the edges are exposed and blood is bad mkay

Standoffs:

  • at least 1" diameter, the length is up to you. Keep in mind the further from the wall, the less weight your anchors will hold. You'll need 4 to 8 depending on the width of your board

Anchors:

  • I like Toggler® SNAPToggles, they hold crazy amounts of weight (356 lbs in 5/8" drywall)

My first board was 36x36 and utilized 4 standoffs and looks quite nice. Total materials (glass, standoffs, anchors) about $130. That may seem a bit steep for a 3ft square board but it's totally non-porous it will never stain. You use any old dry erase marker and eraser, and if you have something you'd like to keep around without the fear of accidental erasure, bust out the sharpie permanent markers. Go ahead, it's alright, a quick blast of rubbing alcohol and it comes right off :) great for drawing grids and such!

The real cost savings comes when you go big. Total cost for an 96"x48" (8 feet by 4 feet) $250 in materials. Labor is another thing, you're going to need about 4 friends, 6 if your friends are scrawny weaklings to mount that beast, but what you're left with is nothing short of impressive.

To date I have designs for: 36x36, 48x36, 36x72, 48x72, 48x96

Several months later I found a site (wish I'd thought of the domain) http://www.glasswhiteboards.com That sells a slightly more fancy version of this with a white enamel painted magnetic back with tempered glass and edge standoffs (not as cool as through standoffs!) they are nice but their prices are also about 10 times higher than my DIY solution. Even if you go with a thicker glass and tempered you're still only about doubling the cost of mine, so about $500 for an 8 foot board.

I've attached the sketches, check them out, have fun! I welcome any and all comments of course :)

Here's a shot of the 8 foot behemoth!

Preplog Revised - Prepare your IIS logs for SQL Bulk Insert

While searching for a solution for easily importing IIS logs into SQL Server for some quick analysis, I came across a helpful program from Microsoft in the Knowledge Base called Preplog, C++ source code included! (http://support.microsoft.com/kb/296093) This little guy did just the trick...for awhile anyway. I quickly found that it would crash when processing certain logs so I checked out the source and found the problem. Hint: Take a close look at lines 7 and 20.

view plain print about
1#include <stdio.h>
2#include <string.h>
3
4int main(int argc, char **argsch)
5{
6 FILE *stream;
7 char line[1000];
8 int ch;
9
10 if(argc < 2)
11 {
12     printf("Usage: preplog.exe <weblog>\n");
13     printf("\nThe output will go to stdout, so use > filename to direct to an output file\n");
14     return -1;
15    }//if
16
17
18 if( (stream = fopen( argsch[1], "r" )) != NULL )
19 {
20        while(fgets(line,10000,stream) != NULL)
21        {
22         if(ch = strncmp(line,"#",1) !=0)
23         {
24 printf( "%s", line);
25         }//if
26        }//while
27 fclose( stream );
28     return 0;
29 }//if
30 else
31 {
32     printf("Could not open %s. Please ensure that the path and filename are correct.\n",argsch[1]);
33     return -1;
34 }//else
35}//main

The character array "line" is only 1000 bytes in length, while fgets() is being set to retrieve 10,000 bytes. this works as long as the line being fetched is less than or equal to 1000 bytes.

The fix? change the declaration of line from 1000 to 10000 and you're good to go!

view plain print about
1#include <stdio.h>
2#include <string.h>
3
4int main(int argc, char **argsch)
5{
6 FILE *stream;
7 char line[10000];
8 int ch;
9
10 if(argc < 2)
11 {
12     printf("Usage: preplog.exe <weblog>\n");
13     printf("\nThe output will go to stdout, so use > filename to direct to an output file\n");
14     return -1;
15    }//if
16
17
18 if( (stream = fopen( argsch[1], "r" )) != NULL )
19 {
20        while(fgets(line,10000,stream) != NULL)
21        {
22         if(ch = strncmp(line,"#",1) !=0)
23         {
24 printf( "%s", line);
25         }//if
26        }//while
27 fclose( stream );
28     return 0;
29 }//if
30 else
31 {
32     printf("Could not open %s. Please ensure that the path and filename are correct.\n",argsch[1]);
33     return -1;
34 }//else
35}//main

Of course you can always configure IIS ODBC logging and not have to deal with logs like this :)

Spike!

What's 8 inches long and weighs 5.4 ounces (on average) ?

My fucking awesome ZT Spikes, that's what!



Laser!

FINALLY, after nearly 5 months of waiting, my Wicked Lasers Arctic S3 arrived.


and of course, most importantly...


laser at night

more pics!

we're back!

Replacement parts have been installed and we are back. I apologize for the outage and the issues with the Workshop that it caused. I've had the new patch ready to go since the day of the failure but I'm going to plan to release it tomorrow after I've reworked the auto-update system of the Workshop so in the case that an outage like this happens again (I know it won't as I'm knocking on thinly veneered wood) the Workshop will remain operational.

SQL - The package path referenced an object that cannot be found

What do you do when you see this error in SQL Server 2005?

Look further down the error message and you may notice something like this... "Could not set \Package\Job.Disable value to false"

This is usually caused by the dynamic linked library (dll) dts.dll becoming unregistered. Whether due to an in-place upgrade or service pack install, even some hot fixes may cause this. Never fear though - crack open a DOS prompt or Start->Run and issue the following command

regsvr32 dts.dll

You should receive a message from the OS stating that the dll was successfully registered. Try to run your job again and you should find that it runs this time.

Terabase!

Ok, so maybe I'm obsessing a bit but I just couldn't help myself. I have created a... 1TB (yes that's terabyte) database on my home PC. Not only is the database itself 1TB but there is also a 500GB log file and 500GB tempdb (all pre-grown) to total 2TB of database goodness.

Now, why the madness you ask?

If you read the two previous posts, those probably have something to do with it. You see my web server ran out of space trying to do this little exercise so I had to change venue. To date I have generated permutations of strings from 1 to 6 characters in length to total a a staggering

2,238,976,116 rows of data. (yes that's billion with a B)

How long does a query take to execute? Oh, just a few milliseconds. The first query against the data took about 23 seconds, not bad considering this is on what is classified as a "home PC" sporting a quad core 2.8GHz processor with 8GB of RAM and a 7TB RAID 5 on 6 disks. After the query plan is cached, it takes merely the blink of an eye to return a word from the dictionary.

To populate this table took an ever increasing amount of time. The first strings of length 1 to 4 took from only a blink to just under 30 seconds. 5 characters took just over 9 minutes with 6 characters pushing 13 hours.

What's next? Why 7 character strings of course, that will put this at over 70 billion rows and pushing 600GB of data space.

More Entries