Edit JDBC connection string in Saiku - jdbc

I am using Microsoft SQL Server as database for my web application. I'd like to use Saiku as part of the application. I found the solution to set up the JDBC connection string as below:
type=OLAP
name=foodmart
driver=mondrian.olap4j.MondrianOlap4jDriver
location=jdbc:mondrian:Jdbc=jdbc:sqlserver://localhost:1433;databaseName=foodmart;Catalog=res:warehouses/FoodMart.xml;JdbcDrivers=com.microsoft.sqlserver.jdbc.SQLServerDriver; username=sa
password=XXXX
Anyway, I don't know which file in the package I downloaded (Saiku Server 2.4 (Including Foodmart DB)) is for changing the connection string as I mentioned.
Please help. Thank you in advance.

In case someone else has this same problem I thought I would share my solution, because I couldn't find any Saiku specific answer anywhere else.
After struggling for a few hours, getting the error "com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'TableName'.", I found that the correct way, or at least the one that worked for me, to specify the database name, was to add the jdbc prefix to the databaseName parameter.
This is my working example:
type=OLAP
name=foodmart
driver=mondrian.olap4j.MondrianOlap4jDriver
location=jdbc:mondrian:Jdbc=jdbc:sqlserver://localhost:1433;jdbc.databaseName=foodmart;Catalog=res:foodmart/FoodMart.xml;JdbcDrivers=com.microsoft.sqlserver.jdbc.SQLServerDriver;
username=sa
password=sa

Just use google:
http://docs.analytical-labs.com/DataSources.html
FYI You'll probably get quicker responses on Saiku questions if you use the IRC channel ##saiku on Freenode, or ask.analytical-labs.com

The solution is to migueletes spent hours trying to find the solution.
My problem was to try to include the instanceName parameter to connect the hub to a cluster mssql and actually had to add the parameter jdbc.instanceName to it was taken into account, otherwise omit the parameter.
https://groups.google.com/a/saiku.meteorite.bi/forum/#!topic/user/q9_5OG6_wrw

Related

Importing apache-poi into Oracle

Good morning,
I would like to generate excel file from oracle, therefore I have imported poi 3.16 and all pre-requisits based on the bottom table in this link:
http://poi.apache.org/overview.html#components
Exctly the following files:
commons-logging, commons-codec, commons-collections, log4j ,poi.jar
The dbms command I have used:
dbms_java.loadjava('filename.jar -resolve');
Everything went fine but all the classes that are within "org/apache/poi/hssf/usermodel/" remained invalid. The most important part. :)
Anybody has any idea what can be the problem? Should I import any other classes? First I would like try solution that does not need to check log files on the harddisk or any action on the server itself. I have no access to the server, therefore I have to communicate with the administrators which is complicated in our company :(. Of course if there is no olution within oracle I have no other option...
Thanks in advance,
Sz.

Mule Connect to remote flat files

I am new to Mule and I have been struggling with a simple issue for a while now. I am trying to connect to flat files (.MDB, .DBF) located on a remote desktop through my Mule application using the generic database connector of Mule. I have tried different things here:
I am using StelsDBF and StelsMDB drivers for the JDBC connectivity. I tried connecting directly using jdbc URL - jdbc:jstels:mdb:host/path
I have also tried to access through FTP by using FileZilla server on remote desktop and using jdbc URL in my app - jdbc:jstels:dbf:ftp://user:password#host:21/path
None of these seem to be working as I am always getting Connection exceptions. If anyone has tried this before, what is the best way to go about it? Connecting a remote flat file with Mule? Your response on this will be greatly appreciated!
If you want to load the contents of the file inside a Mule flow you should use the file or FTP connector, i don't know for sure about your JDBC option.
With the File connector you can access local files (files on the server where mule is running), you could try to mount the folders as a share.
Or run an FTP server like you already tried, that should work.
There is probably an error in your syntax / connection.
Please paste the complete XML of your Mule flow so we can see what you are trying to do.
Your usecase is still not really clear to me, are you really planning to use http to trigger the DB everytime? Anyway did you try putting the file on a local path and use that path in your database url. Here is someone that says he had it working, he created a separate bean.
http://forums.mulesoft.com/questions/6422/setting_property_dynamically_on_jdbcdatasource.html
I think a local path is maybe possible and it's better to test that first.
Also take note of how to refer to a file path, look at the examples for the file connector: https://docs.mulesoft.com/mule-user-guide/v/3.7/file-transport-reference#namespace-and-syntax
If you manage to get it working and you can use the path directly in the JDBC url, you should have a look at the poll scope.
https://docs.mulesoft.com/mule-user-guide/v/3.7/poll-reference
You can use your DB connector as an inbound endpoint when wrapped in a poll scope.
I experienced the same issue when connect to Microsoft Access Database (*.mdb, *.accdb) using Mule Database Connector. After further investigation, it's solved by installing Microsoft Access Database Engine
Another issue, I couldn't pass parameter to construct a query as same as I do for other databases. e.g.: SELECT * FROM emplcopy WHERE id = #[payload.id]
To solve this issue:
I changed the Query type from Parameterized into Dynamic.
I generated the query inside Set Payload transformer (generate the query in form of String, e.g.: SELECT * FROM emplcopy WHERE id = '1').
Finally, put it into the Dynamic query area: #[payload]

what is the GROOVY connection string to an JDBC database with SSPI = True? I am running this from SoapUI Free version

I'm trying to do this:
import groovy.sql.Sql
def sql = Sql.newInstance(
url:'jdbc:sqlserver://localhost\\myDB',
user:'server\user', //this I don't think I need because of SSPI
password:'password',
driver:'com.microsoft.sqlserver.jdbc.SQLServerDriver',
SSPI: 'true'
)
The problem I'm having is that this connection is just timing out. I can ping the machine. I can also connect to the database with Managment Studio logged into my SSPI user (or whatever you call it, I start the Management Studio with a different user)
So I've tried that with my SoapUI as well, started the program as a different user, but I still time out when I initiate the connection. So something is very wrong with my connection string and any help would be appreciated.
P.S. Yes, I don't know what's up with the \ backslashes after the URL to the server, I guess it indicates that it's at the root. If I don't use them I get a message that I'm on the incorrect version.
And then we found the answer..... First of all I had the wrong JDBC driver installed. You need to head over to microsoft to get the real deal:
https://www.microsoft.com/en-us/download/details.aspx?id=11774
Then you need to unpack this one, place the 4 or 4.1 version in your bin directory of SoapUI. (You are apparently supposed to use Lib/Ext, but that doesn't work for me)
Then, since we are trying to use SSPI or Windows Authentication, to connect to the SQL server, you need to place the sqljdbc_auth.dll from the driver/enu/auth folder. This is used in one of your path's or in SoapUI Lib folder. Remember to use the 32 bit dll for 32 bit SoapUI!!! I did not since my system is 64.....
After this, I used this string, but now you have the setup correct, so it should work fine as long as you remember to start SoapUI up using the correct windows user. (Shif-right click - start as different user - use the same user you have started the SQL server with)
Again, I wasn't completely aware of this from the start (yes, total newbie here) and it failed.
Finally, when you have done all this, this is the string that works - and probably a lot of derivatives since the failing part here were the driver and dll.
def sql =Sql.newInstance("jdbc:sqlserver://localhost;Database=myDB;integratedSecurity=true","com.microsoft.sqlserver.jdbc.SQLServerDriver")

Can't create own cube on Saiku

I would like to create cube with connection to MS SQL Server 2012. I downloaded Saiku with Foodmart DB which runs successfully. Currently, I have edited schema file to be my own data. Also, I changed to connection in saiku-datasource to be:
type=OLAP name=xmla driver=org.olap4j.driver.xmla.XmlaOlap4jDriver
location=jdbc:xmla:Server=http://localhost/olap/msmdpump.dll
After restarting the saiku, nothing is shown in the drop-down list of the cube. I am not sure if it caused from wrong connection string. But I have tested this configuration with SQL Server Studio, and it works properly.
By the way, I am not sure if I have to edit file in saiku-repository or not. I think it is the MDX or query file, but I am not sure. I don't know if I also have to edit this file or not as it is not mentioned in the documentation. So far, the file is still the same as original one. Could this also be the reason no list is displayed in my cube?
Could anyone help me figure this out, please ?
Thank you
It seems you should add security parameters in this file
Try this:
security.enabled=true security.type=passthrough
And if its problem related to security and roles refer -
http://ask.analytical-labs.com/questions/3071/saiku-and-ssas-security-roles
It might be the 2nd case problem related to ssas 2000 and ssas 2005 difference then refer-http://ask.analytical-labs.com/questions/2388/ssas-2000-with-saiku
And please provide the server log if any error is thrown in the back.
Was there any error ? You can check out the saiku.log files for errors.
Otherwise Try this,
type=OLAP
name=xmla
driver=org.olap4j.driver.xmla.XmlaOlap4jDriver
location=jdbc:xmla:Server=http://localhost/olap/msmdpump.dll
Just use the configurations in separate lines of their own.

tns not resolving correctly through webservice

I realise there are some similar questions on here already but I couldn't see one that matched my problem so I'm afraid I had to ask a new question.
I have a webservice running on a server, which is throwing a ORA-12154: TNS:could not resolve the connect identifier specified" error. However when I log onto the said server i am able to tnsping the entry successfully, and connect to it via sqlplus, but not through the webservice.
If anyone has any suggestions as to things to look for then I would greatly appreciate it.
Cheers
Some other things to look at include:
If you're using a service name instead of SID, are you specifying the entire service name?
If you're using the ORACLE_SID environmental variable, check the case (mydb vs MYDB)
Check for a sqlnet.log file
If you're using a username/password#SID connect string, you may need to quote your password if it contains special characters (like an # symbol).
The webservice can't find tnsnames.ora which usually means that you didn't set up Oracle's environment properly when starting the process. This usually means you didn't source oraenv.sh in the shell script which starts it.
So your interactive login works - what is different between your interactive login and the user that runs your web service?
Are they the same user? If not then you will need to update some of your configs in order to make the Oracle client files available to the webservice.
Details like Operating System, Oracle Version, etc are always a help.

Resources