Establishing a Connection
Creating a JDBC Data Source
You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for Microsoft SQL Server Analysis Services consists of three basic steps:
- Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
- Provide the driver class. For example:
cdata.jdbc.ssas.SSASDriver
- Provide the JDBC URL. For example:
jdbc:ssas:User=myuseraccount;Password=mypassword;URL=http://localhost/OLAP/msmdpump.dll; or jdbc:cdata:ssas:User=myuseraccount;Password=mypassword;URL=http://localhost/OLAP/msmdpump.dll;
The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:ssas:" or "jdbc:cdata:ssas:" and can include any of the connection properties in name-value pairs separated with semicolons.
Connecting to Microsoft SQL Server Analysis Services
To connect, set the Url property to a valid Microsoft SQL Server Analysis Services endpoint and provide authentication. The driver must connect to Microsoft SQL Server Analysis Services instances hosted over HTTP with XMLA access. See the Microsoft documentation to configure HTTP access to Microsoft SQL Server Analysis Services.
Authenticating to Microsoft SQL Server Analysis Services
The driver supports the major authentication schemes, including HTTP and Windows.
Set AuthScheme to use the following authentication types.
Anonymous Authentication
If anonymous authentication is available, set AuthScheme to none to avoid authentication.
Basic
Set SQL Server database User and Password and set AuthScheme to "BASIC".
Windows (NTLM)
Set the Windows User and Password and set AuthScheme to "NTLM".
Kerberos
Please see Using Kerberos for details on how to authenticate with Kerberos.
Securing Microsoft SQL Server Analysis Services Connections
By default, the driver attempts to negotiate SSL/TLS by checking the server's certificate against the system's trusted certificate store. To specify another certificate, see the SSLServerCert property for the available formats.