Use TRUNCATE instead of DELETE If you need to clear the data in a table, use TRUNCATE instead of DELETE. TRUNCATE lock the table instead of at each row. No triggers are activated and no logs are generated resulting in faster performance. Note: TRUNCATE TABLE will reset your identity to the initial seed, whereas DELETE... » read more
The following SQL Server Not Exists query will find the Employees whose Occupation is neither Skilled Manual nor Clerical. Sources: https://www.tutorialgateway.org/sql-not-exists-operator/
The schema change it taking so long because you are assigning a default value to the column during the change and enforcing that with a non-nullable column, and it has to populate the column for millions of rows, which is an incredibly expensive operation. Alternative to making it faster would be to add it in... » read more
Configuring SQL Server Database Always On Availability Group Listeners are setup and all processes point to the listeners. Failover jobs have been setup. All jobs in the Always On category. XXXXX_AvailabilityGroup category. Failover Mode set to “Automatic”.