How to delete large data of table in SQL without running out of log space

Change your database’s Recovery Mode to SIMPLE and then delete rows in smaller batches using a while loop something like this: Keep in mind that logs could grow a lot if you don’t commit the transaction after each chunk and perform a checkpoint. This is how I would do it and take this article http://sqlperformance.com/2013/03/io-subsystem/chunk-deletes as reference,... » read more

Long running open transactions in a SQL Server database

Query to return long running transactions and cumulative CPU time in MS for open transactions in a SQL Server Database A long running transaction keeps the transaction log active from the virtual log file containing the first log record of the transaction. Truncation cannot occur from that virtual log file onward. It may leads to... » read more

Deleting Large Number of Records from a Database Table

Things to remember when deleting a large number of records from a database table. Consider using TRUNCATE instead of DELETE if truncating the table (removing all records from the table) is ok. Remove records in batches. Make sure there is enough space for the log files. If database is simple, truncate log after every run.... » read more

Switch SQL Server Edition

Open up the new SQL Server installation -> Maintenance -> Edition Upgrade SQL Server 2019 Standard Edition -> SQL Server 2019 Developer Edition Not supported. Have to uninstall SQL Server 2019 Standard Edition and then reinstall SQL Server Developer Edition. Rule “SQL Server 2019 edition upgrade” failed. The selected SQL Server instance does not meet... » read more

Readable Secondary Setup For Always On Among Different Editions

There are many limitations to Always On for Standard Edition, and they are all documented here. Basically, you get to use a single availability database with a single secondary replica, with no read access on the secondary replica. Issue: Unable to setup readable secondary databases on SQL Server 2019 Standard Edition Fix: Upgrade from Standard... » read more

SSIS package deployment SSMS 17 Version Discrepancy Issue

Issue: For some reason, unknown to many in the google-verse, trying to deploy the ipsac file using SSMS 17 causes there to be a version discrepancy with the script tasks (e.g. – “version 15 is not supported in this version of SSIS, etc.).  Two primary options are deploying directly from Visual Studio (I used VS... » read more