public void disconnectProxyUser() 
  throws SQLException {
    
    if(mIsProxyConnectionActive || mIsSysDBAConnectionActive){
      if(isTransactionActive()){
        safelyRollback();
        throw new ExFatalError("Attempted to disconnect from user " + currentUserName() + " but a transaction is still active");
      }
      else {
        if(mIsProxyConnectionActive){
          //Close the proxy connection
          mPromoteConnection.close(OracleConnection.PROXY_SESSION);
          
          mProxyUserName = "";
          mIsProxyConnectionActive = false;
        }
        else if (mIsSysDBAConnectionActive) {
          mIsSysDBAConnectionActive = false;
        }
      }
    }
    else {
      //Do nothing if not a proxy at the moment
      Logger.logDebug("Disconnect requested but no proxy connection active");
    }
  }