Category: SQL Server

SQL Server 2014 Tutorial – List all the databases in SQL Server using Query

Problem Statement You need to list all the databases that are present in the current SQL Server instance. Solution The list of all the databases from the SQL Server instance can be obtained from the sys.databases object as shown below. 1. Open SQL Management Studio and connect to the SQL Server instance with your login details. 2. Click the “New Query” button and enter the…

SQL Server Error Code – 22995 a value for the parameter @retention can

In this blog post, you’ll learn more about the SQL Server Error Code 22995 and the error message description that is shown SQL Server Error Code 22995 SQL Server Error Description for the Code :22995 A value for the parameter @retention cannot be specified when the job type is ‘capture’. Specify NULL for the parameter, or omit the parameter from the statement.

SQL Server Error Code – 41138 cannot accept always on availability gro

In this blog post, you’ll learn more about the SQL Server Error Code 41138 and the error message description that is shown SQL Server Error Code 41138 SQL Server Error Description for the Code :41138 Cannot accept Always On Availability Groups operation operation on database ‘%.*ls’ of availability group ‘%.*ls’.  The database is currently processing another operation that might change the database state. Retry the…

SQL Server Error Code – 8566 unable to commit a prepared transaction

In this blog post, you’ll learn more about the SQL Server Error Code 8566 and the error message description that is shown SQL Server Error Code 8566 SQL Server Error Description for the Code :8566 Unable to commit a prepared transaction from the Microsoft Distributed Transaction Coordinator (MS DTC). Server will restart the database and MS DTC recovery is expected to resolve any in-doubt transaction.