BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
turcay
Lapis Lazuli | Level 10

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 ?

1 ACCEPTED SOLUTION

Accepted Solutions
turcay
Lapis Lazuli | Level 10

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.

View solution in original post

2 REPLIES 2
CaseySmith
SAS Employee

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

turcay
Lapis Lazuli | Level 10

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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 3975 views
  • 3 likes
  • 2 in conversation