Tempdb Growing Out Of Control
Mar 22, 2004
Hi all.
I have a db application that has been running fine for months. Volumes have been gradually increasing and one day the system locked up.
A stored proc that typically ran in 3 or 4 minutes never returned. The tempdb kept expanding to fill available disk space (100GB). This was the offending statement inside the stored proc:
INSERT INTO cpp (CPPDate,MerchantLink,ReportNumber,FromDate,ToDate ,TransThreshold,DayThreshold,CPPType)
SELECT S.CPPDate,S.MerchantLink,s.ReportNumber, s.FromDate,s.ToDate, S.OccurThresh,s.DaysThresh,'D'
FROM #stuff S, Trans T with (nolock), Supplier P with (nolock)
where T.MerchantNumber in (SELECT MerchantNumber FROM Merchant WHERE MerchantLink = s.MerchantLink)
AND T.TranDate >= S.FromDate
AND T.TranDate <= S.ToDate
AND T.LoadDate <= @ReportDate2
AND (T.SupplierNumber = P.SupplierNumber
AND T.IncludeInCpp = 'Y'
AND P.CountryNumber IN (SELECT CountryNumber FROM REPORTCOMBO WHERE ReportNumber = s.ReportNumber))
GROUP BY CPPDate,Merchantlink,ReportNumber, FromDate,ToDate, OccurThresh, DaysThresh
HAVING COUNT(DISTINCT T.AccountNumber) >= OccurThresh
I realize that a "group by" uses the tempdb, but can't figure out why it would go away rather than returning an error.
I have a workaround in place now. I split this big query into several steps using a cursor. (slower and clumsier, but it works) Statistics are updated daily, i have tried defragging, and reindexing with no success.
Any thoughts would be appreciated. If you need any more details, please let me know.
Thanks in advance.
View 3 Replies
ADVERTISEMENT
Feb 2, 2000
In SQL Server 7.0 sp1 (NT 4.0 sp5) I have a server that
has a tempdb database that continues to grow. This server
contains the database for SMS. Over the weekend, the tempdb
had grown so much that it filled up the drive (37GB). I have
shrunk it down to a much more reasonable size and put a limit
on how large it can grow. I'm noticing today that it is
beginning to grow again. Is there a way I can look at the
information that is in tempdb right now? I have to think
that there are open transactions for some reason that can't
commit. I know that tempdb gets cleared out when SQL Server
is restarted, but I can't be restarting it this often.
On Microsoft's website, I did find an article about SMS Y2K
queries using large amounts of Tempdb and failing to complete.
The solution they have in this article Q234912 is to install
SMS sp1 which is already installed.
I haven't been able to find any other useful information yet
on this problem. I would appreciate any help you can offer.
Thanks!
Toni
View 2 Replies
View Related
Apr 9, 2006
Hi there,
My tempdb is growing from its normal size of 800MB to 2GB.
I've been shrinking it using dbcc shinkfile/ dbcc shrinkdatabase.
Everytime I run the command, immediately it says that the execution is completed and successful. However, when I checked the disk space, it remained the same, as though no shrinking is done. Can anyone help?
Also, it was published that restarting the SQL server can re-create tempdb from scratch. I've tried it too, the tempdb just wont go back to its normal allocation. My constraint is limited disk space, would appreciate any good samaritan to give me some help here.
Thanks in advance!
View 20 Replies
View Related
Sep 10, 2003
I notice this morning that my tempdb grows very fast. I have 26GB in my
hardrive and all the space occupied by tempdb and finaly the qeury got failed due to 0 space in hardrive and there is no space to grow tempdb.
The select query supposed to bring about 40000 rows.
I ran this same query in different server that is not growing even 1 mb.
I checked the tempdb option the Trunc log on checkpoint is true.
Why this problem happening ?.
I have just dbo permission to access all the database.
Do you have any advice regarding this?.
Thanks,
Ravi
View 3 Replies
View Related
Jul 7, 2004
for the first time in my long SQL DBA live I see such a behaviours. My tempdb database is growing every damn second since a this morning. Now it reached 30Gb, the log file is empty (217 Mb).
We use SQL 2000 Ent on Win 2000 Advance Server. Running Siebel Call Center (7.5 ver) with about 300 users.
Some users time to time obtain and hold a huge amount Exclusive locks on the tempdb extents
Where do I look for a leak?
Any ideas?
thx
Dim
View 6 Replies
View Related
Jun 17, 2008
How do I write a script that will alert me if the tempdb database grows up past 100 MG and stays there?
Jim
View 3 Replies
View Related
Oct 16, 2007
Hi
We are having problems with our SQL server 2000.
The problem is that on a daily basis we run out of disk space and I always have to run shrinkdatabase on tempdb.
Today we started with 160GB of free space and by the end of the day it was gone!
Yes we do have many jobs running on our SQL server pulling data in from many sources. But I dont know how to find out which job is causing this problem. I have a suspicion that it could be a job that runs hourly that pulls data from Oracle (approximately 10000 rows each time), but that job has been active since the 28th August 2007. We only started running out of space in the past 5 days. Any suggestions would be appreciated as to what is causing this or how to diagnose the problem.
Thanks
View 14 Replies
View Related
May 28, 2002
I have a database that seems to have grown out of control. I have tried deleting tables, but that has not really reduced the size. What could have caused the database to grow this big and what can I do to reduce it's size. I have backed up, truncated the logs, ran the shrink database command, all to no avail. Pleas help.
View 5 Replies
View Related
Sep 3, 1998
In the past month and a half I have had the SQL Server error log on one of my SQL Server 6.0 servers eat up ALL the free disk space on the partition containing SQL Server and the databases/devices.
This means that the error log gets to be about 3 GB in size!
When I try to run a `tail` against the error log to determine what errors might be filling up the log, I get `garbage` like it`s not really a text file. This has indicated to me that the error log is somehow becoming corrupt.
Anybody have similar experiences or suggestions?
Thanks!
View 1 Replies
View Related
Jul 20, 2005
Something strange is happening to our SQL Server DB (2000). Thetempdb transaction log file continues to grow (quite slowly) for noapparent reason. We have it in simple mode, and I have tried a manualcheckpoint command and manual shrink (of the log file only). Thereare no unusual SQL's (large or small) going on. A "heavy hitter" wouldmake it grow fast, not 10 MB every 30 minutes or so. This server hasbeen in production for over a year with no similar issues to this.Anyone encounter a similar situation? This started (as far as we cantell) sometime yesterday. It is growing about 200 MB a day, and is upto 600 MB now, with all but 8 MB "used". For now we added space, butof course that is not a long term solution. The two "data" files(each had a 200 MB initial allocation) have never gone much above 100MB each used (they are each about 100 MB now and have been that wayfor several days, but have shrank and grown). There are about 30small to medium sized "regular" databases on this instance.Any help would be appreciated, especially if there is a way we can fixthis without bouncing the engine (I know, wishful thinking...). The OSis Win 2000, SP3. SQL Server is at 2000, SP 3a.THANKS IN ADVANCE!
View 3 Replies
View Related
Aug 25, 2015
SQL Server 2008, Tempdb ("ReportServerTempDB")of the report server is growing enormously over 20gb in 3 days. All our reports drive from stored procedures which is a different server from Reportservertempdb. We have no report subscriptions.
We store no snapshots. All we do is run the reports.
I don't know where I start to investigate the issue.
View 2 Replies
View Related
Jun 16, 2014
The TEMPDB transaction log file keeps growing.The database server is new and the transaction log was presized to 1 GB on installation. After installing a number of databases, the log file grew over a day to 38GB. Issuing a manual checkpoint was the only way to free some space to allow it to be shrunk back to a usable size. The usage of the file is still going up.
I am struggling to find what process is causing the log to be used so heavily. Looking at the log reuse wait desc for tempdb returns "Nothing" and tempdb itself isn't being used very much or growing in size.
View 9 Replies
View Related
Sep 6, 2000
Tempdb has grown to over 17 GB. It had no max growth limit set and actually took up all the disk space on the drive. I tried to run DBCC SHRINKDATABASE and received a bunch of errors about table corruptions. So, I found Brian Knight's post about stopping and restarting tempdb in minimal mode. I did that. It came back up and tempdb was correctly only 2 MB. It freed up 17 GB on the disk. Then, I stopped and restarted the service again, not in minimal mode, and it won't come back up. It has taken back that 17 GB of disk space. From the error log, I can see that it is stuck on rebuilding tempdb. Why is it trying to rebuild tempdb to 17 GB???
While in minimal mode, we did set the maximum growth limits to 1 GB for both data and log for tempdb, but that seemed to have no effect.
Any suggestions????
View 3 Replies
View Related
Jul 18, 2006
Over weekend my tempdb grew 118 gig usually 1 gig.
I did shrink on it ...and its fine now.
But how to determine what could have caused this..
How can i say it was this process or this job ...any ideas.
Thanks
View 10 Replies
View Related
Jul 23, 2005
I have a very big table with 20 million records DistinctProjectionKeywhich i join several times to different tables in this query.select distinct distinctprojectionkeyid,dpk.MarketID,dpk.Classificationid,dpk.DistributorID,dpk.ManufacturerID,dpk.LocationID,dpk.TimeID,P4.FACTOR as factor1,P3.FACTOR as factor2 ,P2.FACTOR asfactor3,P1.FACTOR as factor4into Projectionfactors1FROM DistinctProjectionKey dpk INNER JOIN D_Time tON t.TimeID = dpk.TimeIDINNER JOIN (select * from (select distinctClassificationID_Major,'fam' as lab fromStagingOLTP..ClassificationFlat) cf1)cfON cf.ClassificationID_Major = dpk.ClassificationIDLEFT OUTER JOIN StagingOLTP..ProjectionDefaultFlat p4ON t.TheDate = p4.TheDateAND p4.Name = 'FAM'AND cast(cf.Lab as varchar(20)) = cast(p4.Lab as varchar(20))AND dpk.MarketID = p4.MarketIDAND p4.ManufacturerID IS NULLAND p4.ClassificationID IS NULLLEFT OUTER JOIN StagingOLTP..ProjectionDefaultFlat p3ON t.TheDate = p3.TheDateAND p3.Name = 'fam'AND cast(cf.Lab as varchar(20)) = cast(p3.Lab as varchar(20))AND dpk.MarketID = p3.MarketIDAND p3.ClassificationID = dpk.ClassificationIDAND p3.ManufacturerID IS NULLLEFT OUTER JOIN StagingOLTP..ProjectionDefaultFlat p2ON t.TheDate = p2.TheDateAND p2.Name = 'fam'AND cast(cf.Lab as varchar(20)) = cast(p2.Lab as varchar(20))AND dpk.MarketID = p2.MarketIDAND p2.ManufacturerID = dpk.ManufacturerIDAND p2.ClassificationID IS NULLLEFT OUTER JOIN StagingOLTP..ProjectionDefaultFlat p1ON t.TheDate = p1.TheDateAND p1.Name = 'fam'AND cast(cf.Lab as varchar(20))= cast(p1.Lab as varchar(20))AND dpk.MarketID = p1.MarketIDAND p1.ManufacturerID = dpk.ManufacturerIDAND p1.ClassificationID = dpk.ClassificationIDthe other table have fewer number of records .I find that when I try to do the insert tempdb goes out of control ,itgrows above 100 GB?Would anyone know the reason why and the solution to apply to avoidthis problem?The other tables have fewer recodsClassification flat has 5000 records and projection default flat has32652 records.AjayAjay
View 2 Replies
View Related
Aug 22, 2001
I upgraded from SQL 6.5 to SQL 7 last month, and so far, everything's
been going fine.
However, I'm not using my old SQL 6.5 backup scripts, which, when the
backup was done, would dump the transaction log with TRUNCATE_ONLY, shrinking
the log size.
My SQL 7 server is set up with a Maintenance Plan which does everything,
including backup, but the log file seems to be growing and growing. I'm
up to 4.5 gigs now, for a database with a data file of 3.5 gigs.
How do I "dump transaction with TRUNCATE_ONLY" on a SQL 7 database?
Thanks,
Todd Wallace
View 3 Replies
View Related
Mar 1, 2004
I have merge replication setup up for 6 SQLCE Subscribers.
I have noticed that the MSmerge_tombstone table is growing
at a fast rate regardless of any changes to the data in
the database. It seems to be consistantly adding 50 rows
of data to the table every 2 minutes. As the table grows
it causes the SQLCE subscirbers to fail with the following
message:
ERROR: -2147467259
SQL Server Reconciler failed: Run
ERROR: -2147200925
: Failed to enumerate changes in the filtered
articles.
ERROR: 0
: {call sp_MSsetupbelongs
(?,?,?,?,?,0,?,?,1,?,?,?,?,?,?)}
ERROR: 0
: The merge process timed out while executing a
query. Reconfigure the QueryTimeout parameter and retry
the operation.
I'm sure that this is due to the size of the
MSmerge_tombstone.
Should the MSmerge_tombstone table grow at this rate?
36,000 rows every 24hrs!
I understand there is the sp_mergecleanupmetadata Stored
procedure but if i use this does that mean that because i
have to reinitialise all the subscribers, they are going
to have to pull down the whole subscription again.
I have since Changed a settings to make subscription
expiration date to 8 days instead of never expires but
we're still getting 50 rows added every 2 minutes
SQL SERVER 2000 SP3
Hope someone can shed some light on this for me.
Thanks.
.
View 5 Replies
View Related
Jul 14, 2004
Has anyone seen the SQL Server error:
"tempdb is skipped. You cannot run a query that requires tempdb"?
We're running a .Net web application with a SQL Server 2000 backend, and we get the error intermittently. Restarting the SQL Server service seems to fix it, as it causes tempdb to be rebuilt, but this isn't a long term solution. Any direction or hints would be greatly appreciated. Thanks!
- Mike
View 11 Replies
View Related
Jan 27, 2008
Hi All,
I am placing a Matrix inside the table control for grouping requirements,but when we export the report to the Excel, the contents inside the table cell are ignored. Is there any way to get the full report exported, as per the Requirement.Please help me with this issue.
With Thanks
M.Mahendra
View 5 Replies
View Related
Oct 25, 2007
does any one have and example of how to embedd a flash swf file onto a report.??? Is it possable? any examples would be helpful.
View 1 Replies
View Related
Mar 20, 2007
UPDATE #2: When it said "Do you want to install Microsoft SQL Server" I said "yes" and that caused it to work. I exited and re-ran and now the print runs w/o the "install SQL Server" (If the prompt had said "Do you want to install the print dialog" we wouldn't be having this discussion...)
UPDATE: After posting this i discovered that the same thing occurs when attempting to print the report direct from IE6: First a dialog pops up "Do you want to install this software?" Name: Microsoft SQL Server. When I click "Don't Install" I get the dialog "unable to load client print control." Since this happens direct from IE6 I suspect it's browser settings. I'll resume tomorrow and post a followup.
My WinForm C# app integrates Reporting Services by calling them from WebBrowser controls. The problem is attempts to print cause a dialog: "unable to load client print control."
I've read prior posts that say "enable Active-X in your browser" - I don't know how to do that from a WebBrowser control.
Any ideas how to support Reporting Services "Print" from within a WebBrowser control?
RELATED THREADS
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=332145&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=264478&SiteID=1
View 1 Replies
View Related
Mar 28, 2000
I wonder if anyone could explain why when monitoring the transaction log size it doesn't appear to be growing! I'm using the following code to test image data types with logging.. I've got 'Truncate log on Checkpoint' switched off and 'Select into Bulk copy' also switched off.
Running the following code I would expect to see the transaction log grow and grow and grow... Monitoring it using perfmon indicates that it isn't in fact logging...
DECLARE @ptrval varbinary(16)
SELECT @ptrval = TEXTPTR(pr_info)
FROM pub_info pr INNER JOIN publishers p
ON p.pub_id = pr.pub_id
AND p.pub_name = 'New Moon Books'
declare @Loop int
select @Loop = 0
While @Loop <= 10000
BEGIN
WRITETEXT pub_info.pr_info @ptrval
with log
'New Moon Books (NMB) '
select @Loop = @Loop + 1
END
View 1 Replies
View Related
Oct 27, 1999
Hello,
Does 7.0 store db Growth rate information?
I am looking for information that tells me how fast a db is growing in MB and or percentages over a given period of time, ie weekly, monthly, yearly etc. Either in real numbers or estimates. Does 7.0 already store something like this or do I need to create some code for this?
Or does someone have something like this already coded that they would be willing to share?
Thank you in advance.
Troy
View 2 Replies
View Related
Jan 24, 2003
Greetings,
My database has a situation where my transaction log is growing out of control. However I have not been able to figure out where any memory leaks are occuring.
Is there a way to monitor the database in order to find out at when the tlog is growing. Or even better, what sql is being executed that is causing this unreasonable tlog growth?
Thanks a million,
Roger
View 2 Replies
View Related
Mar 6, 2007
Hi,
I'm getting this SQL server log...
The log file for database 'P5_Nextel' is full. Back up the transaction log for the database to free up some log space
What i'm doing is, i just resizing the space allocated, but the problem is my disk is now out of space. How can i prevent this kind of problem without adding a new disk? Is there any other way?
Please advise.
Thanks!
View 4 Replies
View Related
Aug 7, 2007
Why does a log (.ldf) file keep growing and growing and growing? Is this related to the fact that the scheduled Maintenance keeps failing due to exclusive access problems?
SQL Server 2000 Std.
Thanks!
View 7 Replies
View Related
Feb 29, 2008
I am having problems with the transaction log growing. I set up a maintenance plan to backup every 15 minutes. The recovery model is set to full. It is set to auto grow by 10 percent with unrestricted file growth. The space allocated is 2mb. Should this be set higher? It seems whenever I unchecked the auto shrink, the log is growing larger. The command I use to check is:
SELECT *
FROM sysfiles
WHERE name LIKE '%LOG%'
GO
This is the log size and the log space used.
1.492187538.02356
This has grown 4 percent since yesterday. Are there any good practices to maintain these log files?Any help would be appreciated.
msr976
View 1 Replies
View Related
Aug 24, 2006
Hi,We have created a SQL server 2000 database. We observe that thetransaction log keeps growing over time. We are now about to run out ofspace. We have been periodically shrinking the database. Neverthelessthe size has increased. I would imagine that a transaction log can beeliminated if we stop the database. Can that be done? Is there a way tocompletely wipe off the transaction log?Thanks,Yash
View 4 Replies
View Related
Jun 16, 2008
We have a database that's growing pretty fast because of firewall logs. We need the data available via an asp.net application. I don't have great experience with SQL other than installing and doing some development as a back end, so i'm wondering if there's a general rule of thumb of database size, when you should start breaking it out into smaller segments? if so, what are some good practices?
View 3 Replies
View Related
Nov 8, 2000
Hi,
my log files are growing like anything. One of my log file size is 20GB.
How i have to reduce the log file size.
If i run DBCC command is it come backs...
Pls tell me the way how i have to find the free space and reduce logsizes.
After taking backups also my log file sizes are not reducing.
Thanks!
Kavira
View 2 Replies
View Related
Apr 10, 2000
Does anyone know at what point SQL Server 7.0 decides to grow the database when the autogrow option is set? Our site just went down for 45 minutes because the growing process was taking too long as compared to the data coming in, so the device filled up.
Ray? Craig? You guys seem to know all, so jobs.com appreciates your input...
View 7 Replies
View Related
Mar 12, 2003
I have to admit, I'm usually using the MySql database, but in this particular case I have to use MSSQL 2000.
Over to my problem.
I'm building a web-based system (who isn't these days) in which the user types arbitrary information that is published when the user pushes the save button. Nothing new about that.
Here comes the tricky part, when the user wants to edit an existing item I copy all information in the database and sets the id of the 'edit-copy' to the negative value ( id 45 becomes id -45 for the edit-copy). This is also done on all items in other tables that is connected to the main item.
This way I get a copy that the user may edit without messing up the published information. When the user is done I either delete all the negative items (cancel) or delete the positive items and update the negative to become positive (save).
So far so good, allmost... my problem is that the transaction log grows tremendously.
Is there any other way to accomplish a safe edit that doesn't affect the transaction log as much as my current solution?
Could I be doing something wrong when updateing or deleteing my items?
View 1 Replies
View Related
May 16, 2006
I have a database of 22 gb in sql 2000, my database option is set to full recovery mode, the problem i'm having is the tran log is growing too fast, this morning it was 24 gb, more than the database size. Can anyone help how I can keep it in a managable size?
Thanks in advance!!
View 2 Replies
View Related