SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Tempdb grows suddenly.


Tempdb grows suddenly.

Author
Message
kernal69
kernal69
SSC-Enthusiastic
SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)

Group: General Forum Members
Points: 126 Visits: 7
Hi

I know that TempDB grows if it needs and if you restart the sql server the TempDB resets to it's configured size.

On a sql server we have i have never had any problem with TempDB.
The size has always been about 2 GB.
I have run many big querys against it and it have never grown.
Every week a rebuild index is being run on the databas that is about 40GB.

But suddenly , the size jump up to 24 GB on the TempDB.
I restart the server and everything is normal.
But then over a night the size jump up to 42 GB.
And during that time the only thing that has happen is the same thing that
has happend every night.

If i run:
SELECT SUM(unallocated_extent_page_count) AS [free pages],
(SUM(unallocated_extent_page_count)*1.0/128) AS [free space in MB]
FROM sys.dm_db_file_space_usage;

It says that about 40 GB is free space in TempDB.

I am very confused.

What should i do ?
durai nagarajan
durai nagarajan
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8293 Visits: 2880
Every week a rebuild index is being run on the databas that is about 40GB.

Is this running with SORT_IN_TEMPDB ON?

But then over a night the size jump up to 42 GB.
And during that time the only thing that has happen is the same thing that
has happend every night.


Are you talking about rebuild index or some other activity, can you specify.

Regards
Durai Nagarajan
Beatrix Kiddo
Beatrix Kiddo
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16300 Visits: 5663
Wrong thread!
durai nagarajan
durai nagarajan
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8293 Visits: 2880
Beatrix Kiddo (8/29/2013)
Wrong thread!


Why?

Regards
Durai Nagarajan
kernal69
kernal69
SSC-Enthusiastic
SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)

Group: General Forum Members
Points: 126 Visits: 7
Hi

The "sort results in TempDB" is off.

During the night the only activity is backup and some calculation.
But nothing off this is a new activity.

Rebuild index runs only ones a week on sundays.
RandomEvent
RandomEvent
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2097 Visits: 528
put a server side trace on the DB to see what is running overnight to impact the TempDB. If its happening everynight then you'll only need to do it for a day or two to locate the culprit.
durai nagarajan
durai nagarajan
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8293 Visits: 2880
what is that some calculation and is that log grows after this or during this ?

Regards
Durai Nagarajan
Gazareth
Gazareth
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15765 Visits: 6113
You might be able to get the information from the default trace:


DECLARE @tracefile nvarchar(1000)
SELECT @tracefile = CAST(value AS NVARCHAR(1000)) FROM ::fn_trace_getinfo(0) where traceid = 1 and property = 2;

PRINT @tracefile


SELECT gt.HostName,
gt.ApplicationName,
gt.LoginName,
gt.Duration/1000 AS [Duration (ms)],
gt.StartTime,
gt.DatabaseName,
gt.[FileName],
gt.IsSystem,
te.name,
CAST(gt.IntegerData*8 AS FLOAT)/1024 AS [MB Growth]
FROM fn_trace_gettable(@tracefile, default) gt
INNER JOIN sys.trace_events te ON te.trace_event_id = gt.eventclass
WHERE te.category_id = 2
ORDER BY gt.StartTime DESC
GO


Super Cat
Super Cat
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3406 Visits: 2985
Run this...

select * from sys.dm_db_task_space_usage
where internal_objects_alloc_page_count <> 0

See which spid has an high 'internal_objects_alloc_page_count'
and a low 'internal_objects_dealloc_page_count'

then see what these spids are doing.

Do you use Service Broker at all.
MyDoggieJessie
MyDoggieJessie
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26758 Visits: 7488
The trace option is probably a good place to start in finding your culprit (my preferred method) - although i'd probably create a custom trace in profiler say tracking only items that had a lengthy duration or high logical reads...

I also wanted to ask: Does this server have Reporting Services installed? If so, you may want to check and see if someone has scheduled a report to run during the night. If so, depending on the query/procedure used in the report it might be the cause of the sudden spike in TempDB

Just a shot in the dark, but may be worth a look

______________________________________________________________________________
Never argue with an idiot; Theyll drag you down to their level and beat you with experience

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search