Solved

templog.ldf size too large

Posted on 2014-02-06
7
5,741 Views
Last Modified: 2014-02-06
I have a SQL 2005  installation on 2003 sbs pk.2. The templog.ldf file is 581GB. What
is in this file and how can I reduce the size? I know nothing about SQL.


i found following info while trying to find a solution. Is the following ACCURATE and TRUE, as i would not want to Loose ANY DATA...

 

The templog.ldf file is the transaction log for the TEMPDB database, and if
it's 37GB, that's an indication something is not correctly configured in
your MSDE installation, or some major activity significantly expanded the
temp database, and it didn't get cleaned up properly.

Since the TEMPDB database is rebuilt everytime the system starts, or the
database server is restarted, I would suggest this remediation:

[1] Stop the "Update Services" service.
[2] Stop the MSSQL$WSUS service.
[3] Delete the tempdb.mdf and templog.ldf files.
[4] Reboot the server. If you cannot reboot the server, then
[a] Restart the MSSQL$WSUS service.
* Restart the "Update Services" service.

[5] Continue to monitor the size of the tempdb.mdf and templog.ldf files.


Everything you need for WSUS is at
http://technet2.microsoft.com/windowsserver/en/technologies/featured/wsus/default.mspx

And, almost everything else is at
http://wsusinfo.onsitechsolutions.com
0
Comment
Question by:gstevederby
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 12

Expert Comment

by:Tony303
ID: 39840153
Hi,

Do you have the SQL Server Management Studio for the SQL 2005?
If you don't, here it is...

http://www.microsoft.com/en-nz/download/details.aspx?id=8961

OK, once you have installed expand the nodes so you see your tempdb.
Right click....Reports....then look for Disk Usage.
Trans-log-TempDB-Pie-chart.docx
0
 
LVL 34

Expert Comment

by:Brian Crowe
ID: 39840159
tempdb is just that...temporary.  You wouldn't want to do anything destructive to it while the instance is running but if you stopped the SQL Server service and then deleted the temp .mdf and .ldf files you could restart the instance without any problems.  Tempdb should be in simple recovery mode which should prevent the file from getting too large.  I don't know how yours has managed to grow so out of control.

execute the following command to find out how much of the log file is actually being used:

EXECUTE ('DBCC SQLPERF (LOGSPACE)')
0
 

Author Comment

by:gstevederby
ID: 39840181
can you tell me the exact syntex to the EXECUTE ('DBCC SQLPERF (LOGSPACE)')  command, having trouble...and do i just run from cmd?
0
Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

 
LVL 34

Accepted Solution

by:
Brian Crowe earned 500 total points
ID: 39840224
you would run it in a SSMS query.  download and install the 2005 SSMS client tools or you can even use the more current 2012 SSMS client tool which is backward compatible.

http://www.jasonstrate.com/2013/05/get-just-the-tools-ssms-download/

As to your original question.  I don't see anything damaging about the instructions you found.  Stopping the service, deleting the tempdb files, and restarting the service should alleviate your file size issues at least temporarily.
0
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 39840239
I've never seen a tempdb log size anywhere close to that.

Copy this code into a "New Query..." window in Mgmt Studio and run it:

DBCC SQLPERF (LOGSPACE) --1
DBCC OPENTRAN --2
SELECT * FROM sys.databases WHERE name = 'tempdb' --3

and report the results for:
% free in tempdb from the first command;
any open trans shown by the second command;
the entire output from the third command;
0
 

Author Comment

by:gstevederby
ID: 39840365
just rebooting now...does 2003sms r2 work for the SSMS query download and install?
0
 
LVL 12

Expert Comment

by:Tony303
ID: 39840431
I think so, the sms version is effectively a Windows Standard Server 2003.

Failing that you could install the SSMS 2008 and connect "back" to your 2005 database.

http://www.microsoft.com/en-nz/download/details.aspx?id=22985

I use SSMS 2008 to interogate both by 2005 and 2008 SQL instances.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CAST issue with SQL 2000 15 42
Removing SCCM 2016 4 44
efficient backup report for SQL Server 13 77
File attachment in the SQL Database from application 10 39
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question