I'm using a VB script to run a series of SAS syntax files sequentally in batch mode, based on the script posted by Chris Hemedinger on his blog (
Using SAS Enterprise Guide to run programs in batch - The SAS Dummy), This basically works except that EG randomly asks for credentials (around 5% of the syntax files run). You have to enter your user name and password, then the script continues. Can anyone shed any light on why this happens and how to prevent it?
I'm using EG 4.3 with SAS 9.2 on a remote server. The options are set for credentials to persist for user. When using EG interactively, I'm never asked for credentials (unless I've changed my password). On rare occasions, I get a message "unable to connect" but the syntax runs normally if I press F8 a second time.I've never been asked for credentials when running a single file in batch.
Are you on Win7?
No, I'm currently running WinXP. The script does work under Win7 though.
When I mention Win7, I was thinking about somehow by default win7 local security setting "not allow user to save credentials", that was not the case. When you look at the facts: 1. no problem if you run interactively, meaning no problem when you are LOG ON. 2. Sporadic prompt for credentials when running batch. That makes one think that somehow your credentials can't be retrieved reliably when needed. I would file a ticket with SAS and talk to my Windows team at the same time.
Haikuo
The thing is, the script works as intended about 95% of the time. That would indicate it's not a matter of retaining credentials. It might be related to a configuration setting on the server side, to prompt for credentials if sessions start too frequently.
If a connection attempt is made but fails for any reason (network issue, wrong password, server problem), EG will "forget" the credentials it might have cached locally and prompt you on the next connection attempt.
It's possible that during your process, such a connection fails for some reason, and then EG decides it needs to prompt.
You can configure a "credentials.xml" file that might help. This provides EG with a "go-to" location for where to find reliable credentials during automation.
See this SAS Note:
30917 - Scheduling projects in SAS® Enterprise Guide®
Chris
Chris,
On Win7 if local security policy setting do NOT allow user to save credentials, will "credentials.xml" help to by-pass this security policy? I have tried by following your blog, but failed. just want to confirm with you.
Sorry, ckx, for borrowing your platform.
Thanks,
Haikuo
Haikuo,
Yes, if you record your credentials in a local file, you might inadvertently defeat any policy against caching credentials. The credentials.xml mechanism was designed for when there is no logged-in user and the automation process needs to run.
SAS Admins can control some of this by setting the SASSEC_LOCAL_PW_SAVE option in the omaconfig.xml file.
Thanks a lot!
Haikuo
Thanks Chris, this sounds good. No problems so far but maybe it's too quick to tell. I'll report back to this forum if the problem does come back.
I get the impression that a credentials.xml file helps but in any case not for 100%. EG prompted me for my credentials again today, for the third of 24 files. This could be related to the fact that EG was open at the time (I wasn't doing anything in it at the time).
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.