SSAS Cube processing - ssas

I have deployed my SSAS solution to production. On the production server, I want to process my cube, but when I right click on the ssas cube and choose "Process", I recieve the follwong error:
The 'Database' with 'ID' = 'XXX' doesn't exist in the collection.
Has anyone encountered this error in Microsoft SSAS? If so, can anyone tell me what to do to resove this error ?

Check to see what the Id of the database is by right clicking on the database and selecting properties. Check the equivalent in visual studio and confirm it matches. If you have renamed the analysis services project (maybe for a backup), the id of the database does not get renamed and sometimes gets messed up in the XML file.
Try re-processing the dimensions on their own and then the cube. Failing that, if this is the first process (i.e. the cube is not live), try deleting and redeploying from visual studio.

You can re-deploy the OLAP database from SSDT with a different name and before you do you just need to change the database name and set the Processing Option to Full. You can set these options under Project's Configuration Properties->Deployment.

I had the exact same problem. I solved it by editing the roles in my SSAS database :
And then, check the boxes depending on what you want your job to do :
Then, you can process your cubes with your SSIS Jobs.

it can either be roles or kerberos, I got a similar error when the kerberos authentication wasnt setup in the cube server to interact with database server.

Related

Cannot reopen an Analysis Services Tabular Project the second time– error database already exists in the detached state

Using SQL Server Analysis Services 2019 running in Tabular mode, I get this error every time I open an existing Tabular Project solution in Visual Studio 2017 (version 15.9.3, though I don't think the version is the issue). Even creating a new Analysis Services Tabular Project, closing it, and opening a second time again causes the same error.
An error occurred while opening the model on the workspace database.
Reason: The operation cannot be executed since the database with the
name of 'Data Warehouse Tabular_5a21b9d1-2c2e-43e3-9174-981ccddf6f66',
ID of 'Data Warehouse Tabular_5a21b9d1-2c2e-43e3-9174-981ccddf6f66'
already exists in the detached state in folder '\?\C:\Program
Files\Microsoft SQL Server\MSAS15.MSSQLSERVER\OLAP\Data\Data Warehouse
Tabular_5a21b9d1-2c2e-43e3-9174-981ccddf6f66.0.db'. Either attach the
database or delete the folder and retry the operation.
This error is described very well here: https://blogs.msdn.microsoft.com/jason_howell/2013/07/22/cannot-reopen-an-analysis-services-tabular-project-the-second-time-error-database-already-exists-in-the-detached-state/
Unfortunately, implementing the suggested fix of making sure that my DataDir was referenced in my AllowedBrowsingFolders setting did not make a difference. Here are my current settings:
Running SystemGetSubdirs 'C:\Program Files\Microsoft SQL Server\MSAS15.MSSQLSERVER\OLAP\Data\' in an MDX connection returns no results. However, running SystemGetSubdirs on the parent OLAP folder does return three of the six folders in that directory (including the Data folder). I have forced the Data folder to inherit the permissions of the OLAP folder, and forced those permissions on all child objects, and I have tried giving Full Control to the Data folder to the 'Everyone' user, to my user and to the SSAS service account user. I have tried creating a new data folder on the root of my C: drive and holding the databases there, but none of this has made a difference. I've restarted the SSAS service after these changes.

Azure SQL Server Database creation not working correctly

I have Azure and I just upgraded to the Pay-as-you-go option as I though being on the trial might be causing my issue, but it persists.
I try to make a database in SSMS and I get this error saying I don't have the right subscription:
The reason I want to do it from SSMS is because when I try to add the database through the azure portal it doesn't show up in the sys.database table:
One of my databases is dependent on another and can't find it when trying to add a stored procedure because it doesn't seem to be registering correctly with master.
What is going on and how do I fix it?
I figured it out. When making a new database you need to go to options and change service level to basic.

Schema published but not seen in BI Server with jpivot

I created an schema in Schema Workbench and publish with no errors, but when I got in BI Server with the standard user admin, I choose New->jpivot, then it display the name of the schema I created but it does not display the cube. For reference the error I get from catalina.out is:
17:11:45,174 ERROR [PentahoDataSourceResolver] PentahoXmlaServlet.ERROR_0002 - IDatasourceService.UNABLE_TO_INSTANTIATE_OBJECT
org.pentaho.platform.api.data.DBDatasourceServiceException: javax.naming.NameNotFoundException: Name [Esquema Salario] is not bound in this Context. Unable to find [Esquema Salario].
Name [Esquema Salario] is not bound in this Context errors usually appear if you use JNDI name, which is not defined on your system. So, I assumed, that this is the name of the datasource, which you reference while publishing Mondrian schema files to BI server.
Xml file with Mondrian schema definition generated by Schema Workbench does not contain any information regarding how to connect to database. So, you need to specify these details when you upload your schema file on BI server (It's done on step 4 below).
But first you have to create the connection itself (steps 1-2):
Create new JDBC datasource:
Define connection parameters:
If cubes still don't appear after these steps, you may republish your cube: follow same steps as in step 1, but select "Analysis" instead of "JDBC" in the end.
Upload the xml file, generated by schema workbench and select the datasource, which you have created on step 2. .
If cube still does not appear - check your log again. If you see the same Name is not bound error, you may try to restart your BI server application (new connections usually get recongnized immediately, but if you had a connection with same name before, than you might need to restart tomcat).
If that does not work, than once again, check log files. I guess, you'll have some different error in this case.
I had the same problem as the OP (blank screen when clicking New View) with the latest version of Pentaho BI server 7.1 (latest at the moment) and even with the 6.0 version one, Pivot4J SNAPSHOT 1.0 plug in version (latest as of today), Schema Workbech 3.14 (latest as of today).
And as, in line with OP, my catalina.out log was also spitting the Name [DatasourceName] is not bound in this Context. Unable to find [DatasourceName].
After several trials and errors I noticed the problem showed up when I checked the "Register the XMLA Data Source" when publishing the schema on Schema Workbench. So to fix the problem I just unchecked it before publishing.
Another way to fix this is going to the Manage Datasources option on the BI server, Import Analysis, choosing the schema created by Schema Workbench, AND manually setting the data source parameter value EnableXmla to false and saving changes. Now the schema should show up when clicking on Create New > Pivot4J view.

Can I run my own DAX or MDX queries against Power BI?

I have a data model in Power BI desktop. I'd like to publish it to the server, but I'd also like to have an internal report run MDX (or DAX) queries against it. Is this possible? Can I just create a connection string and connect to Power BI like to a SSAS Cube? Maybe using the REST APIs?
Edit:
Thanks for your answers. Kyle gave me the best answer to my question, so I accepted his, but all of you made me clear that I'd better just use SSAS. This is what I did, with some hassle of seeing up HTTP bridge, but it works like a charm now.
It actually is possible in a literal sense - every time you run PowerBI, it creates a behind-the-scenes instance of SSAS Tabular that you can connect to and run queries against. Obviously this isn't directly supported by Microsoft, but I leave these steps in case anyone else wants to know how:
Navigate to %user%/AppData/Local/Temp/Power BI Desktop
Open your PowerBI Desktop model
A new folder will appear in the temp folder, inside that is a folder called AnalysisServicesWorkspace1111111111 (numbers at end are random)
Inside that folder is a file, msmdsrv.port.txt, which contains the port number (portnum) on which the SSAS Tabular model is running
You can open SSMS and connect to Analysis Services server localhost:portnum
The specific database instance you can find either via SSMS or the name of the GUID folder in the workspace folder (it'll be something like "33df46dd-8c77-46eb-bf01-8d545f626723.0.db")
Or you can use this as the server / catalog in an SSAS connection string i.e.
Provider=MSOLAP.5;Integrated Security=SSPI;Persist Security Info=True;
Initial Catalog=databasename;Data Source=localhost:portnum;
MDX Compatibility=1;Safety Options=2;MDX Missing Member Mode=Error
Also, for devs of note, inside that *.db folder is a SQLite database which contains all the PowerBI model metadata, you can modify it via code and have it persist as long as you do something trivial in the UI such as select add calculated column and then click away.
To my knowledge this is not possible. Whether there is a workaround or not, I don't know.
You're probably better served using SSAS and connecting to a model in that both from Power BI with the AS Connector and for whatever DAX queries you need to run against it.
By publish, if you mean to put it out on SharePoint, then, YES there is a way to access it.
PowerPivot for SharePoint actually consists of two components. First, there is the Service Application that runs in the SharePoint farm that is responsible for performing data refreshes, and usage analytics. The main part however is actually an instance of Analysis Services using the tabular engine. It’s properly referred to as Analysis Services SharePoint Mode, and as of SharePoint 2013/SQL Server 2012 SP1, it can be installed standalone. However, it is most commonly installed on SharePoint front end servers.
In the case above, the SharePoint front end server is named NautilusSP. You can also see that there is a model being hosted by the server already. The model is named by taking a workbook, and adding a GUID to it. This is done by Excel Services the first time that a model is interacted with. For example, if we add the file Health.xlsx, which contains an embedded PowerPivot model, and immediately refresh the object explorer in Management Studio, we will see that nothing has changed. However, if we then interact with the model at all, by clicking a slicer, or opening a pivot table category, we will see that the model has been automatically created for us.
Caveats:
These models are temporary. If they haven’t been used for a period of
time, they get deleted. Also, if the source workbook is updated, a new
model is automatically create upon first interaction. This can be seen
if we edit, and save our Health.xlsx workbook, and then open it in the
browser and interact with it.
The original model will be deleted in a garbage collection process. We
therefore cannot reliably target these models, as any reference will
become invalid relatively quickly.
The better and actually scalable option is to create a tabular model(we are talking SSAS here) and import this PowerPivot model into it.

Can't create database in SQL SSAS

I installed Microsoft SQL Analysis Service because I need it to run a forecast analysis from Excel using the Data Mining Plug-in.
When I open MS Management Studio and connect to the SSAS I don't know how to create a new database.
When I right-click over Databases there is nothing like Create Database or New Database.
This is the image of my problem:
Well... I solved my problem reinstalling the suite selecting all of its options.
I still don't know what may cause this problem if not chosen in the instalation options but now I have the New Database option and could finish my job.
Thanks.
I managed to solve this problem by switching Analysis Services from Tabular to Multidimensional mode:
Stop SQL Server Analysis Services service
Go to the config folder, e.g. C:\Program Files\Microsoft SQL Server\MSAS15.SQL2019\OLAP\Config
Copy file msmdsrv.ini to another folder (you can't edit it here directly)
Open the copied file and search for the DeploymentMode xml tag
Set the value to zero
Save the file, copy it back to the Config folder
Start the service
You can use SQL Server Management Studio to create a new, empty database on an instance of SQL Server Analysis Services.
To create an Analysis Services database
Connect to an Analysis Services instance.
In Object Explorer, expand the node for the connected Analysis Services instance.
Right-click the Databases node of the Analysis Services instance and select New Database.
In the New Database dialog box, in Database name, type the name of the new database.
In Impersonation, provide impersonation information for the new database.
In Description, type the optional description for the new database.
Click OK.