When i submited the "libname test oledb;" command on SAS BASE editor i did not get any error. But when i tried on EG i got error which is "Error trying to establish connection: Unable to prompt for connection information". Do you know anything about this subject ?
I solved the issue just by adding schema=dbo;
And then i could see the all tables in the SQL Database
This is the full libname:
libname test oledb provider=sqloledb user=xxx password=xxxx datasource=IP properties=("initial catalog"=xxxx) schema=dbo;
Thank you for your help.
When you submit "libname test oledb;" in SAS BASE editor (an interactive SAS session), it will prompt you for the missing connection information (by displaying the Data Link Properties dialog, where you must specify the OLEDB provider and connection settings). EG submits code to a non-interactive SAS workspace session, very similar to batch execution, thus interactive features of the server (such as this and other prompts) are not available in EG. Therefore, you need to provide the full connection information in the libname statement when submitting from EG. Here is an example using the Microsoft OLE DB Provider for SQL Server (sqloledb) to connect to a SQL server database:
libname test oledb provider=sqloledb properties=("user id"=cassmi password=pw "data source"='striper' "initial catalog"=egtest);
Casey
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
I solved the issue just by adding schema=dbo;
And then i could see the all tables in the SQL Database
This is the full libname:
libname test oledb provider=sqloledb user=xxx password=xxxx datasource=IP properties=("initial catalog"=xxxx) schema=dbo;
Thank you for your help.
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 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.