BookmarkSubscribeRSS Feed
Ratanroy1
Calcite | Level 5

Hi All,

I am getting the below error while connecting sas with sql server through ODBC.

1. LIBNAME SQL ODBC DSN=’sqlsrv;

ODBC1.JPG

2.

proc sql;

connect to odbc (dsn=’sqlsrv’);

quit ;

ODBC.JPG

Kindly help me on this to correct it. Do i need to install ODBC driver in my system or there is some other problem...........?

Regards,

Ratan

13 REPLIES 13
Kurt_Bremser
Super User

You most probably have not installed/licensed SAS/ACCESS to ODBC, or the installation has failed. If you enter "The ODBC engine cannot be found" in google, you will find several threads dealing with the same error condition, maybe one of those is helpful for you.

The ODBC driver for SAS is a freely installable Windows driver that allows other SW (Office etc) access to any SAS data source (workspace server, SAS/SHARE, ..) via ODBC, so that is not a solution to your problem.

Ratanroy1
Calcite | Level 5

Hi Kurt,

Please find below products linstalled in my system. I am not able to see SAS/ACCESS to ODBC here.but SAS/ACCESS Interface to PC files is available. Please let me know if mi need to reinstall it.

Capture.JPG

Regards,

Ratan

Kurt_Bremser
Super User

ACCESS to PC files is support for certain file formats typical on PCs, like dBase, MS Office and so on.

If you want to connect (from SAS) to a data source using ODBC, you need ACCESS to ODBC.

What is it that you want to connect to, anyway?

Ratanroy1
Calcite | Level 5

Hi Kurt,

I have data in sql Server database and i want to fetch that data by using SAS for some analysis. So when i am connecting through ODBC, i am not able to do this.

I have first created an ODBC connection with Sql server suppose SE1 and i am using this SE1 in my SAS code. but its not working.

Could you please provide ne some other alternatives to do it. Could you please provide me the code OLEDB so that i can try with that code also.

Regards,

Ratan

Kurt_Bremser
Super User

You either connect to the sql database directly (using the appropriate ACCESS to ... module) or via ODBC, which requires ACCESS to ODBC. Either way, you need to install and license the respective ACCESS module.

If you want to avoid this, you best set up an export procedure in the database and import the resulting file into SAS (once you have a valid structure, almost anything is possible in a data step).

Ratanroy1
Calcite | Level 5

Hi Kurt,

Please let me help in understanding what is difference between SAS/ACCESS Interface to ODBC and SAS/ACCESS Interface to PC Files

Regards,

Ratan

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, I can barely read those screenshots, but it is telling you that you lack the required driver.  A brief search on Google highlighted several articles on this topic for example: http://support.sas.com/techsup/technote/ts765.pdf

I would check with your database team on exactly what needs to be setup where, what your username/password would be etc.  You would also need SAS/Access I believe.

Ratanroy1
Calcite | Level 5

Hi RW,

I am not able to find the path mentioned in the pdf

!SASROOT\Access\Sasexe

Could you please help me on this.

Regards,

Ratan

RW9
Diamond | Level 26 RW9
Diamond | Level 26

!SASROOT references where SAS is installed on your machine/server etc.  For example a local install might be in:

c:\sas institute\sas\9.3...

kirankherji
Calcite | Level 5

I have share some suggestion about solution of your problem, try any third party SQL recovery tool to repair and recover all over SQL database with all over attributes. Visit here of this tool: http://www.sqlrepair.org

petemartinezs
Calcite | Level 5

You can run the DBCC CHECKDB utility to repair the damaged and corrupt SQL database files. However, the DBCC CHECKDB is not always able to repair the damaged and corrupt SQL database files.

In case you are not able to repair the damaged and corrupt SQL database files using any of the above mentioned methods, then you can use a professional and proficient third party Sql database repair software

To know more about this tool and to download its free  trail demo version, visit: http://www.filesrecoverytool.com/sql-database-repair.html

expreess1
Calcite | Level 5

Try more reliable and advance SQL Database Recovery software. This software easy to recover all SQL data including tables, stored procedure, functions, views, rules, triggers and associated Primary Key, Unique keys, etc. Read more information and free download click here http://utilitysoftwarereview.com/sqldatabaserepair.html

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 13 replies
  • 7867 views
  • 6 likes
  • 6 in conversation