Deep grewal
Deep grewal

Reputation: 99

Temp DB full in SQL Server

The issue is this: I have a wrapper stored procedure that contains a bunch of other stored procedures. It looks something like this:

Wrapper:

  exec procedure1
  exec procedure2
  exec procedure3

Each of the procedures creates a temp table that are used within it. The issue is that I run out of tempDB space every time I execute the wrapper.

However, while executing each individual stored procedure, it works fine.

My understanding is that the temp tables are dropped after the stored procedure is done. So why is my tempDB getting full?

edit:

This is the error i am getting.

1101 : Could not allocate a new page for database 'TEMPDB' because of insufficient disk space in filegroup 'DEFAULT'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

Upvotes: 3

Views: 11256

Answers (1)

johnwalker10
johnwalker10

Reputation: 45

Running out of disk space in tempdb can cause disruption in the SQL Server environment.There could be various reasons for getting tempdb full like long execution of query, pumping alot of data in tempdb. You need to identify the reason of getting full tempdb. You can go through the following link: https://msdn.microsoft.com/en-us/library/ms176029.aspx This may help you out.

Upvotes: 1

Related Questions