Using the Data Source Property to Specify All Connection-Related Properties

What Is the Data Source URI Format?

The Data Source URI format enables you to use the "Data Source" property to specify all connection-related properties. You can use this format with the IOM and OLAP providers in order to access SAS Workspace and OLAP servers, respectively. You must be running SAS 9.2.
You can use this format in two ways:
  • You can assign the connection information directly to the "Data Source" property as shown in this sample connection string.
    Dim obConnection As New ADODB.Connection
    connectionString = "Provider=sas.OLAPProvider.9.2; _
                        Data Source=iom-com://olap.example.com; _
                        User ID=myuserid; _
                        Password=mypassword"
    Note: For more examples, see Basic Connection Recipes.
  • You can define a dataSourceString to hold the connection information. You then specify the dataSourceString as the value of the "Data Source" property as shown in this sample code:
    Dim obConnection As New ADODB.Connection
    connection.Properties("Data Source") = dataSourceString
    
Note: If you need to use the characters % or =, you must replace them with their URL-encoded values. The value for % is %25. The value for = is %3D. There are no other URL requirements.

Data Source URI Protocols

The Data Source URI format supports the following protocols, which you specify in your code.
Data Source URI Protocols
URI Scheme
Protocol
iom-bridge
Bridge
iom-com
COM
iom-name
Not specified. The name is extracted from the metadata server.
iom-id
Not specified. An existing connection is used.
iom
Bridge or COM. This scheme is the only way to use Integrated Windows Authentication (IWA)1. However, you are not required to use IWA.
1For information about how IWA is used in SAS 9.2, see "Integrated Windows Authentication" in the SAS Intelligence Platform: Security Administration Guide.

Using a dataSourceString to Hold Connection Information

You construct the dataSourceString value based on the server information (for example, port, host name, and logical name) and the protocol that you want to use. This table contains examples.
Sample dataSourceString Values
URI Scheme
Protocol, Authentication
Server Port
Host/Logical Name
Sample dataSource String Value
iom-bridge
Bridge, Host
1234
example.com
dataSourceString = _
    "iom-bridge://example.com:1234"
iom-com
COM, Host
COM does not have a port that is exposed to the user.
example.com
dataSourceString = "iom-com://example.com"
iom-name
Not specified. The name is extracted from the metadata server.
"My Logical Name"
dataSourceString = "iom-name://My Logical Name"
iom-id
Not specified. An existing connection is reused.
dataSourceString =
    "iom-id://ws.UniqueIdentifier
iom
Bridge, IWA
1234
example.com
dataSourceString =
    "iom://example.com:1234;" & _
    "Bridge;SECURITYPACKAGE=Negotiate"
iom
COM, IWA
COM does not have a port that is exposed to the user.
example.com
dataSourceString = "iom://example.com;" & _
     "COM;SECURITYPACKAGE=Negotiate"
1This logical name has been defined in a SAS Metadata Server. This sample also assumes that the SAS Metadata Server has been identified for the provider. For example, this code might be used to identify a SAS Metadata Server: iom-bridge://metadata.example.com:8561