Desktop and Enterprise Software, Solutions and Services for Chemists and Biologists.

Desktop Support » FAQ » Details

Question:

Transaction log file grows unexpectedly or becomes full in Inventory 12 and ENotebook 12 SQL databases

Answer:

This problem happens on databases that the customer have never taken a FULL backup so the transaction log is not truncated or shrinked.
* SQL Server may mark databases as suspect because of a lack of space for transaction log expansion. - To shrink the Log file of the database we need the Microsoft SQL Server Management Studio Express ->

  • SSMS

  • If you try to shrink the log file with the User Interface it won’t work, please follow these instructions to shrink the log file successfully:
    - Expand the databases folder
    - Right-click on the database affected with the huge log file and select the option to run a new query.. - To truncate the Inventory log file please execute the following script:
    USE CHEMINVDB2
    GO
    BACKUP LOG CHEMINVDB2 WITH TRUNCATE_ONLY
    GO
    DBCC SHRINKFILE (CHEMINVDB2_Log, 1)
    GO
    exec sp_helpfile
    - To truncate the Enotebook log file please execute the following script:
    USE CSNotebook12
    GO
    BACKUP LOG CSNotebook12 WITH TRUNCATE_ONLY
    GO
    DBCC SHRINKFILE (CSNotebook12_Log, 1)
    GO
    exec sp_helpfile
    ** this last line will show the new size of the log file in the output window of the SSME.**
    Screenshot of the query

    In SQL Server you can review the log_reuse_wait and log_reuse_wait_desc columns of the sys.databases catalog view to determine the following things:
    · Why the transaction log space is not reused
    · Why the transaction log cannot be truncated


    Created on: 9/27/2013