Skip to content

oracledb: support arbitrary easy connect string #261

Description

@scratchmex

right now if I want to connect via tcps with tcps://localhost:1521/service-name.com?ssl_server_dn_match=no I can't.

The proposal is to allow for any connect string [[protocol:]//]host[:port]/service_name?parameter=value

currently it constructs host:port/service_name only

if connection_type == "sid":
# Thin-mode Easy Connect doesn't accept the legacy host:port:SID form;
# it tries to resolve the string as a TNS alias and fails with DPY-4027.
# makedsn emits a full TNS descriptor that thin mode handles directly.
sid = config.get_option("oracle_sid") or endpoint.database
dsn = oracledb.makedsn(endpoint.host, port, sid=sid)
else:
dsn = f"{endpoint.host}:{port}/{endpoint.database}"

so I had to hack by using host=tcps://localhost and service_name=service-name.com?parameter=value

I am thinking the solution will be to expose a proto and params fields in the TUI so you can do proto=tcps and params=parameter=value&p2=v2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions