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.
  • 28 Mar 2024
  • 1 Minute to read
  • Dark
    Light
  • 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.

  • Dark
    Light
  • PDF

Article summary

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:

  1. Stop the Pharos License Server Service which will stop all Pharos Services

  2. Close any copies of Pharos Reports that may be running.

OPTION 1: Using SQL Server Enterprise Manager or Management Studio

  1. Detach the Pharos database

  2. Locate the SQL Server data files. There should be two files related to the Pharos Database (pharos_data.mdf and pharos_log.ldf)

  3. Delete the oversized log file (pharos_log.ldf)

  4. Re-attach the Pharos database and restart the Pharos Services, starting with License and Database Services

OPTION 2: Using a command prompt

  1. 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

  2. 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

  3. 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

The backup process for SQL Server 2008 doesn't work with Pharos. It fails with a error stating that "truncate only" is not a valid option.

Note: A small video has been provided using SQL Management Studio.



Was this article helpful?


Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.