LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 13 May 2005 05:02:32 -0700
Reply-To:   Ron Dewar <ron.dewar@CCNS.NSHEALTH.CA>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Ron Dewar <ron.dewar@CCNS.NSHEALTH.CA>
Organization:   http://groups.google.com
Subject:   Re: Oracle access in SAS V9.1
Comments:   To: sas-l@uga.edu
In-Reply-To:   <8628E880DA4ED61183E6000347779F9A0EEE1B12@vq07masg.scotland.gov.uk>
Content-Type:   text/plain; charset="iso-8859-1"

I will close the loop on this one, for the benefit of those as obtuse as I was when I first read the response to my original post, and for the archives. This is what I learned from some SUGI 30 articles about what you have to do:

In Windows (at least in 2000 and XP), a new ODBC resource (let's say we named it 'oracleDat') can be built using the 'ODBC Data Sources' applet found in 'Administrative Tools' in the control panel. A corresponding Unix facility exists for defining new ODBC data sources.

Then, in the SAS code, all references to Oracle are replaced by references to this ODBC data source. For example, instead of

libname oradata oracle user= <username> pw=<password> path=<tnsname>;

you need the following

libname oradata odbc user= <username> pw=<password> datasrc='oracleDat';

Same user name and password. All the handshaking is now handled by the ODBC drivers, and is not restricted to Oracle 8.1.7 or later, as is the case with the native Sas Access/Oracle driver.

In PROC SQL, instead of syntax like the following to do a pass-through SQL query

proc sql; connect to oracle (user= <username> pw=<password> path=<tnsname>); create table test as select * from connection to oracle (select ......

use instead

proc sql; connect to odbc (user= <username> pw=<password> datasrc='oracleDat'); create table test as select * from connection to odbc (select ...

And everything proceeds as before.

Hope this helps. I know it has made my life easier, as changing Oracle versions was not a possibility for me

Ron Dewar Surveillance and Epidemiology Unit Cancer Care Nova Scotia Halifax, NS Canada


Back to: Top of message | Previous page | Main SAS-L page