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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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