failure connecting to an oracle database from sas

Reply
Occasional Contributor
Posts: 16

failure connecting to an oracle database from sas

I am sorry but a after several attempts i have failed to connect to an oracle database from SAS,

The code i use to try connecting is below:

                  

libname  mydblib odbc user=matovua password=password datasrc=dm2;

dm2 is a system DNS for microsoft ODBC for oracle,

i get the error below

CLI error trying to establish connection: [Microsoft][ODBC Driver Manager] The specified

       DSN contains an architecture mismatch between the Driver and Application

Thank you

Anthony

Contributor
Posts: 39

Re: failure connecting to an oracle database from sas

1.why are you not using SAS/Interface Access to Oracle?

2. Can you connect to the database with Toad or any other tool that using the "dm2" configuration? For the odbc connection to work from SAS, first make sure that you could connect to the database using TOAD.

I also think that dm2 should be in quote. but not sure??

Super User
Posts: 17,750

Re: failure connecting to an oracle database from sas

I thought the syntax was:

libname  mydblib oracle user=matovua password=password path=db2 schema=schema;

Super Contributor
Posts: 1,636

Re: failure connecting to an oracle database from sas

syntax I use:

libname x odbc dsn=**** uid=*** password=*** schema=***;

Super Contributor
Posts: 333

Re: failure connecting to an oracle database from sas

Test the connection in the windows ODBC interface where the ODBC was created. That will verify that the connection works. I believe SAS just using the ODBC call as setup in windows.

Also check what MS says about the error:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms712362(v=vs.85).aspx

Hope this is helpful!

EJ

Occasional Contributor
Posts: 16

Re: failure connecting to an oracle database from sas

Thank you very much all for your help,

It fnally worked,

I was using a driver for OS 32 bit instead of 64

Thank you

N/A
Posts: 1

Re: failure connecting to an oracle database from sas

I have the same problem. How did you specify to use 64 instead of 32 bit. My system was upgraded from XP to Windows 7, I might have some 32 ODBC files remined in the system, but I reinstalled the drivers and reconfiged the ODBC to only have 64 bit data sources. However I am still getting this error when trying to connecting to SQL server database. I think your solution would work for me too. Thanks in advance for sharing and help!!

Ask a Question
Discussion stats
  • 6 replies
  • 2162 views
  • 0 likes
  • 6 in conversation