---
title: "Transactions Log file keeps growing."
slug: "transactions-log-file-keeps-growing"
updated: 2024-04-01T16:39:59Z
published: 2024-04-01T16:39:59Z
canonical: "kb.pharos.com/transactions-log-file-keeps-growing"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://kb.pharos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Transactions Log file keeps growing.

### Problem:

SQL Transactions Log file keeps growing.

---

### Cause:

When SQL runs a backup, the Transaction Log is truncated. SQL Agent never ran, Transaction Log size kept growing.

### Solution:

To free up the space in the SQL Server transaction log for the Pharos Database, follow these steps:

1. Close all connections to the Pharos Database on SQL Server by stopping the Pharos Database Service and any dependant Pharos Print Services. Also close any copies of Pharos Reports that may be running.
2. Open SQL Query Analyzer, logging on as 'sa' or a user with System Administrator rights and run following SQL query:

sp_detach_db 'pharos'
3. Open Windows Explorer and browse to the location where the SQL Server data files are located, e.g. c:\MSSQL7\Data. There should be two files related to pharos database (pharos_data.mdf and pharos_log.ldf). Delete the old log file that is now too big (pharos_log.ldf). You may need to delete the file from Recycle Bin as well.
4. Switch back to SQL Query Analyzer and run the following SQL query:

sp_attach_single_file_db @dbname ='pharos', @physname = 'c:\MSSQL7\Data\pharos_data.mdf'
5. Restart the Pharos Services (starting with Pharos Database Service).

## Related

- [Pharos Cloud Mac Print Scout Log File locations.](/beacon-mac-print-scout-log-file-locations.md)
- [How can I change the Pharos Updater Service - packages and log file location.](/how-can-i-change-the-pharos-updater-service-packages-and-log-file-location.md)
- [Pharos Transaction log in SQL has grown very large. The default size is 30MB to start but may grow and shrink as needed based on the Database configuration.](/pharos-transaction-log-in-sql-has-grown-very-large-the-default-size-is-30mb-to-start-but-may-grow-and-shrink-as-needed-based-on-the-database-configuration.md)
- [KM iMFP - How to change the log file directory for the service & application.](/km-imfp-how-to-change-the-log-file-directory-for-the-service-application.md)
- [Sentry SR25 - How to obtain a log file from the SR25 device.](/sentry-sr25-how-to-obtain-a-log-file-from-the-sr25-device.md)
