Author
Delete Log Records Older Than 1 Month
Delete records from log table where the records are older than 1 month.
Manual Failover of Window Failover Cluster
Use Transact-SQL To manually fail over an availability group: Connect to the server instance that hosts the target secondary replica. Use the ALTER AVAILABILITY GROUP statement, as follows:ALTER AVAILABILITY GROUP group_name FAILOVER In the statement, group_name is the name of the availability group.The following example manually fails over the MyAg availability group to the connected secondary replica: Sources: https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/perform-a-planned-manual-failover-of-an-availability-group-sql-server?redirectedfrom=MSDN&view=sql-server-ver15
Create Table Type from Script
MyTableType Table Type List all permissions for all table types.
Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON’
Error: Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON’. Reason: Token-based server access validation failed with an infrastructure error. Source Logon Message Error: 18456, Severity: 14, State: 11. Note: This error seems to happen when trying to query the database using SQL Server Manager Studio (SSMS) on a remote computer. This error does not happen when... » read more
Defrag Index Script
uspDbaIndexDefrag xx_dba_indexDefragStatus xx_dba_indexDefragExclusion xx_dba_indexDefragLog