Shrinking the SQL Transaction log associated with the Database attached to your PSIsafe installation is essential for performance and data integrity, and should be performed as often as necessary. These SQL Transact steps can be added to a scheduled SQL Agent Maintenance job as well.
- Login to SQL Instance that contains CNG_Main Database
- Make Full Database backup (SQL Instance>Database>CNG_Main>Tasks>Back Up…)
- Create a new query
- Paste the following code in the query window. It is recommended you go to 100mb, 25mb, and finally 2mb. Change the value for Log size in the query script.
-- START SHRINK Query USE CNG_Main; GO -- Truncate the log by changing the database recovery model to SIMPLE. ALTER DATABASE CNG_Main SET RECOVERY SIMPLE; GO -- Shrink the truncated log file to 2 MB. DBCC SHRINKFILE (CNG_Main_Log, 2); GO -- Reset the database recovery model. ALTER DATABASE CNG_Main SET RECOVERY FULL; GO -- END SHRINK Query
Keywords: PSIsafe Server, PSIsafe On-Premises, PSIsafe Transaction Log, SQL Transaction Log, SQL Transaction Log Shrink
Comments
Article is closed for comments.