Free Newsletters

   All InfoWorld Newsletters
Google Search » Database Underground | Sean McCown » October 2007

October 30, 2007 | Comments: (0)

Apple Boneheads!! or Zune your way to the Top!!

Some things you read and just can't believe. I came across this story of the little girl who wrote Steve Jobs a letter suggesting some imrpovements to the iPod, which she loved. The letter she got back was... well, let's say it left me speechless.

http://www.macworld.co.uk/news/index.cfm?RSS&NewsID=14386

Here's some nice user feedback on the topic too:
http://www.overlawyered.com/2006/04/letter_from_apple_lawyers_make.html

Now, I know I'm a little behind in the times here, but leave it to me to keep something like this alive.

What really gets me is that these guys have to be told not to talk to kids like that. I thought Apple was supposed to be the user-friendly company that loves all animals and kids alike. Why didn't they just send the lawyers there to threaten her in person?

Seriously... does it take so much extra energy to write someone a nice letter instead of something like that? Every software company in the world runs off of user requests. What makes Apple so important? You mean to tell me that if Apple's users were all insisting on a new feature in the iPod or the Mac that they wouldn't implement it just because they don't take suggestions? Whatever.

Personally, it disgusts me that Apple is so caustic to little kids and that they have to "revise their policies" when dealing with them. I just have no words.

So Steve Jobs... this is directly from me to you:
Do what Microsoft did whey they needed to teach all their employees about security. Stop all production right now, and take 3 weeks to put all of your employees through some kind of course that teaches them basic human kindness.

So everybody, let's all buy Zunes instead!!
And Microsoft... feel free to send me a Zune for the endorsement.

Posted by Sean McCown on October 30, 2007 02:56 PM


October 30, 2007 | Comments: (0)

Errors Can be Fun

A few years ago there was an article on SQLServerCentral.com that gave us some screenshots of some of the funnier windows and program errors. Here's my contribution to the lot.

Yesterday I was troubleshooting a LiteSpeed problem and clicked on one of the EXEs in the program folder to be presented with this message.

BadMagic.JPG

Ya just gotta love programmers.


Posted by Sean McCown on October 30, 2007 08:40 AM


October 29, 2007 | Comments: (0)

The Primal Urge to Deploy

I've talked before about my love for PrimalScript as a VBScript and JavaScript editor. It's just got some features that I've grown to really love. Well unfortunately I just don't get the chance to use it that much anymore because most of the web coding I do is in .NET and I tend to do all that coding in Visual Studio for all the class helpers and such. And since I'm a DBA, and not a Windows admin, I just don't do that much Windows scripting... though it does happen every couple months or so.

Well, now I'm going to get to use PrimalScript more because I've just figured out a new use for it and I just can't believe it took me this long to think of it. See, PrimalScript has this script packager that will package up all of your scripts into an exe so you can put them out there for users without having to worry about them getting at your connection strings or changing the logic. And that's how I've always used it in the past. But it just hit me a couple weeks ago that I can use it to deploy my DB scripts too. See, like many shops, we have to send our deployment scripts to an official change manager who then deploys them into production. It's that whole separation of duties thing we all love so much. Well anyway... the problem is simple... if we send him our scripts, which number in the tens sometimes, we have to make sure we tell him what order to run them in, and then trust that he does it correctly. And then if something blows up there's always that argument about whether the scripts were right or whether he changed something by mistake. Then there's the problem of whether he should deploy to all of our systems because we don't want him to have SQL rights on all of our boxes, etc. So you can see how the process can get fairly complicated and even counter-productive at times.

Enter PrimalScript... now I'm packaging up all my scripts and just sending him an exe that all he has to do is run. In fact, I can put them in order, and even call them with whatever account I like and he can actually deploy code to boxes he doesn't even have rights on. I'm telling you, that's just fabulous.

It's actually pretty easy. All I have to do is specify a .vbs file with a series of osql statements in it. Each osql statement uses an input file as it code source. So whatever script you generate, just point it at the file and you're done. Then inside PrimalScript, you attach the vbs as the script to run, and attach the SQL scripts as data files. They all get compiled up with the exe and you can send the entire set as a single build to your deployment team.

Now the arguments just don't exist anymore. You know the scripts ran in order, you know nothing was changed, and you know they ran under an account that had rights to perform all the actions. Personally, I'm in love.

I don't think this was necessarily the intended use for the script packager, but it certainly works really well. Now that I've written this blog, maybe the Sapien guys will see this and give us DBAs an enhancement that will be just for us. What I'd like to see is something specially for DB deployments and allow me to just attach SQL scripts with user creds and bypass the vbs altogether. That would be nice. This new version of the script packager would also clean up after itself too. It would allow me to create a folder to unzip all the files in while they're executing, and then either let me keep it or delete it. If I were pressed on what I'd want in a perfect deployment utility, I'd also ask for a nice progress screen and a basic report to send back to the dev team to let them know what errors were encountered, or that the whole thing went well. This would close the loop and allow the build to be closed in source control. It would also let me choose which scripts continued on error and which ones halted. I know I'm starting to ask for a lot, but these guys seem to be in the position to do this for us. But at the very least, I'd like to be able to just compile my SQL scripts and run them without a vbs. The way I'm doing it is easy enough and I've already got a template, but all the same... there's no reason it can't be any easier.

So if you haven't already, go get you a copy of PrimalScript and see what it can do for your deployments. I'm lovin' it.

Here's a screenshot of the PS script packager. Notice how you can add as many script files and supporting files as you like:
View image


And NO, the Sapien guys aren't paying me for this. In fact, I don't even think they follow my blog. But it's hard to tell because anyone who's anyone follows my blog. But I'll tell you this... I just got a press release that they're releasing 4 new bundles that should suit everyone's needs. Basically what they're doing is bundling up PrimalScript with their training and script libraries. I think I've seen all(ok, most) of thier training vids and I got a lot out of them. In fact, I still refer to them from time to time simply because I don't do a lot of Windows scripting so it helps to have them as a reference on the odd occasion when I do.

For those interested, here are the links to the bundles:

http://www.primalscript.com/Editions/prokit.asp

>http://www.primalscript.com/Editions/enterprisekit.asp

>http://www.primalscript.com/Editions/universal.asp

>http://www.primalscript.com/Editions/bundles.asp

OK, while PrimalScript is an excellent utility for this type of thing surely it's not the only game in town, right? Well, you're right. There are other apps that do this same thing. What I was a little surprised to find though was that there aren't lots of them. And most of them are really not that good to be perfectly honest.

Here, I'll go over some of them:

Admin Script Editor-- This is a direct competitor to PrimalScript and it's an excellent editor with some very nice features overall. It definitely gives PS a run for its money on features. But while that's true overall, I don't feel that its script packager is as good and here's why. PS let's you run several scripts in a row and attach supporting files. ASE also lets you attach supporting files, but as far as I can tell it doesn't let you run more than one script. Now, you can force the issue if you like by making a master script that calls all the other scripts and then you just attach them as files, but that's an extra step that shouldn't be necessary. It does have a couple cool features though. First, it let's you use console mode which is a way to use a single window in case you have prompts to answer. And second it saves the scripts in specially named folders for execution so you can have separate executions going at the same time w/o inteferring with each other. That's not really relevant to our deployment scenario here, but it's cool nontheless.
Here's a screenshot of the ASE script packager. From what I can tell, you can only add one script to run. If you can add more, it's not obvious:
View image


You know though, most of the other utilities aren't really worth going into in detail because they're so limited in functionality it's just not worth my time. However, I'll list a couple of them for you so you can read up on them if you like.

ExeScript
Vbs2Exe
ScriptCryptor
Batch File Compiler Pro 3.0.2
Quick Batch File Compiler 1.0.1.8


OK, and finally to finish up... some of you may not be very familiar with VBScript and may not know how to code the solution even if you got one of these tools. So here's a simple script that you can save as a .vbs and use to deploy your .sql scripts to as many servers as you like.

Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
''CERT
WSHShell.Exec("osql.exe -Sservername -E -ic:\DWBuild\DBA1255961.sql -oc:\DWBuild\Errors\DBA1255961.txt")

Now, all you have to do is save that as a .vbs and run it. Of course, I hope I don't have to tell you to use your own paths and scripts, right?

You can have any SQL in that file that you want. I routinely have several hundred lines of code in mine and they run very well. And if you have more than one .sql file to run, simply tach on another .Exec line and change the file name that the osql is pointing to. It's really that simple. I put the -o there to capture the output because the way the .exe compiles it just runs what you give it, it typically won't spit out errors and you'll have to track them down yourself. Of course, I'm sure all of you have smooth deployments because you've tested your code thoroughly, right?

Anyway, I hope this helps someone. It's an important topic and I think it deserves some attention in your organization.

Oh, one more thing... you can do all of this in .Net and get a lot richer deployment experience, but this solution is a lot easier to get going, and doesn't rely on the framework. And since you might not know much about the guy doing your deployments, it never hurts to keep things as simple as possible. Just a thought.


Posted by Sean McCown on October 29, 2007 10:15 AM


October 05, 2007 | Comments: (0)

How long does it Take?

OK, here we are quite a bit of time after Yukon SP2 and we still don't have an ordered list if SSIS packages. Seriously guys, how long does it take to put an order by clause on the end of that query?

Currently, SSIS packages are sorted by import date. I don't know who thought that was a good idea, but I have a hard time believing that I'm the only one complaining about this. MS has a huge IT dept and they use their own tools. So why is it that these things go unnoticed for so long? Or at least unfixed. Maybe it isn't unfixed though... maybe they've fixed it internally and their DBAs aren't complaining anymore so there's no rush to get the fix to us. But there are a lot of things in the tools we all had high hopes for, and I've personally given them a big break because Yukon is basically a v.1 product and you can expect some quirks. But these things they missed should have been taken care of by now.

Dare we hang our hopes on the next release? From what I'm seeing so far in Katmai there are a lot of things that don't look like they'll be addressed. There are a lot of complaints with SSIS alone that don't look promising. There's a good reason for some of this, but I don't think I'm allowed to say what it is so I'll just leave you with the haunting thought that I know something you don't know.

I'm really just in a complaining mood today. I get like that when I have to take several minutes to pick through the 300 packages on my server to find the one I'm looking for. Guys, give us a little patch or something and let us sort these things.

Posted by Sean McCown on October 5, 2007 07:48 AM


October 01, 2007 | Comments: (0)

It's Not me this time!

OK, again with the backup wars... for those of you who have followed me for a long time you'll remember a few yrs ago I did a piece on Idera vs. Imceda. And this was for backup products, right... so SQLSafe vs. LiteSpeed. And IF you remember back that far you remember how heated the outcome was and the extremely poor rating I gave Idera in that roundup. I stood by it then, and I stand by it now. I just don't think the product is enterprise-ready. It still has some serious problems that keep it from making the grade. But I'm really not here to bash on Idera. I do have a couple things to say about the new version of their Diagnostic Manager though, so maybe I'll put something together sometime this week. Anyway though... getting off topic.

Well, for once, I'm not the only one saying things about SQLSafe in public. And frankly I'm a little tired of being the only one sticking my neck out, but that's another post.
Here's a link to a guy who is an avid supporter of Idera and actually chose their product and uses it every day for years now. Well, he just downloaded their new version, and I think you should see what he has to say before you take the leap yourself. Here's his blog post.

There are lots of thing I could say about this situation, but there's really no need to. He says it far better than I ever could. Besides, I just semi-made-up with Janette at PASS and even though she isn't returning my emails, I know she'll eventually come around and realize she can't live without me.

One thing that hits me square in the face though, is how careful companies need to be these days. Perhaps this is the topic for a full post later, but I'll touch on it here just because it's relevant. Gone are the days when you can piss a customer off and just leave it at that. Ordinary people like me have full access to blogs now and we make full use of it. Think about that for a sec. This guy felt so wronged by the new product that he felt it necessary to blog about it to warn others against it. It sounds to me like you need to take all of your customers very seriously. Even if he's a nobody and his blog is unpopular... he still made it to my blog roll so the word will get out somehow. And even if I didn't pick this up, somebody else might have. And they may still. Someone may look at this blog and point to both of our blogs and now the story's out there for everyone to see forever.

So there really are no small customers anymore... just small testing depts.

Posted by Sean McCown on October 1, 2007 08:21 PM


Technology White Papers

 

InfoWorld Technology Marketplace

» Technology White Papers Library

Technology White Papers by Topic

Technology White Papers E-mail Alert

Find out when the latest white paper is available:
 
 
» BUY A LINK NOW

Sponsored Technology Links