10 December 2024
·

Updating SQL Server 2019

Regular updates of SQL Server 2019 provide access to the latest performance improvements, security fixes, and bug patches. Before proceeding, it is recommended to check your version's lifecycle and support, as well as the update history. These cumulative updates apply to all editions of SQL Server 2019, including Express editions.

Useful References

  • SQL Server 2019 lifecycle and support: link
  • Latest updates and version history for SQL Server 2019: link

Before Starting

1. Check Current SQL Server Version

Open SQL Server Management Studio (SSMS). In a new SQL query, execute:

SELECT @@SERVERNAME AS [Instance], 
       @@VERSION AS [Info];

2. Backup Your Databases

-- Full backup of all user databases
EXEC sp_MSforeachdb 
'IF DB_ID(''?'') > 4
BEGIN
    BACKUP DATABASE [?] TO DISK = ''C:\SQLBackups\?.bak'' 
    WITH COMPRESSION, INIT
END'

3. Check Server Configuration

  • Open SQL Server Management Studio (SSMS)
  • Connect to the SQL Server instance
  • In Object Explorer, right-click on the server
  • Select Properties > Database Settings
  • Check that paths are valid for:
    • Data files (.mdf)
    • Log files (.ldf)
    • Backup files (.bak)

Cumulative Update Installation

1. Download

2. Preparation

  • Close SSMS and all applications connected to SQL Server
  • Check available disk space (minimum 2 GB recommended)
  • Ensure you have Windows administrator rights

3. Installation

  • Run the installation program as administrator
  • Accept the license terms
  • Keep default options
  • If an alert about WmiPrvSE.exe appears, you can continue
  • Estimated installation time: 5 to 20 minutes
  • Retrieve log path at the end of installation

4. Finalization

  • Restart the server after installation
  • The update requires a complete restart to be fully effective

Post-Update Verification

1. Installation Validation

-- Version and Cumulative Update verification
SELECT @@VERSION AS 'Version',
       SERVERPROPERTY('ProductVersion') AS 'Build Number',
       SERVERPROPERTY('ProductLevel') AS 'Update Level';

-- SQL Server services verification
EXEC xp_servicecontrol 'QueryState', 'MSSQLSERVER';
  • Check all databases start correctly
  • Test connection with your applications
  • Check SQL Server logs for any errors
  • Verify SQL Server Agent jobs are functioning properly

Your SQL Server 2019 is now up to date and ready to use!