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

SQL Server Agent Fixed Database Roles

https://learn.microsoft.com/en-us/sql/ssms/agent/sql-server-agent-fixed-database-roles?view=sql-server-ver16 SQL Server has the following msdb database fixed database roles, which give administrators finer control over access to SQL Server Agent. The roles listed from least to most privileged access are: SQLAgentUserRole SQLAgentReaderRole SQLAgentOperatorRole SQLAgentUserRole Permissions SQLAgentUserRole is the least privileged of the SQL Server Agent fixed database roles. It has permissions on only operators, local jobs,... » read more

Deploy SSIS Package to SQL Server from .dtsx package file

Open up SSMS -> Connect Integration Services… (Administration mode) Expand the “Stored Packages” folder -> MSDB folder -> right click and select “Import Package” Package location: File System Package path: C:\Deployment\MyPackage.dtsx Package name: MyPackage Protection level: Keep protection level of the original package Note: If package already exist in the MSDB, will get a prompt... » read more

Install SSL Certificate on Azure Web App

To secure your site, extract the files from STAR.mydomain.com_cert.zip and STAR.mydomain.com_key.zip on your computer and upload them to your server. Here is a list of the most common server types and how to install SSL on them. If you created a CSR and private key in-browser during SSL activation, you will find key.zip in your downloads folder. How to install an... » read more