I was trying to establish a connection with the remote Oracle Database via GOLANG. I used the “godror” library but it came out with the error of “ORA-12560: TNS:protocol adapter error”. I’d like to know what’s the problem.
Here’s the code that I used:
db, err:= sql.Open(“godror”,user = "username" password = "password" connectString = "hostname:port/service_name"
)
The username, password and connectString that I used for GOLANG is the same that I’m using with the sqldeveloper for connecting to the database. No such “TNS Protocol Adaptor Error” issue happened.
I thought that maybe was the oracle_home/tns_admin environment problem, but it still failed after configuring those 2 environment path.