Dear all ,
I want to connect to a sql server db ( on another server ). I'm not using DSN names , the sql server db uses windows authentification.
Statement :
libname sdmlib SQLSVR 'Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=abcde;Data Source=datasourcenameab;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=wsid;Use Encryption for Data=False;Tag with column collation when possible=False';
( data source name , workstation id and catalog are example values )
Error :
ERROR: Incorrect syntax for this LIBNAME statement. This engine does not accept a physical name.
ERROR: Error in the LIBNAME statement.
When you submit a statement like
libname <name> <engine> <quoted string>;
SAS expects the quoted string to be a physical file name. What you want to do is probably something like
libname <name> <engine> <engine-option>=<quoted string>;
in your actual case something like
libname sdmlib SQLSVR complete='Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=abcde;Data Source=datasourcenameab;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=wsid;Use Encryption for Data=False;Tag with column collation when possible=False';
or possibly, use the PROMPT= or NOPROMPT=. The COMPLETE option display a dialog box if some options are missing; the PROMPT options always displays options in a dialog box, the NOPROMPT never displays a dialog box (but just fails if the options are not complete).
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.