SQLChicken.com

SQL Server DBA Tips & Tricks

By

T-SQL Tuesday #008: Gettin’ Schooled

Here we go again with another round of T-SQL Tuesday fun this time brought to you by recent SQL Certified Master (MCM), SQL University professor, and my brother from another mother Robert Davis (Blog | Twitter).

This month’s topic is actually a series of really good questions:

We return to our days of youth to take a fresh look at learning. How do you learn? How do you teach? What are you learning or teaching? Or the coup de grace post would be learning something new and telling us about it.

So given that I established and run SQL University this topic is right up my proverbial alley!

How do you Learn?

I love the old adage “Give a man a fish and he’ll eat for a day, teach a man to fish and he’ll eat for a lifetime”. My best learning tool is by doing, which I’m sure many of you can relate to. There’s only so much academic knowledge you can soak up before it starts spilling out. Honestly, if something isn’t relevent to me in terms of real-world application I have a much harder time grasping the concept. For instance a year or two ago when I first heard of PowerShell I looked at it and went “oh that looks cool…I guess, not sure what I’d do with it.” Fast-foward to a month ago and I finally get a chance to re-learn the basics and actually apply it before that lightbulb went off in my head that said “oh WOW, I GET it! I heart PowerShell!”. Without that opportunity to really apply the academic knowledge, the education itself goes to waste.

Thing is not every job you’re in will call for use of PowerShell, replication, mirroring, etc. so the next best step…do it yourself! The wonderful world of technology now allows us to build virtual machines on our laptops with relative ease. So if your shop doesn’t give you a proper sandbox to play around with advanced features then I highly recommend you install Virtual PC, VMware Workstation, VirtualBox, VMLite or whatever your preferred flavor of virtual platform and get to practicing! If installing and configuring virtual machine’s isn’t your cup of tea (but I highly recommend as you learn lots of lessons by installing/configuring machines from scratch) there’s a free sandbox environment you can experiment with a fully configured SQL Server 2008 virtual machine at http://sqlserverbeta.com . This is a free, no-strings-attached virtual machine complete with AdventureWorks databases installed ready for you to tinker with brought to you courtesy of PASS, Dell and MaximumASP.

How Do You Teach?

Ah the Golden Rule: we learn it young and it applies forever. When I learn I like to be entertained a bit as well as soak up good knowledge. I also like to interact as much as possible. This being the case when I do a presentation I try to keep it lively as sometimes straight technical content is…well…boring. I’m sure that sounds blasphemous to some of my fellow geeks out there but you know its true. You’ll be sitting in a session with content that can’t really be demoed (i.e. internals talk). The secret to teaching is making a topic engaging enough that you don’t lose your audience.

 Although there’s a fine line between entertainment and being annoying. I’ve been guilty of this myself wherein in your attempt to keep it light you come off looking like a clown. Make sure you remember your root cause for being there and that’s to teach. Clowning has its place so remember to toe that line carefully…unless you’re Buck Woody then all bets are off!

What Am I Learning?

Anything and everything! I’m like a shark and learning is my water. If I’m not learning, I’m dying. SQL Server is a HUGE product and currently I’m starting to lean towards learning the BI stack. Another key thing that I keep learning and playing with is PowerShell. In all seriousness there’s ALWAYS something to learn and it doesn’t always have to be something as huge as learning an entire product line or feature. Start with baby steps. One cool thing I’ve seen recently is a series of blog posts called “One Cmdlet At a Time” in which Jonathan Medd (Blog | Twitter) learns PowerShell one cmdlet at a time. This is a great example of how you can tackle learning something one little bit at a time. In his case not only is he learning by doing so hands on but he’s teaching as well via his blog. It’s a win for everyone!

Share

By

T-SQL Tuesday #007 – Roundup

New hotness

First of all I apologize for this roundup taking more time than usual to appear. This last week was my last week of work at the hospital and trying to get everything turned over as well as prepping for my move to Jacksonville my time’s been short to say the least. Without further ado, here’s this month’s #TSQL2sDAY roundup:

Stacia Misner reports in on her love for all things Reporting Services.

Brad Schultz fills in the gaps for us with a brilliant (as always) Intellisense post.

Glenn Berry gives us some great insight on core database engine improvements. If you don’t think R2 brought anything to the core product stop and read this post.

Andy Lohn merges several answers together with IntelliSense, Resource Governor and the MERGE statement! Also Andy’s new on my radar and has a witty Twitter name so time to add another person to follow on Twitter/add to Reader!

Jason Brimhall packs a ton of great information in his post about compression.

Seth Phelabaum talks about the new T-SQL and query writing improvements. This is awesome as I wasn’t aware of some of these new additions! Developers, this is a MUST read! Once again, another great blog added to my reader!

Robert Davis, one of the newest folks to attain the prestigious SQL Server Master certification, brings to our attention something you wouldn’t really think about: sysprep support! SWEET! Great walkthrough example using a virtual machine on Windows Server 2008 R2. Definitely an administrator MUST read.

Wayne Berry takes us for a trip to the clouds with the SQL Azure team and SQL Server 2008 R2’s SQL Azure integration. If you’re even thinking about putting your database in the cloud check out this post and subscribe to the SQL Azure team’s blog.

Kendra Little has plays the dating game in this post where she narrows down three great features (PowerPivot, Data Compression and The Data Collector) and finally comes up with her winning date. Read this post to find out who wins!

Bill Fellows hasn’t been able to play with R2 yet but gives a great and detailed walkthrough of how and why to use User Defined Table Types as Table-Valued Parameters. VERY cool! Added to reader.

Steve Jones, of Voice of the DBA podcast fame, gives us some great insight on StreamInsight. Honestly this feature also excites me so this is a really nice intro to the feature.

Gethyn Ellis is a man after my own heart by talking about Policy-Based Management. Also always great to discover another great blog from across the pond.

Ted Krueger, who did a fantastic job last week with SQL University’s HA/DR week, waxes poetic about all of the new changes in SSIS Data Flow Engine. If you care at all about SSIS performance check this out!

John Racer, aka @speedracer, could’ve written a whole book on all the new BI features but instead focused on Reporting Services. Nice breakdown of new hotness in SSRS.

Mark Blakey talks about PowerPivot and comparing it to a certain scene in Austin Powers (no, not the hot tub scene with Alotta). Also make sure to give him a follow on Twitter as well.

Nicholas Cain, aka @anonythemouse, despite claiming to cheat by referencing one of his old SQLServerCentral posts covers a real nice example of how Data Compression helps you save space.

Pinal Dave does a fantastic job of covering MERGE operations as well as showing us precisely how it improves performance over traditional methods. Very cool! Developers, definitely check this out!

Stef Bauer walks us through the Resource Governor feature and how it works. Pretty cool feature to help cull down those resource-hungry queries from ad-hoc queries.

Rob Farley throws us for a loop as his favorite part about SQL 2008 R2 doesn’t even have to do with the features! Check it out.

Bob Pusateri is excited by what’s NOT there with his overview of filtered indexes in 2008 and how they helped him solve a specific issue on a homegrown solution.

Share

By

T-SQL Tuesday #007: Summertime in the SQL

Invitation for T-SQL Tuesday #007

New hotness

Welcome back to the blog party known as T-SQL Tuesday. I’m honored to be hosting this month and since its Summer I’ve decided to talk about hotness…feature hotness. In the last few months we’ve had the release of SQL Server 2008 R2 which brought along with it a slew of new features. So this T-SQL Tuesday I ask: What’s your favorite hot new feature in the R2 (I’ll be nice and include 2008 in general) release? Got some code that takes advantage of a new feature? Post it! Got an example of how PowerPivot let you slice and dice data you simply couldn’t before due to contraints? Show us! Make sure to apply your SPF 1433 and get to writing.

Cabana Rules

This whole party started when Adam Machanic (Blog | Twitter) decided to start this awesome blogger party where one topic is chosen by the monthly host, everyone submits their posts, and those posts are then rounded up. Catch is these posts must all go up within the same 24 hour period. Here’s a list of the parties held so far:

  • #001 Adam Machanic asked for your favorite Date/Time tricks
  • #002 Adam followed up by asking for your favorite Puzzling Situations
  • #003 Rob Farley made the commitment with his topic: Relationships
  • #004 Mike Walsh kicked asked for your input on IO
  • #005 Aaron Nelson asked us to report on “Reporting
  • #006 Michael Coles wanted to know All About BLOB
  • So write up your post and make sure to link back to this post for your entry to count.

    To participate your post must go live between 00:00:00 GMT on Tuesday the 8th of June and 00:00:00 GMT on Wednesday the 9th.

    Don’t Run on the Pool Deck

    Here are the posted rules for this shindig:

    ATTENTION: RULES HAVE CHANGED, SEE BELOW

    1. Your post must go live between 00:00:00 GMT on Tuesday the 8h of June and 00:00:00 GMT on Wednesday the 9th. If your post doesn’t go live in the time limits, it won’t be included in the round-up post.
    2. Your post must link back to this post (by trackback or comment).
    3. “T-SQL Tuesday #007″ MUST be in the title of the post.
    4. The above rule has been CHANGED! The new rule is that the title of the participating post no longer has to reference T-SQL Tuesday (although it’s still recommended). The post still has to link back to the hosting blog, but the link needs to be anchored from the NEW LOGO (found above), which must appear at the top of the post.
    5. It is your responsibility to verify the trackback or comment appears here on this post. If you don’t see your trackback add your own comment with a link back to your T-SQL Tuesday post and it will be included in the roundup.
    6. Don’t feed Gremlins after midnight
    Lifeguard on Twitter Duty

    A lot of the T-SQL Tuesday bloggers and bloggees are on Twitter. Follow the hashtag #TSQL2sDay and when your post goes live, tweet a link to it with that tag.

    Hosting

    You too can host this event! Just have participated in at least two previous #TSQL2sDay and let Adam Machanic know you wish to host. That’s it!

    Share

    By

    TSQL Tuesday #005: Reports and Policy-Based Management

    It’s another month and so we have ourselves another T-SQL Tuesday event, this time hosted by Aaron Nelson (Blog | Twitter) with this month’s theme being Reporting. If you don’t know what T-SQL Tuesday is here’s a quick blurb from Aaron’s blog:

    You Don’t Know What T-SQL Tuesday Is Yet?

    Adam Machanic (Also on twitter as @AdamMachanic) had a great idea 5 months back – Invite new and existing SQL Server bloggers to post about the same topic on the same day. The results have been excellent – diverse skill sets and data related job roles all posting from differing perspectives on the same issue.

    Since this is still early in the game, a quick list of the post roundups from the first 4 topics:

    So given that this month we (Ken Simmons, Colin Stasiuk and myself) are proud to be releasing Pro SQL Server 2008 Policy-Based Management I figured this month’s TSQL Tuesday could tie in nicely. So how can one use Reporting Services in conjunction with the power of Policy-Based Management (PBM) in SQL 2008? Well, you’re in luck!

    Read More

    Share