File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,7 +128,17 @@ func (conn *OracleConn) ConnString() string {
128128 // infinite timeout by default
129129 options := map [string ]string {"TIMEOUT" : "0" }
130130
131+ // When service_name is explicitly provided, do not forward `sid` as an
132+ // option — go-ora's ConnectionConfig prefers SID over ServiceName when
133+ // both are set, which causes ORA-12505 against PDBs/services like
134+ // FREEPDB1. The `sid` prop is often auto-populated from the URL path
135+ // (see connection.setURL), so dropping it here is the safe choice when
136+ // the caller asked for service-name semantics.
137+ serviceName := conn .GetProp ("service_name" )
131138 for key , new_key := range propMapping {
139+ if key == "sid" && serviceName != "" {
140+ continue
141+ }
132142 if val := conn .GetProp (key ); val != "" {
133143 options [new_key ] = val
134144 }
Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ require (
164164 github.com/clipperhouse/uax29/v2 v2.3.0 // indirect
165165 github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f // indirect
166166 github.com/cockroachdb/apd/v3 v3.2.1 // indirect
167+ github.com/coder/websocket v1.8.14 // indirect
167168 github.com/containerd/console v1.0.5 // indirect
168169 github.com/coreos/go-oidc/v3 v3.5.0 // indirect
169170 github.com/creack/pty v1.1.18 // indirect
Original file line number Diff line number Diff line change @@ -236,6 +236,8 @@ github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f h1:Y8xYupdHxryycyPlc9Y
236236github.qkg1.top/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f /go.mod h1:HlzOvOjVBOfTGSRXRyY0OiCS/3J1akRGQQpRO/7zyF4 =
237237github.qkg1.top/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg =
238238github.qkg1.top/cockroachdb/apd/v3 v3.2.1 /go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc =
239+ github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g =
240+ github.com/coder/websocket v1.8.14 /go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg =
239241github.qkg1.top/compose-spec/compose-go/v2 v2.6.0 h1:/+oBD2ixSENOeN/TlJqWZmUak0xM8A7J08w/z661Wd4 =
240242github.qkg1.top/compose-spec/compose-go/v2 v2.6.0 /go.mod h1:vPlkN0i+0LjLf9rv52lodNMUTJF5YHVfHVGLLIP67NA =
241243github.qkg1.top/containerd/console v1.0.3 /go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U =
You can’t perform that action at this time.
0 commit comments