Blog Archives

How to drop a SQL database stuck in Restoring…

No idea where I got this (it’s been in Drafts forever), and now I kinda want to do it in PowerShell, but here’s some T-SQL to drop a hella stuck database.

Posted in SQL Server

Failed Domain Relationships on SQL Server Cluster Nodes

You know what’s scary as hell? When one node of an important cluster loses its trust relationship with the domain and you see the error “the trust relationship between this workstation and the primary domain failed”. That happened to me

Posted in Active Directory, PowerShell, SQL Server

PowerShell Conference EU 2016, psconf.eu

I’ll be presenting some sessions about SQL Server and PowerShell at the PowerShell Conference EU in Hanover, Germany on April 20-22! You should join me, because the speaker and session lineup is amaaazing!¬†Register at psconf.eu. Want to know more? Check

Posted in PowerShell, SQL Server

Import-CsvToSql: Super Fast CSV to SQL Server Import PowerShell Module

A while back, I wrote about High-Performance Techniques for Importing CSV to SQL Server using PowerShell. Earlier today, I released a PowerShell module, CsvSqlImport.psm1, which puts that post into practice. Using this module, it’s possible to import over 90,000 records

Posted in PowerShell, SQL Server

Reset-SqlSaPassword: Easily regain sa/sysadmin access to your SQL Servers

It’s obvious that I love PowerShell and SQL Server. Together, they allow SQL Server DBA’s to solve just about any problem. Most of my projects have come from questions posted in Reddit’s SQL Server subreddit, including my most recent project,

Posted in PowerShell, Security, SQL Server

Getting Total Number of Rows Copied in SqlBulkCopy Using PowerShell

Getting the total number of inserted rows for SqlBulkCopy should be easier, but I believe the easiest (and fastest) is by using reflection and some C# code within your PowerShell script. Thanks to user601543 at stackoverflow, I was able translate

Posted in PowerShell, SQL Server

Simplifying SQL Server Migrations using PowerShell

Recently, I did a webcast for the PowerShell Virtual Chapter of PASS on Simplifying SQL Server Migrations using PowerShell. If you’re planning for a SQL Server migration, I wrote a bunch of scripts that can help, and put them all

Posted in PowerShell, SQL Server

Sudden High CPU Utilization and Query Performance Decrease | When Query Plans Go Bad

Each morning when I get into the office, I check performance graphs in SolarWinds Database Performance Analyzer (DPA Рformerly Confio Ignite).  Monday mornings are usually the most important, because I run full system maintenance on a specific monitored database

Posted in SQL Server

About

We are IT pros who grew up living and loving life in Cajun Country.

Authors


Chrissy LeMaire
View Chrissy LeMaire, BSc. MCITP's profile on LinkedIn


Brandon Abshire
View Brandon Abshire, MCDBA's profile on LinkedIn

Awards



Chrissy LeMaire
Microsoft PowerShell MVP

Belgian PowerShell User Group

transparent logo