Wanting to learn

  • Much better would have been to create an SSMS server group(s) with all the relevant servers in it(them), then fire off the script for a given server group(s) whenever needed.  There's no need to connect separately to every server/instance.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • ScottPletcher wrote:

    Much better would have been to create an SSMS server group(s) with all the relevant servers in it(them), then fire off the script for a given server group(s) whenever needed.  There's no need to connect separately to every server/instance.

    I love the server group feature - don't use it much, but for certain ad-hoc yet semi-repetitive stuff it can save a lot of time, clicks and oversights.

    I get the feeling it's often overlooked.

    "Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information upon it. When we enquire into any subject, the first thing we have to do is to know what books have treated of it. This leads us to look at catalogues, and at the backs of books in libraries."
    — Samuel Johnson
    I wonder, would the great Samuel Johnson have replaced that with "GIYF" now?

  • Jeff Moden wrote:

    That's a great story, Grant, and I 100% agree that's was an appropriate use of PowerShell.  The question is, would you have been comfortable in letting someone who didn't know how to take a backup in SQL Server write and use that script?

    My point is that if you don't know the "Gazintas", you shouldn't use PowerShell to do it either.

    There's no getting around the simple fact that it's both. You need to able to automate on demand, and you need to know what the heck it is you're automating. I've said it before, and it bears repeating, automation can be a way to dig a hole, deeper and faster. Powershell is not magic. It's another tool in the toolbox.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • ScottPletcher wrote:

    Much better would have been to create an SSMS server group(s) with all the relevant servers in it(them), then fire off the script for a given server group(s) whenever needed.  There's no need to connect separately to every server/instance.

    Why set up server groups for a one time use on a somewhat arbitrary list of servers (I think they were going by location in the old facility... or maybe the new one, I forget, it was a long time ago)? That would have been a bunch of wasted work.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Grant Fritchey wrote:

    ScottPletcher wrote:

    Much better would have been to create an SSMS server group(s) with all the relevant servers in it(them), then fire off the script for a given server group(s) whenever needed.  There's no need to connect separately to every server/instance.

    Why set up server groups for a one time use on a somewhat arbitrary list of servers (I think they were going by location in the old facility... or maybe the new one, I forget, it was a long time ago)? That would have been a bunch of wasted work.

    "A bunch of wasted work"?  If you have the list of servers, it's literally just typing in the individual names, and one new name for the group.  Presumably you'd really need only one group if you're running the same command across all servers.  It's just executing your "magic master" script to do db backups, right?

    To me that's far less work than creating any kind of PowerShell script, and much more understandable to almost everyone who comes after you.  Everyone should be able to use server groups.  Not that many people are that comfortable with PS.  You might think they should be, but in the real world, many are just not.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Hello,

    I would also suggest the following book, which gives a combination of technical and professional advice that I have found extremely helpful. Don't get me wrong - I am very far from being an exceptional DBA, but I now know what to aspire to.

    https://www.red-gate.com/library/how-to-become-an-exceptional-dba-2nd-edition

    Best of luck.

    -- webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

Viewing 6 posts - 16 through 20 (of 20 total)

You must be logged in to reply to this topic. Login to reply