DBCC CheckDB SQL Job

This job should be ran weekly or monthly. Not recommended to run daily as it can take a long time. Type: Transaction-SQL script (T-SQL) Database: master Command:

SQL Server Error 605

Error: SQL Error 601. Could not continue scan with NOLOCK due to data movement. SQL Sever Logs: Message Error: 605, Severity: 21, State: 3. Message Attempt to fetch logical page (13:2769683) in database 7 failed. It belongs to allocation unit 72057594291945472 not to 72057594369933312. Explanation This error generally signifies page or allocation corruption in the... » read more

DBCC SHRINKFILE

Shrinks the current database’s specified data or log file size. You can use it to move data from one file to other files in the same filegroup, which empties the file and allows for its database removal. You can shrink a file to less than its size at creation, resetting the minimum file size to... » read more

Shrink Database Log Files in Always On

Need to create full database backup and transaction log backup on primary server to shrink the log file. The replica server log file will automatically shrink. Might need to backup the transaction log a couple of times and wait a while before the log file will automatically shrink. Sources: https://dba.stackexchange.com/questions/114787/shrink-database-in-always-on-availability https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-shrinkfile-transact-sql?view=sql-server-ver15