No Managed Connections. Steps to enable Read Committed Snapshot Isolation- MSSQL

No Managed Connections. Steps to enable Read Committed Snapshot Isolation- MSSQL

Enabling Read Committed Snapshot Isolation in MS SQL server
In MS SQL environments enabling 'Read committed Snapshot isolation (RCSI)' is the first step in handling application server performance and crash issues.

What is RCSI?

Since databases handle multiple transactions in parallel, there has to be a mechanism to handle concurrent reads and writes in the database. For example, if one transaction is running a update query and other transaction is executing a select query then, whether the select query should be able to see the newly updated value or the old value? Or should the select query transaction wait till the update query transaction completes? These are some of the questions that are answered based on the concurrency model that is being used. There are 2 concurrency models.
1. Optimistic concurrency control  
2. Pessimistic concurrency control  

In pessimistic model, transactions lock the rows that they are reading or modifying so that other transactions have to wait till this transaction completes to access the rows.

In optimistic model, the rows are not locked. Two transactions can simultaneously read/update a row. Only if there are any conflicting updates identified, then one of the transactions is rolled back. Since there is no locks involved in this model, this performs much better than the former.  

Postgres database by default has optimistic model. SQL server on the other hand was originally designed using pessimistic model but due to performance problems in it an option was later provided in SQL server to enable optimistic concurrency control. This is called read committed snapshot isolation.

How to verify / enable RCSI  

To check whether RCSI has been enabled:  

SELECT is_read_committed_snapshot_on FROM sys.databases WHERE [name] = '<db_name>'
If this returns 1 then RCSI is enabled. If not, follow the below instructions to enable it.  

Instructions to enable RCSI:   

This process might take considerable amount of time to complete. Please do this on a weekend / during off hours as it requires downtime.  
1. Shut down the ServiceDesk Plus service. If any other application (maybe reporting tools) connects to servicedesk database, you need to stop them too.  

2. Please login to SQL Management studio and execute the below queries...  

      i. take the database offline
USE master 

      ii. enable read committed snapshot  

      iii. bring database back online  
USE master

3. Please verify whether RCSI is enabled using the query mentioned at the top. You may start ServiceDesk Plus now.  


Understanding RCSI :  

How to take database offline and bring it back online :   

                    New to ADSelfService Plus?

                      • Related Articles

                      • No ManagedConnections - Steps to increase pool size

                        From the logs we were able to identify the error trace as [org.apache.catalina.authenticator.NMSFormAuthenticator]|[WARNING]|[68]|: Unexpected error while forwarding to login page : {0}|javax.servlet.ServletException: ...
                      • How do I convert the database from PGSQL to MSSQL?

                        1. Stop ManageEngine Supportcenter Plus service. 2. Take a backup of the existing data and configuration under PGSQL database by following the below steps. Open CMD as an administrator and execute  command to start the data backup. ...
                      • Database migration from MySQL to Postgres/MSSQL in SCP 8.1

                        We no longer support the use of MYSQL as database in SupportCenter Plus. Hence, we request our users to migrate to Postgres (which is in-built) or Microsoft SQL. Please follow the below steps to carry out the database migration: 1. Shutdown the ...
                      • How to Enable Glowroot in SCP verison 14.0 and above

                        The Glowroot can be enabled in SCP version 14.0 and above versions, by 2 methods: 1.Enable glowroot in run.bat file, if you are starting the application via command prompt >>You need to remove the term "rem" the run.bat file for glowroot and save ...
                      • How to Change default password on PGSQL database

                        Please do follow the below steps which would assist you in changing the default Postgres password.  1. Stop the application services.   2. Please take a trimmed backup <OR> take a Snapshot of  the Server 3. Open Command Prompt with Admin Privileges ...