SQLvariations: SQL Server, a little PowerShell, maybe some Hyper-V Rotating Header Image

Atlanta MDF Presents Three Awesome Pre-Cons in Atlanta April 13, 2012

Atlanta MDF presents:

SQL Saturday #111 Pre-Conference Sessions

imageSQL Saturday is coming back to Atlanta on April 14, and once again, we’ve managed to schedule 3 awesome pre-con sessions for the Friday before (April 13). They will cover a broad spectrum of topics: Performance Tuning, SSIS, and SSRS. Registration is limited, so go take a look and see if you or someone from your company can benefit from this great training opportunity.

Also don’t forget that we will have an absolutely amazing lineup of presenters for Saturday! We’ll be announcing the final schedule for SQL Saturday #111 by Monday, February 13th. Registration is open, and we’re already halfway to capacity, so head out to SQLSaturday.com to reserve your seat.

_____________________________________________________________

Andy Leonard and Matt Masson– A Day of SSIS – http://dayofssis.eventbrite.com/

A Day of SSIS was developed by Andy Leonard to train technology professionals in the fine art of using SQL Server Integration Services (SSIS) to build data integration and Extract-Transform-Load (ETL) solutions. The training is focused around lectures and emphasizes a practical approach. The target audience for this training is database professionals, application developers, and business intelligence practitioners interested in acquiring or expanding their existing SSIS skill set. No experience with SQL Server or SQL Server Integration Services is required before attending this training. It is helpful (but not required) that students possess some knowledge of and experience with relational databases. SQL Server knowledge / experience will be more helpful than experience and knowledge with other technologies.

_____________________________________________________________

Adam Machanic – No More Guessing! An Enlightened Approach to Performance Troubleshooting – http://nomoreguessing.eventbrite.com/

Scratching your head, you stare at the screen. Should you rebuild an index? Create a new one? Reboot the server? Why is this query so slow?!? Figuring out performance problems can sometimes feel like fumbling your way through a dark room. Maybe you’ll get lucky and find the right solution―or maybe you’ll stub your toe. Either way, it’s a slow, potentially painful process. Yet finding the root cause of most performance issues is a simple exercise, once you understand where to look and when. In this full day seminar, you will learn a proven methodology that can be used to approach virtually any performance problem. Created and refined by Adam Machanic over several years, this strategy leverages core SQL Server performance tools (including dynamic management views, Extended Events, and WMI counters), applying them to various performance troubleshooting techniques (such as waits and queues analysis, baselining, and real-time activity monitoring). Each of these tools and techniques has a unique role, and you will learn to use them cooperatively to quickly and adaptively find the actual cause of performance issues. All of this will be illustrated through complete demonstrations that will teach you how to drill from high-level problem detection all the way to specific spot in a query plan or deeper―pinpointing the exact problem and helping you to quickly solve it. Attend this seminar to take full control of your databases—and never again stumble blindly through the dimly lit world of performance troubleshooting.

_____________________________________________________________

Jessica Moss – Learn SSRS in a Day – http://ssrsinaday.eventbrite.com/

SQL Server MVP, Jessica M. Moss, presents an exciting, introductory, full day training session on SQL Server Reporting Services 2008 R2. In the three-part class, Jessica will teach you how to build reports from the ground up. In Part 1, learn the basics of report development, including picking a report development tool and creating your first report. Part 2 delves into visualizations, groupings, and drill-down functionality. Finally, Part 3 highlights core administration tasks in Reporting Services. In addition, Jessica will point out industry-wide best practices for report development and show numerous live demos using a variety of data sources.

Friday, April 13, 2012

Georgia State University – Alpharetta
3775 Brookside Pkwy
Alpharetta, GA

Map picture

 

Register for pre-conference sessions by March 15 for $99!
($109 after March 15)

For registration to the Saturday Event and more information visit http://www.sqlsaturday.com/111/eventhome.aspx.

PowerShell Presentation at SQLskills open-mic night

Kimberly Tripp ( blog | twitter ) and Paul Randal ( blog | twitter ) SQLsklls are here in Atlanta this week.  Last night they held an ‘open mic’ night and allowed anyone who wanted to present a topic 15 minutes to show something to the rest of the class.  Surprise, surprise I decided to talk about PowerShell.

I received multiple requests to post the scripts I used before I even had a chance to sit down so here they are.

If you were in the class and would like to use these and don’t even know where to start with PowerShell have a look at my “Resources for my SQL Server PowerShell Extensions webcast” post.

If you ever get a chance to attend one of their classes and present in front of Paul and Kim TAKE IT! :-)   Even if it’s just about your SSMS tips or how to work around a problem you encountered.  The feedback you get is *more* than worth it!

Quick Blog: Grabbing basic machine info with PowerShell

The other day I needed to track down how much RAM a couple of our servers had installed.  A few days later I needed to verify that a couple of them were in fact 64-bit and not 32-bit.  I decided I wanted to be able to get at this basic info any time that I wanted without having to remember all the syntax so I built it into a PowerShell function.

Building a PowerShell function is almost as easy easier than building a stored procedure around a select statement in SQL.  The reason PowerShell is easier than SQL is that when you have a parameter that you are passing in, you can give it a data type, but you don’t have to.

For the function below I gave it a default value of the local machine but you can pass in a machine name that you are trying to get to.

Just copy the code below into an ISE window and hit F5.

function Get-MachineInfo($ServerName="localhost")
{
get-wmiobject win32_computersystem -ComputerName $ServerName |
select DNSHostName, Manufacturer, Model, SystemType ,
        @{Name="TotalPhysicalMemoryInMB";Expression={"{0:n2}" -f($_.TotalPhysicalMemory/1mb)}},
        NumberOfLogicalProcessors, NumberOfProcessors, CurrentTimeZone, DaylightInEffect
}# End Get-MachineInfo

After you’ve done that, to call the stored proc function simply type in the name ( Get-MachineInfo ) to the prompt at the bottom and hit enter

image

My First MSSQLTip!

imageToday my first ever MSSQLTip was published.  Before you ask: Yes, it talked about PowerShell.

It came about because some of the SQL MVPs were trying to figure out the best way to download a VM that had been split up into 36 different equal-sized files.  I’m sure there’s a better way than this but at the same time it took me about 4 minutes to write.  Write is the wrong term, more like copy/paste/change a few things.

Give it a whirl and let me know what you think!  Smile

Scripts for presentation today at the 2011 PASS Summit

I’m presenting at the PASS Summit today and just wanted to post the scripts I plan on using.  If you’re following along and you’re new to PowerShell I recommend that you have a look at this article I wrote earlier this year: Day Zero with PowerShell

  1. Table Size
    1. Store Results
  2. Compress Tables
    1. Compress Indexes
    2. Store Results
  3. Process Cube
  4. Backup Database –PassThru
  5. Download Denali CTP
  6. Grab Configuration Info
  7. New Get-DisksSpace try to pass from Reg servers w/ Group
  8. Email Space Report
  9. CSV with Bulk Insert
  10. Import CSV with Out-DataTable
  11. Allen Kinsel – Logs
  12. SQL Saturday – Navigate Event Schedule XML

Whats in my PowerShell Profile

Here are two zip files.  The first file is my profile and the second zip file is the scripts that my profiles references.  These are just some of the tools I find useful for enhancing PowerShell.

Resources for my SQL Server PowerShell Extensions webcast

imageI did another webcast for the Secrets of SQL Server webcast series today.  In the today’s webcast we built on some things I had demoed in a prior webcast and showed how PowerShell in conjunction with SQLPSX can really help you solve some common problems DBAs face.

I showed how you could pull size and free space information from all of your data files, then used the same technique to pull size information from all of your tables across every database on an instance.  Later we created a database and some tables, and then showed how to do some basic login comparisons, all with SQLPSX.

In addition, we stored the results of the frees pace and table size information in a database using the Out-DataTable and Write-DataTable functions.  Finally we wrapped up with a quick demo on how the new SQL Server cmdlets inside of the SQLPS Module in Denali combined with some new functionality in PowerShell v3 CTP1 can really make backing up a database with PowerShell a lot easier.

Here’s what you’ll need to recreate today’s demos;

I hope I see you next week at the PASS Summit or next month during another webcast, this time on customizing your own functions to work with the SMO.

And We’re Back!

This page has been intentionally left blank for most of the last 4 months while I get some higher priority items taken care of. The hole in my theory about taking a break from blogging and being on twitter was that hundreds of people still have questions about PowerShell and my email address. I plan to post the answers to those questions over the next several weeks.

In the meantime I want to give a quick mention about SQL Saturday #89 happening here in Atlanta in just 12 days. We’ve hit the maximum number of registrations we feel comfortable handling. If you’re on the wait list, we’ll send out an email later this week to people that were able to successfully register but now can’t make it, asking them to unregister. From the looks of the registration counts this might end up being a little under twice the size of last year’s SQL Saturday.

More blogs coming soon!