简体   繁体   English

OLAP4J:如何使用用户名和密码连接到多维数据集

[英]OLAP4J: How to connect to a Cube using username and password

I am using olap4j libraries and trying to connect to a SSAS Cube. 我正在使用olap4j库,并尝试连接到SSAS多维数据集。 I understand that the general syntax is, 我了解一般语法是

Class.forName("org.olap4j.driver.xmla.XmlaOlap4jDriver");
Connection conn = DriverManager
            .getConnection("jdbc:xmla:Server=http://10.239.0.1/OLAP/");

But, if the Cube expects an username and password to connect to it. 但是,如果多维数据集希望连接到它的用户名和密码。 What is the code syntax that I need to follow to connect? 连接时需要遵循的代码语法是什么?

Found the answer to this. 找到了答案。

Class.forName("org.olap4j.driver.xmla.XmlaOlap4jDriver");
Connection conn = DriverManager
            .getConnection("jdbc:xmla:Server=http://10.239.0.1/OLAP/", username, password);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM