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


Tempdb grows suddenly.


Tempdb grows suddenly.

Author
Message
kernal69
kernal69
Valued Member
Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)

Group: General Forum Members
Points: 50 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
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3543 Visits: 2784
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
SSCertifiable
SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)

Group: General Forum Members
Points: 6970 Visits: 4846
Wrong thread!
durai nagarajan
durai nagarajan
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

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


Why?

Regards
Durai Nagarajan
kernal69
kernal69
Valued Member
Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)

Group: General Forum Members
Points: 50 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
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1545 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
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

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

Regards
Durai Nagarajan
Gazareth
Gazareth
SSCertifiable
SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)

Group: General Forum Members
Points: 7798 Visits: 6046
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


Talib123
Talib123
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1455 Visits: 2365
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
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12406 Visits: 7444
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; They'll 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