{"record":{"id":"5974a416e010de5e","repo":"microsoft/semantic-kernel","slug":"error-creating-oracle-connection-pool","errorCode":null,"errorMessage":"Error creating Oracle connection pool.","messagePattern":"Error creating Oracle connection pool\\.","errorType":"exception","errorClass":"MemoryConnectorConnectionException","httpStatus":null,"severity":"critical","filePath":"python/semantic_kernel/connectors/oracle.py","lineNumber":265,"sourceCode":"\n    async def create_connection_pool(self, **kwargs: Any) -> oracledb.AsyncConnectionPool:\n        \"\"\"Creates an async Oracle connection pool.\"\"\"\n        try:\n            # Create pool with extra user-supplied kwargs\n            self._connection_pool = oracledb.create_pool_async(\n                user=self.user,\n                password=self.password.get_secret_value() if self.password else None,\n                dsn=self.connection_string,\n                wallet_location=self.wallet_location,\n                wallet_password=self.wallet_password.get_secret_value() if self.wallet_password else None,\n                min=self.min,\n                max=self.max,\n                increment=self.increment,\n                **kwargs,  # extra pool params\n            )\n\n        except Exception as err:\n            raise MemoryConnectorConnectionException(\"Error creating Oracle connection pool.\") from err\n\n        return self._connection_pool\n\n\n# region: Oracle Collections\n\n\n@release_candidate\nclass OracleCollection(\n    VectorStoreCollection[TKey, TModel],\n    VectorSearch[TKey, TModel],\n    Generic[TKey, TModel],\n):\n    \"\"\"Oracle implementation of VectorStoreCollection + VectorSearch.\"\"\"\n\n    connection_pool: oracledb.AsyncConnectionPool | None = None\n    db_schema: str | None = None\n    pool_args: dict[str, Any] | None = None","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/python/semantic_kernel/connectors/oracle.py#L247-L283","documentation":"Thrown by OracleSettings.create_connection_pool when oracledb.create_pool_async raises any exception (bad credentials, unreachable DSN, invalid wallet, bad pool params). The original error is chained as __cause__ for diagnostics.","triggerScenarios":"Wrong ORACLE_USER/ORACLE_PASSWORD; unreachable ORACLE_CONNECTION_STRING (network/firewall on port 1521); missing or invalid wallet_location/wallet_password; invalid pool params (min > max, negative increment).","commonSituations":"Env vars not set or mis-scoped; DSN typo; firewall blocking the DB port; wallet misconfigured for mTLS; ORACLE_POOL_MIN > ORACLE_POOL_MAX.","solutions":["Verify ORACLE_USER, ORACLE_PASSWORD, and ORACLE_CONNECTION_STRING are correct and the host:port is reachable","Inspect the chained exception (raise ... from err) - check exc.__cause__ for the real oracledb error","Test connectivity independently with oracledb or sqlplus using the same DSN/credentials","Validate wallet_location/wallet_password if using wallet-based auth","Ensure pool params are valid: min <= max, increment >= 1"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import oracledb\n\ndef can_connect(user, password, dsn) -> bool:\n    try:\n        with oracledb.connect(user=user, password=password, dsn=dsn) as conn:\n            return conn.ping() is None or True\n    except oracledb.Error:\n        return False\n\n# run before create_connection_pool","typeGuard":null,"tryCatchPattern":"from semantic_kernel.exceptions import MemoryConnectorConnectionException\n\ntry:\n    pool = await settings.create_connection_pool()\nexcept MemoryConnectorConnectionException as e:\n    cause = e.__cause__  # the real oracledb error\n    logger.error('Pool creation failed: %s', cause)\n    raise","preventionTips":["Validate ORACLE_* env vars and DSN reachability before starting the app","Always inspect the chained __cause__ for the underlying oracledb error","Keep min <= max and increment >= 1 in pool params","Use a Secrets manager for credentials rather than hardcoding"],"tags":["oracle","connection","database","config"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}