Fun with SQL, Excel, and Powershell

SQL Server MVP Deep Dives 2, Chapter 10

Discover your servers with Powershell and SMO – by Joe Webb (B|T)

I’m finally back to my chapter reviews and I restarted with a fun one. I know enough to be dangerous with powershell, but I don’t use it enough to keep it fresh in my brain. Right off I liked the idea of this chapter because I got to play with scripting and do something a little different (at least for me). I know there are other ways of gathering this type of data us ing T-SQL (Brent Ozar’s sp_blitz being the first one that comes to mind), but I haven’t done it with powershell before and I certainly never used powershell with Excel before.

Continue reading

Advertisements

Reaching Capacity

SQL Server MVP Deep Dives 2, Chapter 9

Capacity Planning – by Greg Larsen (B|T)

I can file this chapter with many of the others under, “Things I wish I had read earlier in my career”. A good part of that career was at a small company and we were able to gauge our database capacity by the number of clients we had with pretty good results. This worked well because as we added more clients we had capital to add more database resources. Until…we wanted to add a very large number of clients all at once. People came to me for estimates on what we would need to handle the sudden jump and I could give pretty good estimates for disk space, but I had not been tracking our capacity for other things like memory, CPU and I/O.I knew the  infrastructure we had would not be up to the task, but I didn’t have the information to back it up. Greg Larsen’s chapter in Deep Dives not only explains why you need to have these metrics, but he provides examples on which specific counters you should start looking at and how to gather them.

You won’t believe how quickly management will authorize the purchasing of a new machine when you produce a nice colorful graph showing how the various performance metrics are getting close to reaching your machine’s theoretical hardware limits. – Chapter 9, SQL Server MVP Deep Dives 2  Continue reading

Page by Page

SQL Server MVP Deep Dives 2, Chapter 8

Page Restores – by Gail Shaw (B|T)

Although performing page restores isn’t likely to be something that has to be done on a regular basis, anyone working with large databases should at least be familiar with the technique and requirements in case page restores should become necessary. – SQL Server MVP Deep Dives, chapter 8

So far the chapters in Deep Dives 2 have been about design and theory of how databases should be set up. There has been some practical advice and even some tools provided by the authors for accomplishing the concepts they describe, but Gail Shaw’s chapter on Page restores is the first one in the book that provides an end to end solution for a single task. Which is to say, I loved it. I have never had the occasion to perform a page restore, but after reading this chapter I know I have the steps to perform this task at my fingertips. Continue reading

Common Sense?

SQL Server MVP Deep Dives 2, Chapter 7

Increasing availability through testing – by Allan Hirt (B|T)

When first reading this chapter all of the advice seemed like common sense, but much like common sense, good testing is not so common. Allan outlines what the ideal situation should be for testing environments along with what things should be tested and how to manage change. He lists the four typical environments, Development, Testing, Staging, and Production along with good descriptions of each. My favorite point in this section was when he described a separate environment just for the administrators to do their own testing. Continue reading