1
votes

In the example, how does SAS connect to oracle without an oracle hostname and port?

libname mydblib oracle user=testuser password=testpass path=hrdept_002;

http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a003113591.htm

I have experience with SAS connecting to other databases and I always needed to supply a host and port

1
Oracle is an odd duck, to say the least. Any computer connecting to an oracle database has to have a file called tunsname.ora that has all of this information in it. So you specify "hrdept_002" and the Oracle ODBC driver goes to it's tnsnames.ora file and finds the relevant information in it. I'm certain there is some other voodoo involved too as I usually break down crying at least once trying to do an Oracle ODBC connection for the first time. Sometimes my tears are enough to make the connection happen. Oracle thrives on other's pain.JNevill
And I should have said tnsnames.ora. I swear it looks like tunsname.ora through tears though.JNevill
Thanks. If the DBA gives me the tnsnames.ora, I need to register it with my windows odbc driver and then I am good to go?Victor

1 Answers

0
votes

The documentation states

PATH= specifies an alias for the database specification, which SQL*Net requires

The alias is set up in your SAS hosting environment prior to running SAS. Typically the set up occurs in a tnsnames.ora configuration file. Which config file to select may also be controlled by other environment variables.