LLI Wiki — My Digital Knowledge Base

SQL Server: start after a failed update with trace flag 902

Start SQL Server with -T902 to skip upgrade scripts, and cycle the error log.

If SQL Server no longer starts properly after an update (cumulative update, service pack), a failing upgrade script is often the cause. Trace flag 902 prevents these scripts from running at startup, so you can bring the instance up and investigate.

Start the instance without the upgrade scripts

NET START MSSQL$INSTANCENAME /T902

For the default instance use NET START MSSQLSERVER /T902. Run it from an elevated command prompt; once the problem is fixed, restart normally without the flag.

Cycle the error log

EXEC sp_cycle_errorlog;

sp_cycle_errorlog closes the current error log and starts a new one without restarting the service, which makes the next startup messages easier to read.

Mastodon LLIMastodon SocialFosstodon