Posts

Using Powershell in a SQL Server 2008 job step

I have been using Powershell since I first got wind of the beta and realized that all of my Windows Scripting Host skills would become obsolete.  However, I've never had the opportunity to try out the Powershell job step type for SQL Agent jobs until today. I know that the Powershell that "comes with SQL Server" isn't the same as the regular Powershell but, other than some fiddling around with the SQL Server file system provider, I've bumped up against those differences before. It's just different enough to be frustrating, so I'm blogging about it. It's a bit of a rant, but maybe it will save someone some time or someone can point out something that I've overlooked. My goal is to have a simple script that I can use in a SQL Agent job that can automatically discover and backup any SSAS database that exists on the same computer that as the SQL Agent. (This is an improvement over my old method, which used hard-coded XMLA queries to backup speci...

Patience and Persistence is often worth more than brilliance...

After some bureaucracy, I finally have access to software. I still don't know why it took MS longer to allow me to use my subscription than it did for NewEgg to ship me the physical media, but some mysteries aren't worth knowing. The next odd thing was getting Microsoft's file transfer client installed. It took a few minutes work to find a download site, download and install the client and then allow IE to use the client. Now, I need to download and configure Windows XP, VB 6 and Office 2003, all in a VHD. I've got all of the required ISOs, so I'll be installing up a storm on the train.

x64 Drivers for Common file formats are coming...

...probably. I've been meaning to mention this for a while. If you've read my blog at all, you've probably seen my rages against the lack of 64 bit drivers for common Office data formats. Huzzah . I don't see anything about Fox, dBase or Clipper files, even with some googling.

Instant Gratification

I've been gigging as a SQL Server DBA for a long, long time -- more than twice as long than I've held any other job. Everyone knows about the economic situation, which certainly seems to have cut back positions, compared to 2007 or so. As others have noticed, it does seem that power is devolving away from DBAs running boutique databases. The "No SQL movement" is one aspect of this, and the marketing push for SQL 2008 R2 leans toward Business Intelligence (BI) features, such as the "self-service" BI features and the older SSRS and SSIS features. Improvements to the data engine, my bread and butter, are minimal and frankly not very exciting. With that in mind, it seems prudent to find a way to not be so much of a one-trick pony. I did a lot of development earlier in my career. Code from that era seems to qualify as "legacy" now, so migration projects might be forthcoming, perhaps there might even be a mini-boom in such work, along the lines of the CO...

Finding Partition Offsets Made Easier (with Powershell)

A while back, I read Linchi Shea's blog posting on finding partition offsets . I recently found some time to rework his C# file plus perl script solution into a single Powershell script. The upsides to my solution are: It's Powershell-only, so there is nothing to compile and you don't need to install perl. Using Powershell provides some added bling, for no real cost. It's easy to construct a pipeline that will interrogate many servers or will provide sorting or filtering. The major downside to my solution is: You must install Powershell. This shouldn't be a problem on Windows Vista or Windows Server 2008. Please be careful of the formatting. While embedding the code here is more convenient than a zip file, I'm still learning blogger and things may not wrap the way that I would like them too. I've also looked for a way to post syntax-highlighted Powershell code. There are solutions for other languages, but nothing for Powershell is jumping out at me so I will...

I'm attending the upcoming Philly Code Camp

A bit of a plug for the local user groups: The next Philly Code Camp  will be held on October 11, 2008 at DeVry in Fort Washington.  I don't make it to the regular Philly SQL Server User Group meetings anymore because I'm working downtown and the drive to Malvern is painful, but I do try to make it to the Code Camps. I always learn something. I tend to bounce from track to track, depending on my interest level in a particular topic and how crowded the room is, but I'm always in line for lunch. ;-)

Back from the dead

I haven't had much going on lately, at least not anything of interest to anyone out there. It's been a long time between posts, but here are some new posts, albeit less technical than my earlier postings.