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 Servers and SAS OLAP Servers, respectively. You must be running SAS 9.2 or newer.
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; _
                        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, 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"1
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

Internet Protocol Version 4 and Version 6 Addresses

The previous section describes using host names in the dataSourceString value. It is possible to use both internet protocol version 4 addresses (IPv4) and internet protocol version 6 addresses (IPv6) in place of the host name.
For IPv4 addresses, replace the host name with the address in dot-decimal notation, as in the following iom-bridge example:
dataSourceString = "iom-bridge://10.0.0.15:8561;"
For IPv6 addresses, enclose the colon-delimited hexadecimal address in brackets, as in the following iom-bridge example:
dataSourceString = iom-bridge://[fd07:af30:a3fc:a29:20d:60ff:fe4d:2eea]:8561