- 28 Mar 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
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.
- Updated on 28 Mar 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
The Pharos transaction log file (pharos_log.ldf) should be 30 MB.
Incorrect settings in SQL Server can cause this file to grow much larger, and as a result cause problems.
To correct an oversized Pharos transaction log follow these steps:
Close all connections to the Pharos Database:
Stop the Pharos License Server Service which will stop all Pharos Services
Close any copies of Pharos Reports that may be running.
OPTION 1: Using SQL Server Enterprise Manager or Management Studio
Detach the Pharos database
Locate the SQL Server data files. There should be two files related to the Pharos Database (pharos_data.mdf and pharos_log.ldf)
Delete the oversized log file (pharos_log.ldf)
Re-attach the Pharos database and restart the Pharos Services, starting with License and Database Services
OPTION 2: Using a command prompt
In the Command Prompt run the following query to detach the Pharos database:
osql -U sa -d master -S servername -Q "sp_detach_db 'pharos'" -P password -o outputfile.txt
servername - Name of the Server
password - Valid Password for 'sa' account
Now, in the Command Prompt run the following query to re-attach the Pharos database:
osql -U sa -d master -S servername -Q "sp_attach_single_file_db @dbname = 'pharos', @physname = 'correct_path\pharos_data.mdf'" -P password -o outputfile.txt
Restart the Pharos services starting with License and Database Services
NOTES:
Verify that SQL Server Agent Service is set to Automatic and running to ensure that daily Pharos Database backups are performed.
Check in SQL Server that the log is set to be 30 MB and allowed to grow at 10%.
SQL Server 2008
Note: A small video has been provided using SQL Management Studio.