Solved

templog.ldf size too large

Posted on 2014-02-06
7
4,918 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
  • 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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:ScottPletcher
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I work for a company that primarily works with small businesses as their outsourced IT vendor. As such the majority of these customers utilize some version of Small Business Server. Due to the economics of running a small business, many of these cus…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now