BookmarkSubscribeRSS Feed
saspert
Pyrite | Level 9

Hi,

 

The original libname as I see in SAS MC is below -

 

LIBNAME WWTest ODBC NOPROMPT="server=CLNTDWPRD03;driver=sql server;Trusted Connection=yes;Database=clientdb;" SCHEMA=dbo USER=myid PASSWORD="{sas002}alphanumeric combination" ;

 

I usually take out the user and password strings and use the rest of the libname in the stp code -

LIBNAME WWTest ODBC NOPROMPT="server=CLNTDWPRD03;driver=sql server;Trusted Connection=yes;Database=clientdb;" SCHEMA=dbo; 

 

when I run the stored process in SAS EG, then I am not getting any error-

 

21 LIBNAME WWTest ODBC NOPROMPT=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX SCHEMA=dbo ;
NOTE: Libref WWTEST was successfully assigned as follows:
Engine: ODBC
Physical Name:
22 PROC SQL;
23 CREATE TABLE WORK.QUERY_FOR_VW_DASH_DISPLAY AS

 

 

Stored Process Error in SAS VA 7.1

21         LIBNAME WWTest ODBC  NOPROMPT=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  SCHEMA=dbo  ;
ERROR: CLI error trying to establish connection: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'HMI-INC\svc_sassrv'. : [Microsoft][ODBC SQL Server Driver]Invalid 
       connection string attribute
ERROR: Error in the LIBNAME statement
2 REPLIES 2
SASKiwi
PROC Star

Your EG SQL Server database connection is using your own userid to login. As this is successful you must be set up as a user in the database.

 

The SAS VA Stored Process, runs under a SAS service account: svc_sassrv. This is the userid being used to connect to SQL Server via Trusted Connection=yes and it is most likely not set up as a user in SQL Server. Confirm this with your DBA. What happens if you don't use Trusted Connection=yes  and substitute your own userid and password instead:

 

LIBNAME WWTest ODBC NOPROMPT="server=CLNTDWPRD03;driver=sql server;Database=clientdb;" SCHEMA=dbo USER=myid PASSWORD="{sas002}alphanumeric combination" ;

saspert
Pyrite | Level 9

this is when i remove the trusted connection = yes phrase and just use my userid and encrypted password.

 

SAS VA session -

21 LIBNAME WWTest ODBC NOPROMPT=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX SCHEMA=dbo USER=myuserid PASSWORD=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ;
ERROR: CLI error trying to establish connection: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'HMI-INC\svc_sassrv'.
ERROR: Error in the LIBNAME statement.

 

SAS EG sesion-

21 LIBNAME WWTest ODBC NOPROMPT=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX SCHEMA=dbo USER=myuserid PASSWORD=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ;
NOTE: Libref WWTEST was successfully assigned as follows:
Engine: ODBC
Physical Name:
22 PROC SQL;

23 CREATE TABLE WORK.QUERY_FOR_VW_DASH_DISPLAY AS

....

 

update 20150710 : my db admin sent me a note saying that svc_sassrv is added to a db user group that has access to ms sql server db. But I still see the same error in SAS VA 7.1. 

 

Thanks,

saspert

SAS Innovate 2025: Call for Content

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!

Submit your idea!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1979 views
  • 0 likes
  • 2 in conversation