class_docstr: This handler handles connection and execution of the Microsoft SQL Server statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","Microsoft","SQL","Server","statements","."]
code: def __init__(
      self, name: str, connection_data: Optional[dict], **kwargs
  ):
      super().__init__(name)
      self.host = connection_data.get("host")
      self.port = int(connection_data.get("port") or 1521)
      self.sid = connection_data.get("sid")
      self.service_name = connection_data.get("service_name")
      self.user = connection_data.get("user")
      self.password = connection_data.get("password")
      self.disable_oob = bool(connection_data.get("disable_oob"))
  
      self.auth_mode = None
      if "auth_mode" in connection_data:
          mode_name = (
              "AUTH_MODE_" + connection_data["auth_mode"].upper()
          )
          if not hasattr(oracledb, mode_name):
              raise ValueError(f"Unknown auth mode: {mode_name}")
          self.auth_mode = getattr(oracledb, mode_name)
  
      if self.sid is None and self.service_name is None:
          raise ValueError(
              "Either 'sid' or 'service_name' must be given"
          )
      if self.sid and self.service_name:
          raise ValueError(
              "Only one of 'sid' or 'service_name' must be given"
          )
  
      if self.sid:
          self.dsn = makedsn(
              host=self.host, port=self.port, sid=self.sid
          )
      else:
          self.dsn = makedsn(
              host=self.host,
              port=self.port,
              service_name=self.service_name,
          )
  
      self.connection = None
      self.is_connected = False
  
imports: from typing import Optional
  from collections import OrderedDict
  import pandas
  import oracledb
  from oracledb import connect, Connection, makedsn
  from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
  from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb.utilities import log
  from mindsdb.integrations.libs.base import DatabaseHandler
  from mindsdb.integrations.libs.response import HandlerStatusResponse, HandlerResponse, RESPONSE_TYPE
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
label_desc: Use image node_id 1 to create a new OracleHandler object from inherited base classes: DatabaseHandler with example: obj = OracleHandler(name, connection_data)