go-ora icon indicating copy to clipboard operation
go-ora copied to clipboard

Connect "/ as sysdba" In Linux

Open PaulWalkerUK opened this issue 1 year ago • 2 comments

In Linux, I can logon to a local database with SQL*Plus using sqlplus / as sydba. I'm trying to do similar with this package.

I can make it work by specifying the username and password:

hostname := "myhostname"
port := 1521
service := ""
username := "sys"
password := "correct_password"

urlOptions := map[string]string{
	"SID":           "MYSID",
	"dba privilege": "sysdba",
}

connectionString := go_ora.BuildUrl(hostname, port, service, username, password, urlOptions)

I've tried various combinations of no password/any password, setting "AUTH TYPE": "OS" etc but haven't managed to find anything that works without specifying the sys password.

Is there a way I can connect as SYS using this package similar to sqlplus / as sysdba ?

PaulWalkerUK avatar May 28 '24 13:05 PaulWalkerUK

still os authentication doesn't work with linux (only windows)

sijms avatar Jul 08 '24 05:07 sijms

+1

marcuoli avatar Jul 24 '25 15:07 marcuoli