diff --git a/web/pgadmin/static/js/sqleditor/execute_query.js b/web/pgadmin/static/js/sqleditor/execute_query.js
index 2c966550c..60ca49296 100644
--- a/web/pgadmin/static/js/sqleditor/execute_query.js
+++ b/web/pgadmin/static/js/sqleditor/execute_query.js
@@ -13,6 +13,7 @@ import url_for from '../url_for';
 import axios from 'axios';
 import * as httpErrorHandler from './query_tool_http_error_handler';
 import * as queryTxnStatus from 'sources/sqleditor/query_txn_status_constants';
+import * as SqlEditorUtils from 'sources/sqleditor_utils';
 
 class LoadingScreen {
   constructor(sqlEditor) {
@@ -59,6 +60,7 @@ class ExecuteQuery {
 
     const self = this;
     self.explainPlan = explainPlan;
+    SqlEditorUtils.disable_connection_dropdown(true);
 
     const sqlStatementWithAnalyze = ExecuteQuery.prepareAnalyzeSql(sqlStatement, explainPlan);
 
@@ -98,6 +100,7 @@ class ExecuteQuery {
           // Highlight the error in the sql panel
           self.sqlServerObject._highlight_error(httpMessageData.data.result);
         }
+        SqlEditorUtils.disable_connection_dropdown(false);
       }).catch(function (error) {
         self.onExecuteHTTPError(error);
       }
diff --git a/web/pgadmin/static/js/sqleditor_utils.js b/web/pgadmin/static/js/sqleditor_utils.js
index 5f5b149e0..e51cab57b 100644
--- a/web/pgadmin/static/js/sqleditor_utils.js
+++ b/web/pgadmin/static/js/sqleditor_utils.js
@@ -57,6 +57,17 @@ define(['jquery', 'underscore', 'sources/gettext', 'sources/url_for'],
         return string.charAt(0).toUpperCase() + string.slice(1);
       },
 
+      // Disables arrow to change connection
+      disable_connection_dropdown: function (status) {
+        if (status){
+          $('.conn-info-dd').prop('disabled',true);
+          $('.connection-data').css({pointerEvents: 'none', cursor: 'arrow'});
+        }else{
+          $('.conn-info-dd').prop('disabled',false);
+          $('.connection-data').css({pointerEvents: 'auto', cursor: 'pointer'});
+        }
+      },
+
       // Status flag
       previousStatus: null,
 
