In tonight's PowerScripting Podcast, I shared a few things about SQL Server on Linux, and talked a bit about SQLPS. All after a lengthy intro about my tech life and Cajun culture ;) You can watch the whole thing, skip to 28 minutes to the podcast intro, or skip to around 59 minutes for the SQL/Linux/SQLPS portion. Or …
Read MoreBack in 2013, I wrote about "Using Windows Authentication to Connect to SQL Server from Linux". Considering how convoluted using Linux can get, doing so was surprisingly straightforward then and it's even easier now. Want to see a webcast about this topic? Aaron Nelson and I recorded a session for the SQL …
Read MoreYES WE CAN! Microsoft responded and fixed these 3 major issues in SQL Server Management Studio March 2016 Refresh. Read more at "WE DID IT! Microsoft Fixed Those 3 SQLPS Issues in SQL Server 2016". I'll be honest, I don't use the SQLPS module even though I'm the perfect candidate. I've been a SQL Server DBA …
Read MoreTwo of my SQL Servers stopped working after an unexpected power outage. When I attempted to start them, they gave me an Access Denied error. These are two totally different machines (diff Win & diff SQL version) that both, after years of working, just stopped in their tracks with an Access Denied. This isn't an …
Read MoreYou 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 late last year with one of my SQL Server 2008 R2 nodes. The scary part …
Read MoreI'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 out PowerShellMagazine.com and psconf.eu!
Read MoreA 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 a second in optimized environments. In addition …
Read MoreNo 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 (if plain old restore database @dbname doesn't work). 1DECLARE @dbname sysname 2DECLARE @spid int 3DECLARE @dbid int 4SET @dbname = 'big' 5 6SELECT @spid = …
Read MoreIt'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, Reset-SqlSaPassword, which allows you to regain syadmin access to your SQL …
Read MoreGetting 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 his code for use within one of my own scripts. The Code Here's an …
Read More