tfs:tf30042 Database Full processing method

Source: Internet
Author: User
Tags server error log

Original: tfs:tf30042 Database Full processing method

This morning, the company called, said TFS (Team Foundation Server) Microsoft Source control software check-in, Error: TF30042 database is full.



After almost half an hour of processing, basically good, again summed up:

At the prompt, I first check disk space, found that there are dozens of G (the company's TFS database is larger, optical compression backup is more than 20G), enough to back up.

After checking the hard disk space, then check the database space, found that the log file is indeed full, according to the conventional idea, a log backup. Normally, this will clear the log. But I still can't find it. I have a headache for this. Look at the recovery model, is complete, and then I will switch to large capacity log, in fact, this step I feel a bit redundant, because as source code control, frequent check-out check-in is very normal, but almost no large capacity to insert, so the mode of change is not very useful, just as a "tentative" action only.

Later see the online prompt said check SQL Server error log, again, many DBA books on the issue check is the order: 1, check the Windows error log, 2, check the SQL Server error log and then do the corresponding processing. Because of my lack of experience, I skipped directly, but the problem was delayed. After checking the error log, you did find some useful information:


According to "message", I went to the database with the following code query:

SELECT name, Log_reuse_wait_desc from sys.databases  where log_reuse_wait_desc = ' Replication '

Found only one record, which is my Tfs database: Tfs_hkitcollection. Then look it up on MSDN. I found replication this state because I restored some of the published databases or did not remove them properly, and my server did not have any replicated databases, but I was not sure until I took over. Let's fix it first.

Perform:

Sp_removedbreplication ' Specify database '

An explanation of this stored procedure is based on Books Online:

You should use this procedure only if you have failed other methods to delete the replicated object.
After execution, in the query above the statement:
SELECT name, Log_reuse_wait_desc from sys.databases  where name= ' tfs_hkitcollection '

Found log_reuse_wait_desc This column has been changed back to log backup, proving that the processing was successful, and then I do a log backup. Database TFS can be accessed. So far, the problem is done. In addition, if necessary, you can shrink the database.
Add some knowledge:---Check whether the current database can be used for replication, 1 = true,0 = FALSE, you can change db_name () to check other databases. I don't know if I can use it before 2008.
SELECT Databasepropertyex (db_name (), ' ispublished ')

As for replication, more than the scope of this article, this article mainly records processing experience, hope that the same situation can be resolved, but also as a record of their own.

tfs:tf30042 Database Full processing method

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.