Please provide the SAS log from the program successfully connecting to Greenplum and also the SAS log from your unsuccessful attempt. Ensure you include both the source statements and any SAS notes and errors.
Just copy and paste from your EG SAS log for showing a successful SAS log.
To ensure you get the same data libraries defined in SAS batch jobs as you get in SAS EG sessions you just need to pre-assign the libraries. This is an advanced option you can set on the data library in SAS Management Console.
Hello @kimmygzc
From your posts what I understand is that you are having SAS installed on a remote servers and you are running the code in EG. You are able to to successfully connect to the greenplum database. However you are not able to connect in the batch mode.
Typically when database access is through the metadata server and the code is executed in batch mode one uses the authomain= option. ( Look here for the details. https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n0aiq25zc8u8u6n1i81my0a24sd3.htm.
There are more resource available on the google. )
Make sure that the batch code is executing on the compute server with database clients installed and configured. A goodplace in your case would be the compute server where you have executed your code through EG.
In organizations with good security practices the developers do not have access to database credentials. Authdomain approach is almost invariably used.
As a rule if one has to connect to remote databases (databases not installed on the same computer) then database clients/drivers need to be installed. (There are exceptions but in the SAS practice no).
The implementation of SAS and best practices differ from organization to organization. SAS Administrators/ Seniors in the organaztion are often very helpful and the first persons to seek help from.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.