Hi,
I have SAS 9.4 and SQL(2008) application in my PC.My entire database are in SQL application.
I want to use SQL database in SAS. There i found some code for connectivity in internet but those are not effective.
Can any one please suggest the perfect code with an example for me to proceed further.
Libname New_lib ODBC NoPrompt="Driver=C:; Server=192.168.1.14; Database=Mvdsc1302; Uid=IT; pwd=***";
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.
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.
How/what should i insert in Driver filed, Please help me with correct format.
Open the Windows ODBC Administrator tool and select the Drivers tab to find out the names of the ODBC drivers you have installed. As I suspect you are using SQL Server the likely driver name is SQL Server.
Libname New_lib ODBC NoPrompt="Driver=SQL Server;Server=192.168.1.14;Database=Mvdsc1302;Uid=IT;pwd=***";
Forgetting SAS as the client application for the time being, let's first ensure the underlying SQL database client can connect to the SQL database server - because without that, any client applications will fail to connect.
So:
Good luck!
Thanks for your suggestion.
You guys are really awesome!. @AndrewHowell @SASKiwi
& The code works GREAT!...
Got all the tables from SQL.
Open the Windows ODBC Administrator tool and select the Drivers tab to find out the names of the ODBC drivers you have installed. As I suspect you are using SQL Server the likely driver name is SQL Server.
Libname New_lib ODBC NoPrompt="Driver=SQL Server;Server=192.168.1.14;Database=Mvdsc1302;Uid=IT;pwd=***";
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: