The documentation page that should help you is Libname - Oracle:
If you have a path alias already created (service name), you can refer to it with the language you use above:
libname mydblib oracle user=myusr1 password=mypwd1 path=mysrv1;
There, mysrv1
is the alias defined for the path you have defined; most commonly those are defined in tsnames.ora
. See this Oracle documentation for the relevant information as to how to define those.
You can also explicitly provide the information like so:
libname x oracle user=myusr1 pw=mypwd1
path="(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = pinkfloyd) (PORT = 1521))
)
(CONNECT_DATA =
(SID = alien )
)
)"
;
However, if you already use SQLDeveloper, you may already have a tsnames.ora
file and are best off using that, as if you have to update things from that file you will want to do it only once, not in both your SQLDeveloper and your SAS code.
Since you say you already have the service name, this is the name that would go in path
by itself.