Databases require regular maintenance to sustain performance and reliability. As databases grow, routine maintenance helps optimize performance, reduce downtime, and prevent data integrity issues.
This page describes several ways to perform routine maintenance tasks with dbForge tools, such as Backup and Restore, the Index Manager CLI, the Index Manager tool, and Table Editor. The scenarios on this page don’t cover every use case; they illustrate common database maintenance workflows in dbForge.
Warning
To prevent data loss, back up your database.
You can also schedule backups to reduce manual work and the risk of human error.
Fragmented indexes can slow down query performance. Regular index analysis and maintenance help ensure efficient query execution and overall database performance.
You can defragment indexes using:
The Index Manager tool: Enables you to scan your database for fragmented indexes and rebuild them if necessary.
The Index Manager CLI: Enables you to analyze and optimize index health directly from the command line.
You can also schedule index defragmentation in dbForge Studio for SQL Server.
Outdated statistics can lead to inefficient query execution plans and slower performance. Keeping statistics up-to-date helps the query optimizer generate better execution plans.
To update statistics, use one of the methods:
EXEC sp_updatestats;

You can also schedule a statistics update in dbForge Studio for SQL Server to run automatically.
Regular integrity checks help detect and resolve data corruption early, preventing disruptions to database operations and potential performance degradation.
Tip
Perform integrity checks during off-peak hours to reduce performance impact.
An integrity check includes the following steps:
Execute the following command:
DBCC CHECKDB (<database_name>) WITH NO_INFOMSGS, ALL_ERRORMSGS;
The results appear in the Output pane. If the command completes without errors, the database passes the integrity check. If errors occur, the output provides details about the detected corruption or inconsistencies that require further investigation.

Monitor helps you detect performance slowdowns that may be related to corruption or integrity problems. Use the tool to track long-running queries, I/O bottlenecks, and blocking sessions in real time.
After that, use Query Profiler to get details about each query’s execution plan, resource consumption, and optimization opportunities.
After checking integrity and identifying bottlenecks, use AI Assistant in dbForge Studio for SQL Server to optimize queries. AI Assistant suggests improvements based on query patterns and performance metrics.

Databases are constantly growing, and uncontrolled growth can lead to performance degradation and storage issues. Monitor database size regularly to maintain efficiency and prevent capacity issues.
Managing database growth and storage includes the following steps:
Execute the following query:
SELECT *
FROM <table_name>
WHERE <filtering_criteria>;
The filtered data appears in the Results grid.

In the Results grid, select the data to export, then use the Data Export wizard to export the data and save it to the specified location.
Warning
To prevent data loss, back up your database.
Execute the following DELETE statement for the data you want to remove:
DELETE
FROM Person.EmailAddress
WHERE EmailAddress LIKE '%@corecompany.com';
The selected data is deleted from the database.

In addition to using dbForge Studio for SQL Server tools, such as Backup and Restore, the Index Manager CLI, the Index Manager tool, and Table Editor, you can follow these recommendations to effectively perform regular maintenance tasks.
| Maintenance Best Practice | Description |
|---|---|
| Perform maintenance during low-load periods | Run maintenance tasks during off-peak hours. |
| Keep backups | Create and retain multiple backups (for example, daily, weekly, and monthly). |
| Test backups | Test backups in a development environment before restoring them in production. |
| Monitor index fragmentation | Scan for index fragmentation regularly using Index Manager. |
| Update statistics | Keep statistics up to date especially after bulk operations. |
| Archive data | Archive data before you shrink a database to free space and prevent performance issues. |
| Use appropriate autogrowth settings | Configure autogrowth settings to avoid frequent file growth events. |
| Monitor the transaction log size | Monitor the SQL Server transaction log size and perform regular log backups. |
| Delete unused indexes | Identify and remove unused or redundant indexes. |
| Manage backup storage | Compress backups to reduce storage requirements. |
| Encrypt backups | Protect backup files with passwords and encrypted storage. |
| Monitor error logs | Regularly review the SQL Server error logs. |
| Optimize tempdb | Tune tempdb to reduce contention in high-transaction workloads. |
| Test scripts | Test maintenance scripts in a development environment before you run them in production. |
| Monitor maintenance jobs | Review maintenance jobs to identify long-running tasks. |