Adding Domain Enabled ODBC Connections
- Overview
- Prerequisites
- Add a Domain-Enabled ODBC Connection
- Using a Domain-Enabled Connection in a Batch Job
Overview
A standard ODBC connection has some disadvantages. For example, you can use a standard ODBC connection in a job, which will require you to save user credentials in order to execute the job. Alternatively, you could create a domain-enabled ODBC connection that references the ODBC connection and an appropriate authentication server domain, as shown in the next figure.
In the previous figure, HR ODBC is a standard ODBC connection. ORACLE is an authentication domain for the same resource that is specified in the ODBC connection. The credentials that are required to use the ODBC connection are accessible from the domain on the authentication server. In many cases, this approach is better than forcing users to authenticate every time they use the connection in a profile, for example, or to save user credentials with a connection that is used in a job.
When a user who is a member of the specified domain uses the domain-enabled connection, he or she is authenticated by the SAS Metadata Server and is permitted to access the data that is specified in the ODBC connection. The authentication domain is defined in SAS Metadata Server. The credentials associated with the authentication domain can be defined in a user properties or group properties.
Prerequisites
It is assumed that following resources are available in your SAS Data Management Studio session.
- A standard ODBC DSN for the data source that you want to access. For information about adding such a connection, see Adding ODBC Connections.
- An authentication domain for the ODBC DSN above. You might simply be told which domain to use by an administrator. These domains are defined in SAS Management Console.
Add a Domain-Enabled ODBC Connection
If the prerequisites have been met, perform the following steps to add a domain-enabled connection.
- Click the Data riser on the SAS Data Management Studio desktop.
- Select the New Data Connection menu in the Data Connections pane on the right. Then select Domain Enabled ODBC Connection to display the connection dialog that is shown in the previous Overview section.
- Enter a Name and Description for the domain-enabled connection.
- In the ODBC DSN field, select a standard ODBC connection to a resource that you want to access.
- In the Domain name field, enter the name of the authentication domain for the same resource that is specified in the ODBC connection.
- Test the connection by clicking Test Connection.
- Click OK to save the new connection and return to the Data riser.
- Refresh the Data riser in order to see the new connection in the Data Connections folder in the left pane. Select View, and then select Refresh from the main menu. The new connection should appear in the Data Connections folder.
Using a Domain-Enabled ODBC Connection in a Batch Job
When a job is executed in batch mode, any user credentials that are required by data connections in the job must be retrieved at run-time. One way to do this is to combine the following features:
- An authentication domain from the authentication server that is specified for the SAS Data Management Server that executes the job. The authentication server is a SAS Metadata Server.
- A domain-enabled ODBC connection, as described above.
- A method for programmatically logging in to the authentication server in order to access DBMS logins. For an example, see Run a Job with a DSN That Specifies an Authentication Server Domain.