Author Archives: opsadmin

About opsadmin

This post was written by Jayanth Kurup. A Microsoft SQL Server Consultant and Trainer based out of Bangalore, India. Jayanth has been working on MS SQL Server for over 15 years. He is a performance tuning and Business Intelligence expert. Having worked with companies like Microsoft, DELL, Wells Fargo, Thomson Reuters and many other fortune 100 companies. Some other technologies Jayanth works on include Microsoft Azure, PowerBI, Python and AWS. When he isn’t consulting or training, Jayanth like to travel, paint and read. He is also very active in social causes and the founder of Enabled Business Solutions. Visit his company by clicking the link in the menu or email him directly.

Temp table Owner

By | January 13, 2020

Recently I came across a post on LinkedIn which required identifying the user who created a temp table. This is an interesting use case and thought I’d write a query of my own. The below script identifies currently logged in users who are executing queries and anytime tables that they might have created. I figured… Read More »

SQL 2019 – Christmasql

By | December 4, 2019

Early November I had posted I would be conducting a series of sessions on MS SQL server. The response was really great and while I intended to do a classroom session the interest was primarily for online delivery. So I will be arranging the first half of it this in the coming 10 days. Here… Read More »

SQL 2019 – Database Snapshot for In-Memory OLTP table

By | November 25, 2019

Traditionally Database snapshots have been used mainly to get Database mirroring secondary’s to act like Readable secondary. As you might be aware in mirroring etc. the databases are restored with no recovery. Since the transaction log file isn’t in a consistent state the database engine prevents users from querying them. However in the interest if… Read More »

Backup and restore of encryption keys and restoring

By | November 19, 2019

  USE master; /************************************************************* CREATE YOUR MASTER KEY AND YOUR CERTIFICATE FOR TDE AND ALL OTHER TYPES OF ENCRYPTION *************************************************************/ OPEN MASTER KEY DECRYPTION BY PASSWORD = ‘Isthis@securePa$$word?’; BACKUP MASTER KEY TO FILE = ‘c:\work\exportedmasterkey’ ENCRYPTION BY PASSWORD = ‘abcd@1234’; GO BACKUP CERTIFICATE MyServerCert TO FILE = ‘c:\work\MyServerCert’ WITH PRIVATE KEY ( FILE = ‘c:\work\MyServerCertKey’… Read More »

SQL 2019- Max DOP and Memory Configuration

By | November 17, 2019

Probably the most useless recommendation and as far as I am concerned not a feature. Why? If you are a DBA you know that DOP and Memory limits are fine-tuned based on the workload and system details. Things like concurrency OLTP vs OLAP, usage of in memory vs traditional tables Buffer pool extensions, number of… Read More »

SQL 2019- Optimize for sequential key

By | November 14, 2019

Last page contention is one of the textbook examples for latch contention. This frequently occurs on tables that are narrow and have high inserts happening against a sequential primary key column such as an identity column. Simply put on tables that have high concurrency you might have multiple users inserting data and generating some kind… Read More »

SQL 2019 – Custom Capture of Query Store stats

By | November 13, 2019

Query store is a feature of SQL server that tracks and captures information about queries. Database administrators will find query store useful in trouble shooting performance issues. Most database scenarios query store is perfectly fine under default configuration. However every once in a while a DBA might want to specifically crack metrics where the default… Read More »

SQL 2019- Scalar UDF inlining

By | November 12, 2019

Scalar UDF are notorious for their performance issues. The most common reason they cause issues is due the fact that the logic is applied on each row. So queries which use Scalar UDF for a large number of rows often face significant execution times due to the context switch with each row. There are other… Read More »

SQL 2019- Licensing

By | November 11, 2019

In this post I will try to explain SQL 2019 licensing in the simplest way possible. Do you need to worry about SQL Express, Web or Developer edition? No not really, we are only exploring production workloads, and none of the editions above are used in true production workloads. Besides they are practically free (even… Read More »