Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to Oracle Database with password Containing "@" #37707

Closed
EagleShare opened this issue Mar 6, 2020 · 2 comments
Closed

Connecting to Oracle Database with password Containing "@" #37707

EagleShare opened this issue Mar 6, 2020 · 2 comments

Comments

@EagleShare
Copy link

EagleShare commented Mar 6, 2020

What version of Go are you using (go version)?

1.13.4 

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
windows/amd64

Connecting to oracle database using sql/database with Open function

Tried both possibilities which didn't work

db, err := sql.Open("goracle", "system/oracle@2019@localhost:1521/orcl")
db, err := sql.Open('goracle', 'system/"oracle@2019"@localhost:1521/orcl')

What did you expect to see?

Successful connection to Database.

What did you see instead?

params=oracle://sytem:SECRET-PfbiAOWC07c=@2019"%40localhost:1521/orcl?connectionClass=GORACLE&poolIncrement=1&poolMaxSessions=1000&poolMinSessions=1&sysdba=0&sysoper=0&sysasm=0&standaloneConnection=0&enableEvents=0&heterogeneousPool=0&prelim=0&poolWaitTimeout=3000&poolSessionMaxLifetime=3600&poolSessionTimeout=300 extAuth=0: ORA-12154: TNS:could not resolve the connect identifier specified

@xhit
Copy link
Contributor

xhit commented Mar 6, 2020

First, your password need to be parsed with url.QueryEscape(password)

Second, goracle was moved to godror -> https://github.com/godror/godror

Third, you need to create this issue in godror github repo because this repo is for Go programming language or standards packages.

@ianlancetaylor
Copy link
Member

This doesn't seem to be something that we can fix in the Go repository, so closing.

@golang golang locked and limited conversation to collaborators Mar 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants