Configuring Connections in SAS Enterprise Guide

SAS connections can be configured either through a built-in wizard or using a code-based configuration file. This document details how to configure connections to common databases in SAS Enterprise Guide.

Note about Badger Analytics Connections

Connections to Badger Analytics can only be created using a code-based connection and you must install the Snowflake ODBC Driver prior to connecting. Follow the instructions located here:

Wizard-Based Setup

  1. Click the Servers connections-1 module in the left pane and expand the Local server.

  2. Right-click Libraries and click New library.

  3. If you are not in a project, click Create Project.

  4. Enter an 8-character or shorter name for the data source and click Next.

  5. Under Engine type, select Database System.

  6. Under Engine, select the appropriate database type connection and enter the specific details about that database. Click Next.

    1. For Oracle connections using TNS, the database server is the TNS name of the database (e.g. DWHP, SFMRT, EPM).

    2. For connections using the Windows ODBC Data Sources, leave Database Server blank.

  7. Enter any additional configuration for the database connection (advanced, refer to SAS documentation). Click Next.

    • For connections using Windows ODBC Data Sources, set the following values:

      • Name: Data Source Name, Value: The data source name as it is listed in ODBC Data Sources

    • For connections using Snowflake / Badger Analytics, set the following values:

      • Additional Options: authenticator=externalbrowser

  8. Review the details and click Test Library to test connecting to the database. If you see OK, click Finish. If not, click Show Log for error code details.


Code-based Configuration

A default SAS connections template with connections to EPM, InfoAccess, and Badger Analytics has been put together; you will need to provide your own credentials. Keep this file in an easy to access place (e.g., Documents folder, Box folder, etc.), as you will need to use it every time you run SAS Enterprise Guide. When you need to use the file, you can drag it into the process flow and SAS Enterprise Guide will automatically create a shortcut to the file.

While it is technically possible to enter passwords in plain text, do not enter passwords in plain text in the connection file. This is a very, very bad idea.

SAS provides a password encoding feature so you can enter an encoded password into the password field, so your credentials aren’t compromised if someone gets your connections file.

Encoding a Password

  1. While in a process flow, right click in the work area and click Add new > Program.

  2. Double click the new icon in the work area.

  3. In the code pane, enter the following command, replacing "<your password>" with your database password between the quotes and click Run.

    proc pwencode in='<your password>'; run;

  4. In the log pane, you should find a line starting with {SAS002}. The entire line is the encoded password. Copy and paste this line to your connections file.


  5. You can now delete the Program file by right clicking it in the work area and clicking Delete.


Loading a Code-based Connection Configuration File

You will need to include and run the connections file every time you open SAS Enterprise Guide and anytime you make changes to the connections file. While SAS Enterprise Guide is open, your connections should remain active until you close the program or the database times out the connection.

  1. While in a process flow, you can either drag and drop the connections file into the work area or right click in the work area and click Add existing items.

  2. You should see the connections file within the work area. Double click the file and click Run.


Keywordsconfiguration sas enterprise guide connections   Doc ID114989
OwnerMehrnaz A.GroupData KB
Created2021-11-24 16:48:18Updated2023-11-14 09:21:58
SitesData, Academic Planning & Institutional Research
Feedback  1   0