Author

CTE (Common Table Expression)

https://learn.microsoft.com/en-us/sql/t-sql/queries/with-common-table-expression-transact-sql?view=sql-server-ver16 Specifies a temporary named result set, known as a common table expression (CTE). This is derived from a simple query and defined within the execution scope of a single SELECT, INSERT, UPDATE, DELETE or MERGE statement.  A Common Table Expression, also called as CTE in short form, is a temporary named result set that... » read more

SQL Server Windows Failover Cluster – Unable to start Roles

Status: Windows Failover Cluster fail to start any of the Roles All nodes in the Windows Failover Cluster are up. Identified several important event IDs that are common across all SQL nodes: 1069, 1205, 1254. Probable Causes: -SQL node names and AG name are not resolving or couldn’t register in the network. please look at the... » read more

ONLINE = ON

ONLINE = ON for SQL Server Enterprise / Developer Edition ONLINE = OFF for SQL Server Standard Edition

Updating SSL Certificate for Azure Web App

https://decoder.link/converter Input: mydomain.com.crt (cert folder) mydomain.com_key.txt (key folder) mydomain.com.ca-bundle (cert folder) Output: mydomain.pfx Upload the generated .pfx file to your Azure Web App “Certificates” and update your “Custom Domains” with the new certificate. Resources: https://www.ssls.com/

UDF (User Defined Functions) and Serialization

Your queries could be going parallel, but because of limitations in SQL Server, they staying serial: single-threaded. A lot of different things can cause this, including running SQL Server Express Edition (which only uses 1 CPU core), but the most common are Scalar UDFs. Generally, there’s not a server-level fix for these: you’re stuck rewriting the... » read more

Aligned and Non-Aligned Indexes for Partitioning

Partitioning is a powerful feature in SQL Server, allowing your data to be split across different “partitions”, which are simply smaller, more manageable pieces of a larger table or index. Partitioning can provide substantial performance benefits, especially for large tables, where queries that access only a fraction of the data can run much faster because... » read more

How to remove/clear old SQL Server Error Logs

You can easily configure this via SQL Server Configuration Manager: by modifying the directory for the -e parameter, which controls the error log destination. Default Log Folder: C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Log You can of course just delete the files manually, but it sounds like you really want to reduce the number of logs used and/or reduce their size.... » read more

Export a Certificate as a PFX file

Issue: Unable to generate pfx file from certificate manager. Certificate export have the option greyed out “Personal Information Exchange PFX”. Fix: Use PowerShell to generate the PFX file. The Certificates snap-in really doesn’t like to export PFX certificates, but PowerShell is happy to. You can use the Export-PfxCertificate cmdlet. Go to the certificates pseudo-drive by typing cd cert:\ at... » read more