Generate Logs for Microsoft Support Troubleshooting for AlwaysOn

Please open the below link 2. Copy the zip file to the Server 3. Unzip the contents of to a folder 4. Open PowerShell as Administrator 5. Change to the directory where the files were extracted 6. Run the following command: .\get-psSDP.ps1 Cluster In case if this command does not work please try .\tss... » read more

Unable to access availability database ‘xxxxxxx’ because the database replica is not in the PRIMARY or SECONDARY role.

Error: Cluster Log: Cluster resource ‘xxxxxx’ of type ‘SQL Server Availability Group’ in clustered role ‘xxxx’ failed. Based on the failure policies for the resource and role, the cluster service may try to bring the resource online on this node or move the group to another node of the cluster and then restart it.  Check... » read more

Failed to designate the local availability replica of availability group as the primary replica, unable to start role.

Error: Cannot bring the Windows Server Failover Clustering (WSFC) resource (ID ‘xxxxxxxxxxxxx’) online (Error code 5942). The WSFC service may not be running or may not be accessible in its current state, or the WSFC resource may not be in a state that could accept the request. For information about this error code, see “System... » read more

The Operation Could Not Be Performed Because OLE DB Provider “SQLNCLI11” For Linked Server Was Unable To Begin A Distributed Transaction

Issue: The operation could not be performed because OLE DB provider “MSOLEDBSQL” for linked server “XXXXXX” was unable to begin a distributed transaction. Fix: There has been a lot of times where we can encounter this error – “The operation could not be performed because OLE DB provider “SQLNCLI11” for the linked server was unable to... » read more

SQL Job Failure Email Not Working

Step 1 – Validate SQL Server Database Mail First test to see if the system is able to send email using the Database Mail profile in SQL Server Management Studio by navigating to Management > Database Mail, then right clicking on Database Mail and selecting the “Send Test E-Mail…” option. Once the interface loads, select... » read more

Fastest way to shrink database log files

If the database can do with just a simple backup/recovery model, then… Change database from “Full” recovery model to “Simple” recovery model (Database Properties -> Options) Shrink database log file (Tasks -> Shrink -> Files -> Shrink Log Files)

Unable to see a list of job history

Issue: Unable to see a list of past job history. Only see the most recent. Default settings limits to last 1000 records overall and last 100 records per job. Fix: Make sure the Limit size of job history log is not enabled. Else you will not be able to see older jobs history. SQL Agent... » read more

Unable to Join Database to Availability Group

Issue: Unable to join restored database to Availability Group You can create an availability group using the New Availability Group wizard or using a series of transact-sql commands. A common failure can occur when attempting to create an availability group using either method. The error is as follows and is caused because the target primary... » read more