We tried to connect to sql server throught ODB connection, test was completed successfully. so connection is working OK:
But when we tried to connect to this database in SAS EG we got this error:
LIBNAME IDB ODBC DATAsrc=IDB SCHEMA=dbo USER=danasova PASSWORD="xxx";
What we did incorrect?
To be sure, is EG connecting to a local or a remote SAS session?
And is your ODBC Manager test done on the host where SAS executes (and using the same user/pw)?
IT is local session. 2nd question - dont think so, when i tried to log through odbc driver 17 for sql server - it worked in odbc and sas, but when we use sql server odbc connection - it doesnt.
This is working:
LIBNAME mylib ODBC dsn='NMI' schema=dbo;
Because it is windows auth, but when we tried it through username and password - and odbc connection sql server, it doesnt work. And we dont know why
Try this (with your changes):
libname SQLREF ODBC NOPROMPT="server=SVDSQLDCP01;driver=ODBC Driver 13 for SQL Server;trusted_connection=yes;database=DEVAPP10_Shredding" STRINGDATES=NO IGNORE_READ_ONLY_COLUMNS=YES SCHEMA=DBO;
The SQL Server ODBC driver is really old and may not work with more recent versions of SQL Server. Try creating an IDB connection with the Version 17 driver.
Hello @Pato485
I see this in your post
"This is working:
LIBNAME mylib ODBC dsn='NMI' schema=dbo;
Because it is windows auth, but when we tried it through username and password - and odbc connection sql server, it doesnt work. And we dont know why"
Please check authentication mechanism defined in SQL server.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.