ODBC connection to Oracle

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ODBC connection to Oracle

Eric Skuja
Hi everyone, need your advice.

I routinely extract about 40 tables from an Oracle database into SPSS.
The syntax comes straight from the Database Wizard and they all look
like this example:

GET DATA /TYPE=ODBC /CONNECT=
'DSN=CPRD;UID=eskuja;PWD=encrypted;DBQ=CPRD;DBA=R;APA=T;EXC=F;FEN=T;QTO=F;FRC=10;FDL=10;LOB=T;RST=T;BTD=F;'
'BAM=IfAllSuccessful;NUM=NLS;DPM=F;MTS=T;MDI=F;CSR=F;FWC=F;FBS=64000;TLO=O;'
/SQL = 'SELECT V01, V02, V03, V04, V05, V06, '
'V07, V08, V09, V10, V11, V12, 'V13, V14, V15, V16, V17, V18, '
'V19, V20, V21, V22, V23, V24, 'V25, V26, V27, V28, V29, V30, '
'V31, V32, V33, V34 FROM CUSTOM.TABLE1'
/ASSUMEDSTRWIDTH=255.
CACHE.
SAVE OUTFILE=!Path1+'TABLE1.sav'.

My problem is that for 3 of the 40 extracts the syntax now produces
blank files. There are no error messages. The routines create viable
SPSS files with variable names. There is just no data in the files -
none at all. The other 37 extracts are fine.

The problem appears to memory-related, but I’m not sure. There are about
350,000 records in the example above which normally creates a 135MB .sav
file. The problem can be solved by running the routine twice - one for
V01-V17, another for V18-V34 and then joining the two files. But this is
not an acceptable solution.

The problem emerged when I got a new PC and both the version of Oracle
(V7 to V9) and the Oracle ODBC driver changed. The driver details follow:
Old PC = SQORA32.DLL; V8.00.66.00; Date stamp = 6 Nov 2001; Name =
Oracle in DEFAULT_HOME
New PC = SQORA32.DLL; V10.01.00.40; Date stamp = 16 June 2005; Name =
Oracle Instant Client

Can anyone shed any light on this problem? It’s driving me nuts. Gratefully

Eric