Skip to content

dsn.py small fix to support NNE #307

@evgeniy-ginzburg-db

Description

@evgeniy-ginzburg-db

This is a couple of changes to fix DSN creation issue I have right now.
In general, full support of tsnames.ora parameters in spec will be preferable, but currently I don't have resources to do it.

BR, Evgeniy

index eb4935d..198668d 100644
--- a/src/oracledb/dsn.py
+++ b/src/oracledb/dsn.py
@@ -47,8 +47,6 @@ def makedsn(
     port: int,
     sid: str = None,
     service_name: str = None,
-    dedicated: bool = False,
-    ssl: bool = False,
     region: str = None,
     sharding_key: str = None,
     super_sharding_key: str = None,
@@ -58,13 +56,8 @@ def makedsn(
     string is identical to the strings that are defined in the tnsnames.ora
     file.
     """
-    proto = 'TCP'
     connect_data_parts = []
     _check_arg("host", host)
-    if ssl:
-        proto = 'TCPS'
-    if dedicated:
-        connect_data_parts.append('(SERVER=DEDICATED)')
     if sid is not None:
         _check_arg("sid", sid)
         connect_data_parts.append(f"(SID={sid})")
@@ -82,6 +75,6 @@ def makedsn(
         connect_data_parts.append(f"(SUPER_SHARDING_KEY={super_sharding_key})")
     connect_data = "".join(connect_data_parts)
     return (
-        f"(DESCRIPTION=(ADDRESS=(PROTOCOL={proto})(HOST={host})"
+        f"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST={host})"
         f"(PORT={port}))(CONNECT_DATA={connect_data}))"
     )

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions