SQL Server Instant File Initialization: SetFileValidData (Windows) vs fallocate (Linux)

SQL Server Books Online documents Instant File Initialization and the associated security considerations.   This blog highlights the underlying file system implementations and differences in behavior between Windows and Linux. SQL Server performs the following API calls when creating or extending (growing) data and log files. CreateFile – Create or open a file SetEndOfFile– Establish the…

0

SQL MYSTERIES: Tracing BCP Might Fool You

Today I was tracking a large BCP.exe ‘IN’ operation and monitoring the sys.dm_exec_requests entries.  The ‘BULK INSERT’ command entry appeared, showing the CPU, reads, writes, … but these values where getting reset from time to time.  Here are 3 snapshots from my system. cpu_time    total_elapsed_time      writes      session_id   start_time              command 1387        1396                    32          51           2018-08-07 00:45:42.670…

0

SQL Server Mysteries: The Case of the Dropped AD Group Login

Dylan (who kindly wrote up the contents of this blog for me) was modifying the tests for Active Directory Login activities.  As Dylan and I reviewed the changes a specific behavior involving Active Directory Group Logins caught our attention. Imagine you have a group on your domain [CONTOSO\group] which has a member [CONTOSO\user], and the…

0

SQL Server on Linux: How is Delete-On-Close Handled

Windows provides an option for CreateFile to delete a file when the file is closed (FILE_FLAG_DELETE_ON_CLOSE.)   Host Extension Handling Linux does not expose such an option as part of the open syscall.  Instead the host extension remembers that the open request was made with the FILE_FLAG_ON_DELETE option and after closing a file issues the remove…

2

SQL Server on Linux: Why Do I Have Two SQL Server Processes

When starting SQL Server on Linux why are there two (2) sqlservr processes? systemctl status mssql-servermssql-server.service – Microsoft SQL Server Database Engine…   CGroup: /system.slice/mssql-server.service           ├─85829 /opt/mssql/bin/sqlservr       <——— WATCHDOG | MONITOR           └─85844 /opt/mssql/bin/sqlservr       <——— SQLSERVER.EXE The simple answer is the first entry (85829) is not what you are used to on a Windows system as sqlservr.exe…

1

SQL Server on Linux: Quick Performance Monitoring

I have been asked several times about how to get a Performance Monitor like view on Linux.   There are lots of Linux tools available (top, iotop, Grafana, and SQL Sentry just scratch the surface of available options) to monitor the Linux system.  Allow me to share one such example to capture and monitor a system….

0

Take the SQL Server Mac challenge

When I graduated from college, one of the first computers I ever used was a MacIntosh. I loved the Mac, the user interface, and the overall footprint of that computer. I also started my career developing on UNIX systems with C++ and databases like Ingres. As I moved to other jobs, the PC was becoming…


SQL Server 2017 Improved Resource Usage On Smaller Machines

What does improving resource usage on smaller machines really mean? https://support.microsoft.com/en-us/help/4078095 SQL Server is designed to scale across the spectrum of small machines to enterprise class servers.  The changes made in SQL Server 2017 CU4 improve resource usage on smaller machines, such as a VM or Container used for testing and development.  SQL Server always…

0

SQL Server on Linux: CU4 – NewSequentialId() – Uuid

  Prior to SQL Server 2017 CU4 for Linux (Linux only) the generation of a sequential UUID may not function as expected.  SQL Server’s NewSequentialId() calls the Windows API UuidCreateSequential, which is limited in SQLPAL, prior to the CU 4 update. SQL Server on Linux – CU4 advances the logic in the SQLPAL, in support…

0

Microsoft Engineering loves SQLBits

I have the blessed opportunity to speak at many customer events. SQLBits is always one of my favorites because of the great community that attends and the opportunity for me to travel to a great city like London. Well, for SQLBits 2018, it is not just me. Microsoft engineering is actually sending quite a few…