BookmarkSubscribeRSS Feed
MattJans
Obsidian | Level 7

Hi there! I googled and checked the SAS Communities but didn't see any help on this. The code below works fine on SAS 9.4, but doesn't work, and gives an error (see below). In case it's not obvious, the XXX and YYY are real names in my working code. Just didn't want to post those here. I also tried (in EG) changing single quotes to double, and putting the code all on one line. Still gives the same errors. I think it's the first error that's most relevant. On 9.4 this opens a dialogue box where I enter my UN and PW for this server.  

 

libname XXX oledb provider=sqloledb prompt=YES

        dataSource='YYY' properties=('Initial Catalog'=XXX_db)

        schema=dbo access=readonly;

 

ERROR: Error trying to establish connection: Unable to prompt for connection information.
ERROR: Error in the LIBNAME statement.

 

Any help would be great. Thanks! 

2 REPLIES 2
Tom
Super User Tom
Super User

PROMPT means that it wants to open a window on the CONSOLE to ASK YOU to complete the signon details, like password, etc.

 

But if you are using Enterprise Guide to submit the SAS code then there is no way for SAS itself to interact with you.  All your interactions are with Enterprise Guide instead.

 

Get it to work without the PROMPT in Display Manager and then the same code should work when submitted in the background via Enterprise Guide.

ChrisHemedinger
Community Manager

Tom is correct --  you will need to provide the credentials for the OLEDB connection. Your options are:

- user/password (you can use PWENCODE to obscure a clear-text password)

- set an AUTHDOMAIN in an administered environment with the credentials you need, and reference that in your code.

- use single-signon/Integrated Windows Authentication -- requires that the same identity using EG is connecting to SAS which is then connecting to the OLEDB source, and all steps are set for Trusted for Delegation

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

Register Now

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
  • 875 views
  • 2 likes
  • 3 in conversation