Showing posts with label ssas. Show all posts
Showing posts with label ssas. Show all posts

Thursday, March 8, 2012

Call to Webservice from a Reporting Action in SSAS

Is it possible to call a webserive from a reporting action in SSAS?

What I am trying to do is create a reporting action that will schedule a report to run at certain time by calling the CreateSubscription Web service of Reporting services.

Any advice would be much appreciated. Does anyone have any suggestions or perhaps another angle that I could approach this problem?

Thanks

You can't use a report action since the report action uses URL addressibility. Instead consider a regular action that invokes a web page, e.g. ASP.NET page. The page can call down to the Report Server.

Another approach could be to use a report action which calls a dummy report that invokes some custom code. The report can forward the parameter values while the custom code can invoke the API.

|||

Thank you for your reply. I wanted to try and schedule this as a report to run off peak hours as it was a large report. But after testing the subscription based delivery method, I have encountered memory problems which lead me to believe that SSRS may not be the way to go. I am trying to generate a report that is trying to return approx. 500 Mb of data. When the report gets triggered the memory usage of ReportingServicesService.exe climbs until it reaches approximately 14 Gigs (I have a machine with 20 Gigs of memory). After the memory usage reaches 12 Gigs the report service stops servicing any new requests which makes sense since MemoryLimit is set to 60%. This is where the problem begins. It seems that after the report has finished executing it does not want to release this memory and no new requests can be serviced.

I have a few questions that maybe you could help me out with:

1. My first question is why is the report server using up so much memory? It is a simple report with one table, no special formatting, no aggregations being done by the report server.

2. Sql server will release its memory when other processes require it, should Reporting services do the same thing?

3. What are the recommended Memory settings of MemoryLimit and MaxMemoryLimit? Are they the defaults of 60 and 80?

4. I have yet to test setting the Memory Limit settings to a value greater than 100 so that the report server can use virtual memory. What are the implications of doing this? Would you recommend doing this?

My organization deals with Billions of rows of data so it is not uncommon for someone to request a hundreds of thousands of rows for further analysis. If reporting services is not the way to go then I will have to look into creating some SSIS packages or some custom .Net code to export this data.

Any advice would be much appreciated.

Thanks.

|||

1. A 500Mb report will do for a Halloween trick. It will be probably useful to look at the ExecutionLog table and see how much time was spent in data retrieval, processing, and rendering. To answer your question, I suspect that the high memory consumption is caused by loading the large dataset in memory. I assume you have applied the latest service packs. I am really curious how would the business users analyze hundreds of thousands of rows.

2. It should. The Windows service (ReportingServicesService.exe) is written in managed code. When the memory is not used, it should be reclaimed by the .NET garbage collector. You may want to report this to the Product Feedback Center. It could be related to the 64-bit version.

3. See http://msdn2.microsoft.com/en-us/library/ms159206.aspx.

4. Again, see the above link.

As a side note, you may want to look at the Analysis Services if you need to push such big datasets.

|||

Hi Teo,

1. I've checked my ExecutionLog Table. Here are the values for TimeDataRetrieval, TimeProcessing and TimeRendering (in Minutes): 19.37min, 12.33 min, 7.38 min. Byte count was 516277912 (492Mb) and Rowcount was 642703. If only 492 Mb are retrieved, I still don't understand why the memory consumption is so high (14 Gigs). This report is actually a drillthrough action that exprots the data to a CSV file. My client requires that when they observe suspicious numbers for certain time periods, stores, products etc. they want the ability to drillthrough the underlying records to do some further analysis, send the data back to the data suppliers so they can explain why the volumes are high or low. They may even want to sell the data to other organizations.

2. I will try to report this issue to the Product Feedback Center.

3 + 4. That article is good, but it makes no recommendations whether or not we should set the memory limit values greater than 100 to use virtual memory. I will run some tests to try and see the affects of changing these properties.

What do you mean by "look at the Analysis Services if you need to push such big datasets"? Are you refering to the performance? Or just another mechanism to export the data. Please elaborate. My end users require the ability to browse cubes and then drillthrough to large datasets.

Any advice would be much appreciated.

Thanks.

|||

1. I am not exluding the possibility this to be a bug. We also ran into an issue with large reports where the reports will time out. The forthcoming SP2 is expected to fix this.

2. Also, I would suggest you contact the Support Center ASAP and request a hotfix. The best thing will be if you could send them a test harness.

What I meant is that SSAS could be a better choice if the users want to aggregate large volumes of data, e.g. for historical analysis. But sounds like in your case, the end users wants to see a detail report so scratch out SSAS.

|||Also, do you have the same issue if you request the report directly from the Report Server (e.g. using the Report Manager) as opposed to subscribed delivery? In this case, the Windows service will be bypassed and if you face the same issue, the ASP.NET process memory would grow.|||

Yes. The same issue occurs with requesting the report directly from the report server. In this case the memory usage of IIS (w3wp.exe) grows to approximated the same as it did with the ReportServer Service. I will continue to search for a solution and post any of my findings.

Thanks.

Call to Webservice from a Reporting Action in SSAS

Is it possible to call a webserive from a reporting action in SSAS?

What I am trying to do is create a reporting action that will schedule a report to run at certain time by calling the CreateSubscription Web service of Reporting services.

Any advice would be much appreciated. Does anyone have any suggestions or perhaps another angle that I could approach this problem?

Thanks

You can't use a report action since the report action uses URL addressibility. Instead consider a regular action that invokes a web page, e.g. ASP.NET page. The page can call down to the Report Server.

Another approach could be to use a report action which calls a dummy report that invokes some custom code. The report can forward the parameter values while the custom code can invoke the API.

|||

Thank you for your reply. I wanted to try and schedule this as a report to run off peak hours as it was a large report. But after testing the subscription based delivery method, I have encountered memory problems which lead me to believe that SSRS may not be the way to go. I am trying to generate a report that is trying to return approx. 500 Mb of data. When the report gets triggered the memory usage of ReportingServicesService.exe climbs until it reaches approximately 14 Gigs (I have a machine with 20 Gigs of memory). After the memory usage reaches 12 Gigs the report service stops servicing any new requests which makes sense since MemoryLimit is set to 60%. This is where the problem begins. It seems that after the report has finished executing it does not want to release this memory and no new requests can be serviced.

I have a few questions that maybe you could help me out with:

1. My first question is why is the report server using up so much memory? It is a simple report with one table, no special formatting, no aggregations being done by the report server.

2. Sql server will release its memory when other processes require it, should Reporting services do the same thing?

3. What are the recommended Memory settings of MemoryLimit and MaxMemoryLimit? Are they the defaults of 60 and 80?

4. I have yet to test setting the Memory Limit settings to a value greater than 100 so that the report server can use virtual memory. What are the implications of doing this? Would you recommend doing this?

My organization deals with Billions of rows of data so it is not uncommon for someone to request a hundreds of thousands of rows for further analysis. If reporting services is not the way to go then I will have to look into creating some SSIS packages or some custom .Net code to export this data.

Any advice would be much appreciated.

Thanks.

|||

1. A 500Mb report will do for a Halloween trick. It will be probably useful to look at the ExecutionLog table and see how much time was spent in data retrieval, processing, and rendering. To answer your question, I suspect that the high memory consumption is caused by loading the large dataset in memory. I assume you have applied the latest service packs. I am really curious how would the business users analyze hundreds of thousands of rows.

2. It should. The Windows service (ReportingServicesService.exe) is written in managed code. When the memory is not used, it should be reclaimed by the .NET garbage collector. You may want to report this to the Product Feedback Center. It could be related to the 64-bit version.

3. See http://msdn2.microsoft.com/en-us/library/ms159206.aspx.

4. Again, see the above link.

As a side note, you may want to look at the Analysis Services if you need to push such big datasets.

|||

Hi Teo,

1. I've checked my ExecutionLog Table. Here are the values for TimeDataRetrieval, TimeProcessing and TimeRendering (in Minutes): 19.37min, 12.33 min, 7.38 min. Byte count was 516277912 (492Mb) and Rowcount was 642703. If only 492 Mb are retrieved, I still don't understand why the memory consumption is so high (14 Gigs). This report is actually a drillthrough action that exprots the data to a CSV file. My client requires that when they observe suspicious numbers for certain time periods, stores, products etc. they want the ability to drillthrough the underlying records to do some further analysis, send the data back to the data suppliers so they can explain why the volumes are high or low. They may even want to sell the data to other organizations.

2. I will try to report this issue to the Product Feedback Center.

3 + 4. That article is good, but it makes no recommendations whether or not we should set the memory limit values greater than 100 to use virtual memory. I will run some tests to try and see the affects of changing these properties.

What do you mean by "look at the Analysis Services if you need to push such big datasets"? Are you refering to the performance? Or just another mechanism to export the data. Please elaborate. My end users require the ability to browse cubes and then drillthrough to large datasets.

Any advice would be much appreciated.

Thanks.

|||

1. I am not exluding the possibility this to be a bug. We also ran into an issue with large reports where the reports will time out. The forthcoming SP2 is expected to fix this.

2. Also, I would suggest you contact the Support Center ASAP and request a hotfix. The best thing will be if you could send them a test harness.

What I meant is that SSAS could be a better choice if the users want to aggregate large volumes of data, e.g. for historical analysis. But sounds like in your case, the end users wants to see a detail report so scratch out SSAS.

|||Also, do you have the same issue if you request the report directly from the Report Server (e.g. using the Report Manager) as opposed to subscribed delivery? In this case, the Windows service will be bypassed and if you face the same issue, the ASP.NET process memory would grow.|||

Yes. The same issue occurs with requesting the report directly from the report server. In this case the memory usage of IIS (w3wp.exe) grows to approximated the same as it did with the ReportServer Service. I will continue to search for a solution and post any of my findings.

Thanks.

Saturday, February 25, 2012

Call a stored procedure from an SSAS action

Hello, I'm just wondering if anyone has every created an action that called a stored procedure. I've been looking into Proprietary actions of statement actions but I cannot find any documentation of examples. Is this possible? One option was to create a dummy ssrs report and then call some custom .Net code. But I want to avoid using a technology just as a work around. Any ideas?

thanks.

To call sproc from action is not a problem - the question is - what do you want to return from this sproc ? If you return a string to be used in URL action - then it will be trivial, just use sproc in the MDX expression. If you want to return rowset, it is a little bit more work, but should be possible too.|||

Actually, I don't need it to return anything. This is SQL Server sproc that I will pass a few parameters and it will execute an SSIS package. The only thing that I have read to accomplish this, is to create a small .net web app that will call this sproc, that way I can simply use a url reporting action and pass the parameters to the web app.

I am wondering if it is possible to call the SQL server sproc directly from a reporting action?

|||OK - I thought you were talking about SSAS stored procedure. There is no direct way to call SQL Server sproc, so either you do it through web app and implement an URL action, or you code SSAS stored procedure which calls SQL Server stored procedure.|||

Hi,

I decided to create an SSAS stored procedure that would call a SQL server stored procedure. I made a call to the sp in a URL action like this:

"Http://localhost/ReportServer/Pages/ReportViewer.aspx?/SampleReport/Report&Param1=" & AssemblyName!StoreProc()

The report would simply say the the procedure has been executed successfully.

This works great but the only problem is that the stored procedure fires as soon as you right click the cell. Is there a setting or something that I need to set so that the stored procedure only fires when the user clicks on the action?

Thanks in advance for your help.

|||

Hi,

Hi after some further reading I figure out what was going on. When right clicking on the cell the server would resolve all actions and return the resulting string to the client, therefore the result was that the ssas stored procedure was getting executed before the action was returned to the client. Solution: I changed the action type to "statement" and simply used a "Call StoredProcedure()" statement in the action expression.

Thursday, February 16, 2012

Calculating the total number of open account between February - April

I submitted this issue to the reporting services thread, but I'm beginning to think I may have to do something in SSAS:

I want to enable my users to select 2 random month end dates in a report parameter. After selecting these dates, I want to be able to take the corresponding financial values, be able to line them up next to each other in a report, and calculate the difference. Obviously in a matrix I can line the values up, but I am then not able to calc a difference. I do have a time hierarchy that allows me to do this across dates at the same level of granularity, i.e. year to year, qtr to qtr, etc., but if my users want to compare February month end to November month end, it's a problem. I am more than willing to add calculated members to the cube to get this done, I just haven't figured out the MDX for it.

Thanks in Advance...

I think this can be done without any calculated members, simply by using the following query:

SELECT

{Measures.ImportantFinancialValue1, Measures.ImportantFinancialValue2, ...} ON COLUMNS

, {Time.Date1, Time.Date2} ON ROWS

FROM Cube

HTH,

Mosha (http://www.mosha.com/msolap)

|||

Mosha-

Thanks for your quick response. I am using SSAS on top of SSRS, and am trying to avoid writing MDX as these reports may get very involved. Can I replicate this in a calc'd member, can it be dynamic enough to accept values at runtime?

|||I am supposed to find out the total number of open account between February - April and i am having difficulties. Below is a working statement for SQL which i am supposed to do in MDX for my Cube:

SELECT COUNT(*) AS Expr1

FROM ConsumerAccount

WHERE (DATEPART(yyyy, AccountOpenedDate) = '2007')

AND (DATEPART(mm, AccountOpenedDate) IN (02, 03, 04))

I have a cube called Batch process, column AccountOpenedDate and CrearedOnDate, how do i do it

Friday, February 10, 2012

Calculated Members

Hi, I deployed a cube in SSAS with two dimensions and several measures. I browsed the data after deploying and processing the cube and the data displayed correctly in the grid for all the measures.
After that I created a simple calculated member (like adding two measures) and then deployed and processed the cube again.
after that I browsed the data, every measure for every dimension were empty.(not 0 just empty).
Does anyone know the reason for this?
pls mail me supunthri@.gmail.com
Supun
You probably removed that Calculate; statement when you added the measure.

You can read this for a similar problem..

Chris
|||Hey Cris,
You were right, there was no Calculate; statement in the script,
Thanx a lot
Best Regards!
Supun