Translate:          

Monday, November 17, 2008

SQL Server 2005 Database Mirroring Limitations and Gotchas

I have been working pretty extensively with SQL Server Mirroring in Microsoft SQL Server 2005. It seems to work pretty effectively, though setup outside a domain configuration is convoluted to say the least.

I have posted in the past about some problems I have had setting it up. My difficulties with the configuration aspect actually generated KB940254. The writeup for this particular KB seems kind of convoluted but the long and short of it is that you must use the actual machine name and not arbitrary DNS or Host file entries for mirroring configuration.

SQL Sever 2005 Mirroring Gotcha - Expiring Certificates

Well as we have plugged away with more of our clients using SQL Server Mirroring we have approached 2 more interesting issues. The first one is that, by default, when using SQL Server mirroring with certificates for authentication and encryption, SQL server certificates will expire after one year.

After your certificates expire SQL Server Mirroring will fail, rather ungracefully, if either the principal or mirror instance fails for any reason. And, if the server that fails happens to be the principal instance, your whole mirror instance dies and all your mirror databases go offline, the mirror does not recover even if you have configured a witness. ...

Read More...

Send this to:                          

Wednesday, March 05, 2008

Simple XML Tool Written with VBScript in HTA

I don't know how many of you out there have had the pleasure of trying to integrate a website into the Google Checkout API but it's a surprisingly painless process. They have a bunch of sample code that helps to streamline and accelerate the process drastically.

Google has this nice control panel where it tells you what XML it was submitting and what error was returned, which is really handy. Without it, troubleshooting issues would be pretty much impossible. Well during the course of troubleshooting these issues I really needed to test the exact XML that Google was trying to submit to the XML listener I had setup.

Well I did a quick Google and I couldn't find any really simple tools to submit XML to a generic URL and see what kind of response the URL would return. Since this seemed like something a lot of people (well developers anyway) would be doing on a really regular basis I decided to whip up a quick tool to save myself and anyone who felt like using it, a bunch of time.

Since my language of choice for speed and simplicity is obviously VBScript, I decided to whip up an HTA with the appropriate fields and utilize a bunch of stock functions I had already written. This whole thing took about 10 minutes to write and I think works pretty well. I use it all the time to troubleshoot my projects as well as client issues that might pop up.

If you’re not familiar with HTA’s a ...

Read More...

Send this to:                          

Wednesday, February 20, 2008

Ron Paul Liberty March on Washington D.C. (And Other Major Cities)

It has been a while since I've posted anything related to news or politics. This site is mostly dedicated to scripting and other administration type of projects and posts. But since it is getting more and more obvious that the Republican nomination is not going to go to Ron Paul but to some other entrenched neocon. I thought I'd add my 2 cents about his proposed march on Washington D.C.

If you haven't heard about it, you should watch this video. If you have heard about it then you should consider pledging using this handy little widget below. I'll be there to march and hopefully you will be there too. I'm tempted to turn this into a rant about the federal government and our declining dollar, but I'll spare you for now.


[ Please copy and post this on your website or blog ]

 

If you also have a blog or website. Please consider adding this same w ...

Read More...

Send this to:                          

Sunday, January 27, 2008

VBScript Array Functions - DeleteFromArray, InArray

VBScript has a infamously weak implementation of array capabilities. There often comes situations where you'd like to manipulate an array and VBScript just doesn't have the functionality built in natively.

One of the things that I need to do frequently is delete a value from an array. Well to do this you have too loop through the array and rebuild it as a new array. Since this is such a common task I wrote a little function to do it for me.

Other times I'd simply like to know if an array has a certain value within it. So I can add or remove it or simply act upon it. Well I wrote another one for that too called InArray. It will return a boolean letting you know if the string you are checking for exists within the array.

I will probably add to this later, if anyone has suggestions for additions to this please feel free to forward or submit your code. I'll almost certainly add sorting code to this later, even though there is a dictionary object available to do that now from VBScript natively.
                                                   

...

Read More...

Send this to:                          

Monday, October 29, 2007

VBScript MD5Hash and IsHex Functions to Calculate MD5 File Hashes

Hash.... browns.... get it? *HASH* .... It's funny. Laugh.Recently I was tasked with synchronizing directories between two different servers. Because files can change, become corrupted or otherwise altered without changing any of their attributes, it was pretty essential to ensure that these files were exactly the same.

There are a few utilities out there that can do this for you but one of the best suited is the security algorithm MD5. Well, obviously, VBScript does not have a built in MD5 summing function. There are some .NET libraries that do this pretty easily but unfortunately their methods are not exposed to VBScript (someone correct me if I’m wrong).

So to facilitate this MD5 summing I tried a couple of different methods. The first one, a pure VBScript solution, was functional. The first couple of files I tried it on seemed to go off without a hitch. That was, until I tried a 1.9MB file. That file took 59 minutes to run through the pure VBScript solution. Obviously this is totally impractical considering the size of some files.

The next method I tried was a compiled command line implementation of MD5. You'll need to download this and make sure the "exe" is in ...

Read More...

Send this to: