Press "Enter" to skip to content

Category: Administration

Zero Records but Lots of Space Used

Jeff Iannucci solves a riddle:

Anyhow, it’s worthwhile to occasionally review the tables in a database to see which ones are growing every day, using the most space.

But what if during a review you see the largest table looks like this?

That’s around 24 GB of sweet drive space allocated for 0 records. But…how?

Let me show you how.

Click through to see how. My initial thought was LOB craziness but Jeff’s example doesn’t even need that.

Comments closed

Choosing a Cost Threshold for Parallelism

Andrea Allred doesn’t want to do things by the numbers:

Cost Threshold for Parallelism (CTfP) is one of my favorite server level settings in SQL Server. I remember the first time I heard this setting mentioned by Grant Fritchey. I quickly hopped on my servers and found them all set at the default (5) and adjusted them to 50 for the non SSRS servers and 30 for the SSRS ones. That was many years ago, but I had kept those numbers in my head because I didn’t know a better way.

Read on for a better way.

Comments closed

Deleting an RDS Instance

Chad Callihan takes out the trash:

We’ve created an AWS RDS instance and logged into it successfully. One thing to remember when creating test instances is when to them when you’re finished. While a lot of test instances I’ve created have been free tier, it’s still good to clean up rather than leave instances lingering. Today, let’s clean up a test instance.

Click through for the step-by-step on how to do this.

Comments closed

Not Optimizing for Ad Hoc Workloads

Erik Darling continues a thread:

A few weeks back, my friend Randolph (B|T) and I collaborated a bit on a blog post about Optimize For Ad Hoc Workloads.

Now that I’m a Microsoft Approved Blogger™️ and you all have to take me Very Seriously™️, I’d like to make a few of the points here in my own words, though I highly suggest reading Randolph’s post because it’s much better.

Randolph writes for a living. I’m just a consultant with some free time.

Click through for Erik’s thoughts. Before reading Randolph and Erik’s posts, my figuring on it was that it didn’t hurt and could help, so “on” was a good default. These posts lay out a good reason why the former isn’t true and the latter is less likely than it seems.

Comments closed

Restarting SQL Server during TDE Encryption

Tom Collins takes a risk:

I am planning on TDE encrypting a bunch of  large SQL Server databases. Due to potential IO contention issues during the work day , the plan is to encrypt these databases during the out of hrs period. If the encryption is triggered , but there is a SQL Server service restart during the encryption process , will  the encryption process be impacted when the SQL Server service restarts?

Click through to see what happens.

Comments closed

Methods to Export Azure SQL Database

Abhishek Shaha and Ahmed Mahmoud enumerate techniques to export an Azure SQL Database:

Export Azure SQL Database is a common request for Azure SQL DB customers, in this article we are going to list down some advanced scenarios, on how this can be achievable through various tools not limited to Azure Portal, Azure CLI and PowerShell. In addition, this article will provide alternative methods when it comes to private endpoints and deny public access.

Click through for several options.

Comments closed

SQL Server’s Central Management Server

Lee Markup builds a SQL Server inventory:

Today, we will be looking at using T-SQL and a Central Management Server to create a SQL Server inventory. Let’s say that you’re  new at this company or in this role and all you have right now is the list of SQL Servers that people know about. you haven’t been able to run the MAP Toolkit or maybe you’ve been told that you can’t run it for some reason. the list of SQL Servers that people “just know about” probably isn’t anywhere near complete, but you have to start somewhere.

These things are a life-saver, especially once you have more than a couple of instances to worry about.

Comments closed

Server Variables with Azure DB for MySQL

Arun Sirpal shows how to see and set server variables in Azure’s MySQL offering:

If you have used MySQL before you will know about the system server variables, you know such commands as SHOW VARIABLES; You can access most of them via the Azure portal or connect to MySQL and issues the commands you come to know about.

Let’s see a quick example.

Click through for that quick example, including one minor difference from standard MySQL implementations.

Comments closed

Troubleshooting Networking Issues with SNITrace

Bob Dorr digs into SNITrace:

For my specific issue I was attempting to debug why the SQLDriverConnectW errored with TCP 10054 because it was failing the pre-login handshake.  For that I first needed to understand and capture the flow of the handshake activities and this is where SNITrace is helpful.

Read on to see what it does and how it works, as well as some nice Wireshark screen shots.

Comments closed

Postgres Backup and Restore

Grant Fritchey is learning about PostgreSQL:

One of the first things I worry about when I’m looking at a new system is the status of the backups. I don’t see anything in PostgreSQL that will lead me to a different conclusion. However, I didn’t realize just how big a can of worms I would open by pursuing backups and restores.

Instead of talking immediately about backups, let’s talk about restores.

This is a bit different from what we’re used to in SQL Server, so definitely check it out if you are looking at Postgres development or administration.

Comments closed