Setup Database Mail
SQL Server includes a great feature known as Database Mail. This post provides a quick script showing how to setup Database Mail without requiring you to click through a cumbersome user interface. The first part…
BULK INSERT, Kerberos, and Delegation
Pesky Kerberos and BULK INSERT The T-SQL commands, BULK INSERT and OPENROWSET(…), offer great ways to import data from a file into a table in SQL Server. However, getting BULK INSERT Kerberos security setup correctly…
Enable Kerberos Authentication without rebooting SQL Server
What is this Kerberos thing, anyway?! Kerberos Authentication1 allows SQL Server to impersonate Active Directory users to other services via double-hop-authentication. This is commonly used to provide access to data through a web-site via Windows…
Inspect server and session User Options in effect
SQL Server can be configured to provide certain behavior to client sessions, via the SET OPTIONS= command, or via the sys.sp_configure ‘user options’ system stored procedure. The SET OPTIONS= command only affects the current session,…
Detect Microsoft .Net Framework versions
I use the following code to determine which specific version of the Microsoft .Net Framework 4.0 is installed on my SQL Server. It detects versions from 4.5 to 4.7, and can be easily extended as…
Internet access to your SQL Server?
Occasionally I see questions on dba.stackexchange.com where it appears the SQL Server is exposed directly to the Internet, allowing remote connections. This is very bad. In this post, I provide some reasons why. First, it…