Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Failure to establish ODBC connection between SAS and SQL Server

Status
Not open for further replies.

katrina11

Technical User
Apr 30, 2011
108
Hi experts!
I am trying to establish ODBC connection between SAS 9.2 and SQL Server 2005 through Control Panel->Administration Tools->Data Sources (ODBC).
I was able to do it once in the past and it worked!!!!
30 libname mylibref ODBC
31 NOPROMPT=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
NOTE: Libref MYLIBREF was successfully assigned as follows:
Engine: ODBC
Physical Name: IR_SAS

******************************************************************Since that time I had lost my ODBC connection and assumed (although was not absolutely sure)that it happened after my PC had been replaced; Anyway I started the process over to re-establish it. However, tried as I might, it did not work anymore. I cannot find what is my mistake as system message in the process of re-establishing looked all right:

“Microsoft SQL Native Client Version 09.00.5000

Data Source Name: IR_SAS.dsn
Data Source Description: IR_SAS_SQL_SERVER
Server: REPORTP01
Use Integrated Security: Yes
Database: DW
Language: (Default)
Data Encryption: No
Trust Server Certificate: No
Multiple Active Result Sets(MARS): No
Mirror Server:
Translate Character Data: Yes
Log Long Running Queries: No
Log Driver Statistics: No
Use Regional Settings: No
Use ANSI Quoted Identifiers: Yes
Use ANSI Null, Paddings and Warnings: Yes”


Besides, I submitted an offered system test in a process of establishing and it looked successfully:

"Microsoft SQL Native Client Version 09.00.5000
Running connectivity tests...

Attempting connection
Connection established
Verifying option settings
Disconnecting from server

TESTS COMPLETED SUCCESSFULLY!"
******************************************************************
However, after I had ran my newly established ODBC connection through SAS, log complained for the error:

libname mylibref ODBC
NOPROMPT="UID=;PSW=;DSN=IR_SAS;SERVER=REPORTP01;DATABASE=DW;";

22 libname mylibref ODBC
23 NOPROMPT=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
ERROR: CLI error trying to establish connection: [Microsoft][ODBC Driver Manager] Data source
name not found and no default driver specified
ERROR: Error in the LIBNAME statement.

So far:
-I wonder where my mistake is: is it in the process of establishing connection (while the submitted test show Data source name and driver were set properly)?
-Or it is about libname statement?
-Or probably it is somewhat related to the SAS update to the license renewal process after I had establish my ODBC Connection? (I found the following statements in the SAS revision / renewal script just in case)
*PRODNUM209 = ODBC SAS/ACCESS ODBC;
..
Comp16=odbc
..
SAS/ACCESS Interface to ODBC 01FEB2011
Or both?
What is wrong and how to resolve it? I am totally lost..

Thank you in advance!

Katrin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top