If this file grows to be over 100 MB, it is possible that it is not being truncated during your backups. Please make sure that you are doing regular backups using the Database Maintenance Planner or using a special SQL plug-in for your backup software. Do not simply backup the .MDF file for the database because not all of the required SQL data is in the .MDF file as much of SQL remains in memory until it can be committed to the .MDF file. Additionally the .MDF and .LDF files must be in synch (only occurs when a database is shut down or is detached) otherwise the .MDF cannot be restored by itself.
To alleviate the problem while you fix your backup settings, you can manually do a onetime truncation of the .LDF file. To manually truncate the .LDF file, follow these steps:
- Make sure you have backed up the respective database for the .LDF file you need to truncate.
- First try and truncate the transaction log through SQL commands
- Open SQL Server Enterprise Manager
- Start a new Query command
- The following SQL command will manually clear the transaction logs for the Altiris database.
use Altiris
Backup Log Altiris with truncate_only
DBCC Shrinkfile('Altiris_Log',truncateonly)
NOTE: The same commands can be used for other database used by Altiris products, just substitute out "Altiris" and "Altiris_log" for the database and database log names used in the other Altiris pattern taking note to change the names appropriately depending on the database you are trying clean up for.
- Wait 5 min and repeat the same command at least once more
- Make another separate FULL backup of the database
If the above does not shrink the log file as expected, a more aggressive and invasive option can be used if necessary.
- For Altiris_log.ldf or Altiris_Incidents_log.ldf, go to Services Manager on the Notification Server and stop these services in this order:
- Altiris Client Message Dispatcher
- Altiris NS Receiver
- Altiris Service
- World Wide Web Publishing Service
- If eXpress_log.ldf, go to Services Manager on the Deployment Server and stop these services in this order:
- Altiris eXpress PXE Config
- Altiris eXpress PXE MTFTP
- Altiris eXpress PXE Server
- Altiris eXpress Server
- Altiris Deployment Server DB Management
- Altiris Deployment Server Console Manager
- Altiris Deployment Server Data Manager
- Stop any other services on your Notification Server and/or Deployment Server that begin with Altiris.
- Open SQL Server Enterprise Manager.
- Browse to your SQL Server, and then Databases.
- For each respective database for the .LDF file you want to truncate, do the following:
- Right-click the database and choose All Tasks > Detach Database.
- If any connections are using the database, click Clear, OK, and then No.
- Click OK and OK again.
- In Windows Explorer, delete each .LDF file you want to truncate.
- Reopen SQL Server Enterprise Manager.
- For each database you detached in step 7, do the following:
- Right-click Databases choose All Tasks > Attach Database.
- Select the .MDF file for the database
- Click OK, Yes, and then OK.
- Right-click the newly attached database and choose Properties.
- Go to the Options tab, set the Recovery Model to Simple, and click OK.
- If you truncated Altiris_log.ldf or Altiris_Incidents_log.ldf, go to Services Manager on the Notification Server and start these services in this order:
- Altiris Service
- Altiris NS Receiver
- Altiris Client Message Dispatcher
- If you truncated eXpress_log.ldf, go to Services Manager on the Deployment Server and start these services in this order:
- Altiris Deployment Server Data Manager
- Altiris Deployment Server Console Manager
- Altiris Deployment Server DB Management
- Altiris eXpress Server
- Altiris eXpress PXE Server
- Altiris eXpress PXE MTFTP
- Altiris eXpress PXE Config
- Start any other services on your Notification Server and/or Deployment Server that begin with Altiris.
Applies To
SQL Server with Altiris Notification Server or Deployment Server.