12-19-2012 04:04 AM
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.
12-19-2012 09:50 AM
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.
12-19-2012 10:21 AM
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.
12-19-2012 10:30 AM
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:
12-19-2012 10:54 AM
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.
12-19-2012 01:13 PM
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.
01-10-2013 08:37 AM
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).