This is our 2nd session on backup tuning. Today Continue reading “Backup Tuning: Part 02”
Category: Administration
Backup Tuning – Part 1
This is an extension of my backup tuning session that Continue reading “Backup Tuning – Part 1”
Microsoft SQL Server – Powershell Splatting
Help keep your command code organized by splatting parameters. Continue reading “Microsoft SQL Server – Powershell Splatting”
Minion Backup Intro Webinar: 6/1/2016
This is an intro to Minion Backup that shows you Continue reading “Minion Backup Intro Webinar: 6/1/2016”
Powershell Classes: Part 5 – Inheritance con’t
Here we finish up the discussion on inheritance and we Continue reading “Powershell Classes: Part 5 – Inheritance con’t”
Powershell Classes: Part 3
This is part 3 of our series on how to
create classes in powershell.
We start by going over homework and then get into hidden classes and creating a fire hazard in our code.
Watch Part 1
Watch Part 2
Watch Part 4
Watch Part 5
Classes in Powershell: Part 2
Here I’m continuing my live class in writing classes in powershell. We go over adding some useful properties and developing a help system.
Classes in Powershell: Part 1
Ever want to create your own classes in powershell? Continue reading “Classes in Powershell: Part 1”
The Truth About SQL Security
Here I show you how xp_cmdshell isn’t the danger everyone Continue reading “The Truth About SQL Security”
Powershell Error Handling Basics 2
Continuing with our discussion on PS error handling.
Watch the first vid here:
XP_CmdShell Default Proxy
Most DBAs don’t think of it, but xp_cmdshell has a
default proxy account. In fact, this proxy is responsible for its permissions, and actually follows Microsoft’s current external script security strategy. So xp_cmdshell isn’t unique and it doesn’t do anything special security-wise.
Here you’ll see how to test which credentials xp_cmdshell is using. It’s actually pretty easy.
Powershell Error Handling Basics
This is a live session where I teach someone the
basics of PS error handling.
Here’s the 1st vid in the series.
Beginning SQL Server SMO
Recently I was invited to talk about beginning SMO on Continue reading “Beginning SQL Server SMO”
Loading SQL Data From Powershell
Learn how to load data into and out of SQL Continue reading “Loading SQL Data From Powershell”
REGEX for DBAs
This is the version of my session that works with Continue reading “REGEX for DBAs”
Series: Setup SQL Server Cluster- 9 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 9 of 15”
Series: Setup SQL Server Cluster- 11 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 11 of 15”
Series: Setup SQL Server Cluster- 12 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 12 of 15”
Series: Setup SQL Server Cluster- 2 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 2 of 15”
Series: Setup SQL Server Cluster- 1 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 1 of 15”
Series: Setup SQL Server Cluster- 4 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 4 of 15”
Series: Setup SQL Server Cluster- 13 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 13 of 15”
Series: Setup SQL Server Cluster- 3 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 3 of 15”
Series: Setup SQL Server Cluster- 10 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 10 of 15”
Series: Setup SQL Server Cluster- 14 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 14 of 15”
Series: Setup SQL Server Cluster- 6 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 6 of 15”
Series: Setup SQL Server Cluster- 15 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 15 of 15”
Series: Setup SQL Server Cluster- 5 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 5 of 15”
Series: Setup SQL Server Cluster- 8 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 8 of 15”
Series: Setup SQL Server Cluster- 7 of 15
This is a training course that was intended to be Continue reading “Series: Setup SQL Server Cluster- 7 of 15”
REGEX: Use Lookbehind for PRINT Statements
Regular find can’t show you negative searches. That’s searches where letters don’t exist. So here I’m going to show you how to find Continue reading “REGEX: Use Lookbehind for PRINT Statements”
Beginning Powershell for DBAs: Part 1
The time has come where DBAs can no longer afford to ignore Powershell. Not only has it become an integral part of SQL Server, but Continue reading “Beginning Powershell for DBAs: Part 1”
Sean’s Famous Backup Tuning class!
Yes, you can tune your SQL Server backups!
Have you ever gotten tired of your 1TB database taking 4+ hrs to backup? Are you sick of Continue reading “Sean’s Famous Backup Tuning class!”
Regex: Removing Restore Statement Dupes
This is a great video to show you how to think in a way that gets you a good regex. Here I’ve got SQL Continue reading “Regex: Removing Restore Statement Dupes”
What are Orphaned Users?
Here I’ll describe what an orphaned user is and how it happens. I’ll even show you how to produce the condition yourself. Orphaned Continue reading “What are Orphaned Users?”
Replication: Initialize with Backup
Sometimes your DB is so big you need to initialize replication with a backup and restore instead of a snapshot. Here I show you Continue reading “Replication: Initialize with Backup”
Minion Backup: Regex vs. DBGroups
In Minion Backup, you can use regex to include/exclude DBs from a backup. This actually works with all of the modules, so it’s included Continue reading “Minion Backup: Regex vs. DBGroups”
Minion Backup: Exclude DBs by Size
In Minion Backup you can exclude DBs from backup based on any criteria you like. Here I’ll show you a good example with excluding Continue reading “Minion Backup: Exclude DBs by Size”
Regex Word Boundary Example
It’s one thing to know the syntax for word boundaries in regex and it’s another to actually be able to use them. So here Continue reading “Regex Word Boundary Example”
Regex Word Boundaries
Here I’m going to show you how to use regex word boundaries. Word boundaries allow you to match entire words, or even words that Continue reading “Regex Word Boundaries”
Regex Lookarounds
In regex you can perform lookarounds to check for matches that don’t get consumed. These are zero-length assertions that merely report the match. Here Continue reading “Regex Lookarounds”
Find double words in regex
Here I show you how to use a backreference in regex to be able to find double words in regex. What you’ll learn how to do Continue reading “Find double words in regex”
Find Log Space Used
Find out how to query the log space usage for all DBs on the server with a single statement. This is a quick way Continue reading “Find Log Space Used”
How to set PasswordNeverExpires for Office 365 Users
In O365 you can only set a user password to never expire using powershell. Here I show you how to do it.
Here are the Continue reading “How to set PasswordNeverExpires for Office 365 Users”
SSMS: Client Stats
Proving a query is inefficient can be hard, but with solid numbers to back you up, you’ll be able to prove that a huge query Continue reading “SSMS: Client Stats”
Get into SQL
Have you ever found yourself locked out of SQL because your account doesn’t have rights and you don’t know the sa password? Here I Continue reading “Get into SQL”
Script PK/FKs in Powershell
Here I show you how to script out objects that belong to tables like primary keys, forgeign keys, constraints, and indexes with powershell. It’s Continue reading “Script PK/FKs in Powershell”
Object Properties in Powershell
This is a great video that shows you how to look at the properties collection in objects and explains what the different properties mean. Continue reading “Object Properties in Powershell”
Best Backup Class Evar: 4 of 6
The 4th in the backup class at NTSSUG.
Optimize For Adhoc Workloads
There’s a lovely sp_configure option that can help you keep the size of your plan cache under control. Let’s go have some fun.
Server Properties
Have you ever wanted to be able to view instance-level stats or change certain values without having to use the GUI? Here I’ll show Continue reading “Server Properties”
Find File Lock
Have you ever been plagued by a file you couldn’t delete or move because it was being held open by something else? Well here Continue reading “Find File Lock”
Change Users Password
Users don’t need special permissions to change their own passwords, but there is a minor trick to it. Here I’ll show you 3 ways Continue reading “Change Users Password”
Best Backup Class Evar: 2 of 6
The 2nd in the backup class at NTSSUG.
Best Backup Class Evar: 3 of 6
The 3rd in the backup class at NTSSUG.
Best Backup Class Evar: 5 of 6
The 5th in the backup class at NTSSUG.
Best Backup Class Evar: 6 of 6
The 6th in the backup class at NTSSUG.
Troubleshoot Default Schema
Here I troubleshoot why a user’s default schema isn’t being honored.
Get SQL Server Root Dir in Powershell
Here we’re finding the root install directory for SQL Server.
Truncate Tables in Powershell
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 Continue reading “Truncate Tables in Powershell”
Drop Tables in Powershell
Today I’m dropping tables based off of a regex expression and by rowcount. Good stuff here. The power of the shell shines through Continue reading “Drop Tables in Powershell”
Server Configuration Settings in Powershell
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 Continue reading “Server Configuration Settings in Powershell”
Change Startup Params in Powershell
I heard someone today say that you can’t change startup parameters in Powershell. So I made this vid to set the record straight.
NCC-1701-DBA: 1 of 6
This is the first of a series to teach you how to think like and become an enterprise DBA. The skills and the mindset Continue reading “NCC-1701-DBA: 1 of 6”
Cycle Error Log on all Servers using Powershell
Here I show you how to use the Carrier Method for using powershell to cycle all your error logs. This is an excellent way Continue reading “Cycle Error Log on all Servers using Powershell”
Read SQL Server Error Logs in Powershell
Would you like to work with the SQL Server error logs in Powershell? Well here I’m gonna show you how. Not only do Continue reading “Read SQL Server Error Logs in Powershell”
Change SQL Server Permissions in Powershell: Part 2
Continuing from the 1st video, here I show you how to capture useful errors from the method call. I explain how to Trap the Continue reading “Change SQL Server Permissions in Powershell: Part 2”
Change Schema in Powershell
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 Continue reading “Change Schema in Powershell”
Get IP and DNS in Powershell
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 Continue reading “Get IP and DNS in Powershell”
Calling Detach Methods in Powershell
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 Continue reading “Calling Detach Methods in Powershell”
Attach DBs in Powershell
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 Continue reading “Attach DBs in Powershell”
Fix AutoShrink in Powershell
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.
Monitoring SAN Space
Monitoring SAN Space.
Replace sp_MSForEachDB with Powershell
A user request came in to write something in powershell that would replace sp_MSForEachDB. I took it a step further and showed you how Continue reading “Replace sp_MSForEachDB with Powershell”
Waits and Queues
Thomas LaRock from Confio came to give us this really good talk on waits and queues. And as an added bonus, the entire PASS Continue reading “Waits and Queues”
Sum DB Sizes with Powershell
Quite often it can be useful to not only get a list of DB sizes, but also sum it up in the last line. Continue reading “Sum DB Sizes with Powershell”
Windows Crash Dump Analysis
If Windows has ever bluescreened on you, then you know how important it can be to find the issue. Windows creates a crash dump Continue reading “Windows Crash Dump Analysis”
Find query timeouts in Profiler
I like this video. This is a simple example of how you can track down queries that are timing out. Be careful though. Continue reading “Find query timeouts in Profiler”
Database Performance
Paul and Kim Tripp from SQLSkills.com came to teach us their award-winning presentation on DB performance.
Uninstall a CU in SQL Server 2008 R2
Here I’ll show you how to uninstall a CU from SQL Server 2008 R2, CU5 to be specific, but it doesn’t matter. Here there’s Continue reading “Uninstall a CU in SQL Server 2008 R2”
Loading Files without SSIS
Loading Files without SSIS.
Audit Service Accounts with Powershell
How would you like to be able to audit your service accounts with powershell so you can tell how many boxes are running on the Continue reading “Audit Service Accounts with Powershell”
Monitor Backups with Powershell
I know you guys are just begging for an easy way to monitor your backups and alert when one hasn’t been backed up recently. Continue reading “Monitor Backups with Powershell”
Clustering 101
SPEAKER: Kaylan Yella. We were fortunate enough to get someone of his skill to teach us about clustering. The basics take a lot Continue reading “Clustering 101”
Correlate Lock Timeouts with Statements
I’ve been getting lock timeouts on one of my systems, so I captured the timeouts in a profiler trace. Here, we walk through developing a Continue reading “Correlate Lock Timeouts with Statements”
Clustering: Part 2
Here we have the 2nd class by Kal. This time he was cool enough to take time out of his busy schedule and record Continue reading “Clustering: Part 2”
Clustering: Part 3
Here we have the 3rd class by Kal. This time he was cool enough to take time out of his busy schedule and record Continue reading “Clustering: Part 3”
Beginning Execution Plans
Here’s a level zero introduction to tuning queries. I go over execution plans, sp_help, and clustered primary key indexes.
Start Agent Jobs in Powershell
Starting SQL Agent jobs in powershell is easy, but there’s a trick to it that’s not obvious. Here I’ll show you how to start Continue reading “Start Agent Jobs in Powershell”
Start Agent Jobs in Powershell: Part 2
Starting SQL Agent jobs in powershell part 2.
Manage DB Files in Powershell
I’m excited to be able to film this one because it has the potential to save you so much time and effort. I’m showing Continue reading “Manage DB Files in Powershell”
Get Table Stats with Powershell
Let’s get stats for every table in the DB and put them in a file so we can send them to a customer or view Continue reading “Get Table Stats with Powershell”
Build .Net Objects in Powershell
I just love the topic of this video. Here we show you how to create .NET code with powershell. While we create an Continue reading “Build .Net Objects in Powershell”
Change DB Compatibility Level in Powershell
Here I show you 2 easy ways to change the DB compatibility level in powershell. Otherwise you have to use a T-SQL cursor and Continue reading “Change DB Compatibility Level in Powershell”
Get a Specific Method in Powershell
Sometimes the list of properties and methods is too big to sift through when you do a get-member on an object. Here I’ll show Continue reading “Get a Specific Method in Powershell”
Add User to Windows Group with Powershell
I love this video because it’s so unusual to find something like it in the DBA community. We’re quite often called on to do Continue reading “Add User to Windows Group with Powershell”
Uninstalling SP1 in SQL2K8
SP1 is the first one that you can uninstall in SQL Server, so here I thought I’d take a look at the uninstall process and Continue reading “Uninstalling SP1 in SQL2K8”
Replace Text in File
Here I show you how to replace a given string in a file and either write it back to the same file, or write the Continue reading “Replace Text in File”
Index Scripting Problems
This is just a fun vid. Again, we’re sitting here late at night feeling a little punchy so we’re a little goofier than usual.
Troubleshoot Missing DB File
Come with me on a quick trip to see how to troubleshoot a missing database file.
Setup Server-Side Trace
server side traces, the benefits, and how to set up, edit, run, and stop a server side trace.
Recover SQL Passwords
Did you know that SQL Server stores username/password combos in cleartext in memory? And did you know that you can also use a debugger to Continue reading “Recover SQL Passwords”
Beginning Powershell for DBAs 4
Here I continue with the 4th class in the series at the NTSSUG user group.
Find DB Files with Powershell
Here I need to find the .MDF for a database so I can attach it, but I have no idea where the .MDF is.
Pass Params to Scripts (Powershell)
Wanna know how to pass parameters to scripts, and when to use each method?
Katmai Server Group Management
Learn how to use the new group server mgmt functionality in the Katmai SSMS.
Katmai’s Search Feature
Here I explore Katmai’s new search feature.
Cool New SSMS Features for DBAs
I give MS a hard time sometimes so I like to give them props when I find something really worth it. And here I Continue reading “Cool New SSMS Features for DBAs”
SSMS Fast Load
Here I show you how to get SSMS to get SSMS to load a lot faster so you don’t have to wait.
Compression Basics
I’m going over the basics of how to implement data compression here. I’m not really touching on where and why you’d want to do Continue reading “Compression Basics”
Building a Powershell BCP Routine
Here I show you how to build a script that will BCP an entire group of tables and even log the progress. You can Continue reading “Building a Powershell BCP Routine”
Beginning Powershell for DBAs 1
This is an excellent video that explains what schemas are and why you should care.
CACTUSS Sept 2017 Meeting – Regular Expressions for the DBA
This was recorded for http://cactuss.pass.org for their Sept 2017 user group meeting.
Regular expressions can help you perform incredible tasks with very little Continue reading “CACTUSS Sept 2017 Meeting – Regular Expressions for the DBA”
BCP out
Learn how to BCP data out of a table.
BCP in
Learn how to BCP data into a table.
BCP in errors
Learn how to diagnose BCP import problems.
Remote Backups
Learn how to do a backup across the LAN.
RESTORE with move
This one covers restore with move syntax to restore DBs while moving the files to a different location.
Simple Backup Procedures
This is a tutorial not only on how to turn your backup commands into SPs, but also the basics of stored procedures are discussed.
Backup with Init
In this video I discuss the init option for the backup command. You’ll come away knowing how to use it and what it’s for.
Windows Performance Monitoring: Part 1
This is a nice video that discusses the basics of performance monitoring in windows. This is actually a live class that I taught to Continue reading “Windows Performance Monitoring: Part 1”
Windows Performance Monitoring: Part 2
This is the continuation of the live presentation I did a couple weeks ago. This one covers disk counters, memory architecture, and counters.
Introduction to Schemas
This is an excellent video that explains what schemas are and why you should care.
PowerShell Basics
Here I start the first in an exciting new series of vids on PowerShell both in Windows and SQL. I go over how to Continue reading “PowerShell Basics”
Scripting DB Objects in PowerShell
Continuing with PowerShell I thought I’d show you something really cool you can do that would make a difference in your shop right away. So Continue reading “Scripting DB Objects in PowerShell”
Scripting DB Objects in Powershell (Advanced Topics)
Here I get past the basics of using the Script() method and take you to how to recreate some of the scripts you can create Continue reading “Scripting DB Objects in Powershell (Advanced Topics)”
Working with PSDrive in PowerShell
Here I go over what PSDrive is and how to work with it. I also go into aliases again as well as how to Continue reading “Working with PSDrive in PowerShell”
Powershell with –NoExit
Here I show you how to get around the problem of your Powershell window closing down when you call it from either the run window Continue reading “Powershell with –NoExit”
Grant DB Permissions
This is a beautiful bit of script that allows you to set DB permissions for a user. This is particularly useful for adding a Continue reading “Grant DB Permissions”
Grant Schema Permissions in Powershell
This is another excellent video that shows the power of powershell in SQL administration. I love this video because it’s a very common scenario Continue reading “Grant Schema Permissions in Powershell”
Powershell Profiles
Here I finally address how to connect to SQL Server from powershell proper by adding the SQL Server snapins. Then I show you how Continue reading “Powershell Profiles”
Beginning Powershell for DBAs 2
This is the 2nd video in the schema series. Here I give you a really good reason to adopt schemas in your architectures. Hope Continue reading “Beginning Powershell for DBAs 2”
Schemas as Documentation
This is the 2nd video in the schema series. Here I give you a really good reason to adopt schemas in your architectures. Hope Continue reading “Schemas as Documentation”
Schemas: Ownership Chaining and Schema Ownership
Continuing with schemas, here I talk about ownership chaining and how schema ownership effects them. I start with the basics of chaining and then get Continue reading “Schemas: Ownership Chaining and Schema Ownership”
Change SQL Server Job Owner
This is a really cool method for changing SQL job owners or any job property I would imagine. It really simplifies it from using Continue reading “Change SQL Server Job Owner”
Trace Flag 1807
This one covers restore with move syntax to restore DBs while moving the files to a different location.
When did SQL Server Start?
Find out 2 ways to tell when SQL Server started.
Moving DB Files
Moving database files is easy, but misunderstood. Here I’ll show you how to move user DB files using 2 methods.
Interpreting Disk Queues
Disk queues are a mystery for the majority of DBAs. They may know that they need to look at them, but they have no Continue reading “Interpreting Disk Queues”
Running Websites with AD Accounts
This is an excellent tutorial on how to run a website under a specific AD account so you can use windows authentication in the database. Continue reading “Running Websites with AD Accounts”
Using ServerProperty
Here I show you the benefit of using ServerProperty() instead of @@Version to find the version of SQL Server you’re on.
Troubleshoot DB Connection with Telnet
Here I show you how to trouble a DB connection issue to eliminate the firewall as a suspect. Using telnet you can tell pretty clearly Continue reading “Troubleshoot DB Connection with Telnet”
RunAs Magic
This is a really good video on how to use the RunAs utility in windows. There are several scenarios when a DBA/Dev may need Continue reading “RunAs Magic”
Beginning Programming with Powershell
Have you ever wanted to learn how to code, but you don’t think you have enough knowledge to jump into a class? In this Continue reading “Beginning Programming with Powershell”
The Enterprise Maintenance Lifecycle: Problems & Solutions
Database maintenance isn’t a single event; it’s a lifecycle. Aside from the maintenance event itself, there’s also reporting, error management, specialized configs, HA/DR and more. Continue reading “The Enterprise Maintenance Lifecycle: Problems & Solutions”
Hack-attak a damaged DB
What do you do if you have a set of data and log files you can’t attach because the log is damaged? Here I show Continue reading “Hack-attak a damaged DB”
Backup File Extensions
Here I talk about how you can use the file extensions to your advantage, but also have a little fun with it too.
Simple Backup
Here I show you how to do simple backups in SQL.
Minion Backup: Azure Backups
Here I show you how to setup backups to Azure blobs. This is an end to end video and I show you from both the Continue reading “Minion Backup: Azure Backups”