Midnight DBA
Summary: Tutorial videos and our live weekly webshow, DBAs@Midnight, from the MidnightDBAs. Here we focus on SQL Server and Powershell, but we cover all things related to DBAs. We teach everything from SSIS to Windows and networking, to Powershell tricks.
- Visit Website
- RSS
- Artist: Sean McCown and Jen McCown
- Copyright: MidnightDBA.com
Podcasts:
This week we talk about what would happen if you ran your life like Sean's last company ran IT. And I believe we also do gross bathrooms at work, and even managed to throw in some techie stuff.
This week we have a big collection of end user mistakes, stupid vendors, chewing out DBAs, and more. Oh, and we unveil our newest award.
We've decided to become a kinder, gentler show. We're no longer going to be sarcastic, hurtful, or unsupportive... for this show anyway. This is going to be a fun ride.
I heard someone today say that you can't change startup parameters in Powershell. So I made this vid to set the record straight.
Here I show you how to truncate a mass of tables in the same schema. Of course, you don't have to limit it to a single schema if you don't want.
Today I'm dropping tables based off of a regex expression and by rowcount. Good stuff here. The power of the shell shines through with the easy regex expression.
I love making vids on the trickier stuff and this one is it. Here we're talking about duplicating sp_configure in Powershell. It's pretty easy, but there's a trick to it.
Here I show you how to turn off AutoShrink on a DB and then how to make sure it's turned off on all your DBs.
Here we're finding the root install directory for SQL Server.
This continues the series on detach/attach for DBs. Along the way I show you how to deal with a powershell provider bug, work with the stringCollection object, and use all 4 overloads for the AttachDatabase method.
Getting IP address and DNS info from your servers in a useful format isn't as straightforward as you would think. Here I'm going to show you how to get that info painlessly and in a way you can use for all your automated processes.
Detaching DBs in Powershell is pretty easy, which is why you should learn how to do it. It takes less typing than the t-sql version. However, there are also methods for discovering which files belong to the DB that was detached and that can be invaluable when you're trying to attach a DB on a big server and you don't know where all the files may be.
Changing object schemas is easy enough in T-SQL when it's a single object, but it get considerably more complicated when you've got several objects to change, or even several thousand. This is where Powershell comes in. Here I show you how to very easily change the schema of as many objects as you like in just a few seconds. And I throw in some regex in there for good measure. Let's have some fun.
Here I show you how to change permissions in SQL Server using Powershell. There are 2 methods I discuss and I even show you some of the problems you can run into. This is the 1st in a series so be sure to watch the 2nd one too. In This video I also reference a couple other vids. Those are here:<br><a href = "http://midnightdba.itbookworm.com/VidPages/PowershellScriptDBObjects/PowershellScriptDBObjects.aspx">Scripting DB Objects in Powershell (Advanced Topics)</a><br> <a href = "http://midnightdba.itbookworm.com/VidPages/PowershellCycleErrorLog/PowershellCycleErrorLog.aspx">Cycle Error Log on all Servers using Powershell</a>
Continuing from the 1st video, here I show you how to capture useful errors from the method call. I explain how to Trap the errors and loop through InnerException to make sure you get all of them. If you saw the last vid, you can't miss this one.