Hello, I'm unable to create a LIBNAME statement equivalent to a PROC SQL "CONNECT TO" statement that works perfectly. (I need a LIBNAME in order to use PROC APPEND.) Both statements use the same OLE DB driver, database and user. We are still at SAS version 9.4 M6, if that makes a difference. Here's my PROC SQL "CONNECT TO" statement: CONNECT TO oledb (init_string="Provider=MSOLEDBSQL19; Server=MyServer; Database=MyDatabase; UID=MyUsername; PWD=MyPassword; Use Encryption for Data=Optional; Trust Server Certificate=True;"); Here's my best guess at the equivalent LIBNAME statement: LIBNAME MyLibrary OLEDB PROMPT=NO DATASOURCE=MyServer PROVIDER=MSOLEDBSQL19 SCHEMA=dbo USER=MyUsername PASSWORD=MyPassword PROPERTIES=('Use Encryption for Data'=Optional 'Trust Server Certificate'=True); Unfortunately, it results in an "Invalid option name 'Use Encryption for Data'" error. NO MATTER WHAT I TRY, I SIMPLY CANNOT GET IT TO RECOGNIZE THE "Use Encryption for Data" and "Trust Server Certificate" OLE DB OPTIONS. But if I don't specify those options, I get the following error due to a lack of a certificate: Error trying to establish connection: Unable to Initialize: Client unable to establish connection. For solutions related to encryption errors, see https://go.microsoft.com/fwlink/?linkid=2227882.: SSL Provider: The certificate chain was issued by an authority that is not trusted. Prior to the upgrade of our database from SQL Server 2016 to SQL Server 2022 (and the upgrade from OLE DB driver SQLNCLI11 to MSOLEDBSQL19), the following LIBNAME statement worked: LIBNAME MyLibrary OLEDB PROMPT=NO DATASOURCE=MyServer PROVIDER=SQLNCLI11 SCHEMA=dbo USER=MyUsername PASSWORD=MyPassword; Any suggestions? Thanks!
... View more