SQL Server Setup – Could not allocate space for object ‘dbo.Large Object Storage System object: 422212467425280’ in database ‘tempdb’ because the ‘PRIMARY’ filegroup is full

-> I installed SQL Server 2019 and then tried applying Cumulative update 5 on top of it.

-> SQL Server 2019 CU5 failed with below error,

TITLE: SQL Server Setup failure.
SQL Server Setup has encountered the following error:
The NT service ‘SQLAgent$IN01’ could not be started.
Error code 0x84B20001.


For help, click: https://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&EvtType=0xAE7B8BF3%25400xF762992B%25401202%25401

BUTTONS:
OK

-> SQL Server was down. Received below error when tried starting SQL Service manually from configuration manager,

SQL Server Configuration Manager

The request failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details.

OK

-> Checking SQL Server error log as the above error is very generic,

2020-08-02 14:51:26.78 Server Microsoft SQL Server 2019 (RTM-CU5) (KB4552255) – 15.0.4043.16 (X64)
Jun 10 2020 18:25:25
Copyright (C) 2019 Microsoft Corporation
Developer Edition (64-bit) on Windows Server 2016 Datacenter 10.0 (Build 14393: ) (Hypervisor)

-> SQL Server error log shows that SQL Server is upgraded to 15.0.4043.

-> Checking further in SQL Server error log,

2020-08-02 14:51:30.26 spid9s Database ‘master’ is upgrading script ‘msdb110_upgrade.sql’ from level 251660240 to level 251662283.
2020-08-02 14:51:30.26 spid9s ———————————-
2020-08-02 14:51:30.26 spid9s Starting execution of PRE_MSDB.SQL
2020-08-02 14:51:30.26 spid9s ———————————-
2020-08-02 14:51:30.42 spid9s Setting database option COMPATIBILITY_LEVEL to 100 for database ‘msdb’.
2020-08-02 14:51:30.46 spid9s —————————————–
2020-08-02 14:51:30.46 spid9s Starting execution of PRE_SQLAGENT100.SQL
2020-08-02 14:51:30.46 spid9s —————————————–
.
.
.
2020-08-02 14:51:35.25 spid9s Creating procedure sp_purge_jobhistory…
2020-08-02 14:51:35.29 Logon Error: 18401, Severity: 14, State: 1.
2020-08-02 14:51:35.29 Logon Login failed for user ‘JBSQL1\jvivek2k1’. Reason: Server is in script upgrade mode. Only administrator can connect at this time. [CLIENT: ]
2020-08-02 14:51:35.29 spid9s
2020-08-02 14:51:35.29 spid9s Creating procedure sp_help_jobhistory…
2020-08-02 14:51:35.29 Logon Error: 18401, Severity: 14, State: 1.
2020-08-02 14:51:35.29 Logon Login failed for user ‘JBSQL1\jvivek2k1’. Reason: Server is in script upgrade mode. Only administrator can connect at this time. [CLIENT: ]
.
.
.
2020-08-02 15:08:51.69 spid9s Error: 1105, Severity: 17, State: 2.
2020-08-02 15:08:51.69 spid9s Could not allocate space for object ‘dbo.Large Object Storage System object: 422212467294208’ in database ‘tempdb’ because the ‘PRIMARY’ filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

2020-08-02 15:08:51.69 spid9s Error: 7399, Severity: 16, State: 1.
2020-08-02 15:08:51.69 spid9s The OLE DB provider “BULK” for linked server “(null)” reported an error. The provider did not give any information about the error.
2020-08-02 15:08:51.69 spid9s Error: 7330, Severity: 16, State: 2.
2020-08-02 15:08:51.69 spid9s Cannot fetch a row from OLE DB provider “BULK” for linked server “(null)”.
2020-08-02 15:08:51.69 spid9s Error: 912, Severity: 21, State: 2.
2020-08-02 15:08:51.69 spid9s Script level upgrade for database ‘master’ failed because upgrade step ‘msdb110_upgrade.sql’ encountered error 7330, state 2, severity 16. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the ‘master’ database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.
2020-08-02 15:08:51.70 spid9s Error: 3417, Severity: 21, State: 3.
2020-08-02 15:08:51.70 spid9s Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.
2020-08-02 15:08:51.73 spid9s SQL Trace was stopped due to server shutdown. Trace ID = ‘1’. This is an informational message only; no user action is required.

-> The script upgrade mode fails due to insufficient space in Tempdb.

-> I have added Trace flag 902 temporarily which stops script upgrade mode for troubleshooting purpose.

-> I started the SQL Services with trace flag 902 and checked the reason why tempdb was full.

-> I was able to see that autogrowth for Tempdb was disabled and the size was just 8 MB as I left the default value during SQL Server install.

-> It seems like I disabled the autogrowth value for tempdb, but forgot to increase the tempdb file size.

-> I enabled autogrowth for Tempdb files.

-> Removed Trace flag 902 from SQL Services and restarted SQL Services.

-> It did started fine this time and could login to SQL Server without any issues.

-> I checked SQL server error log and there were no errors.

-> Since the CU 5 install crashed with “Could not start SQL Server” error. I decided to repair the SQL server instance, just to make sure there are no issues.

-> SQL Server repair completed fine.

Thank You,
Vivek Janakiraman

Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s