Is there any way to investigate performance statistic for SSRS report from VS 2008 Shell.
I mean while generating preview for report see the statistic: How much time for rendering, how much time for query.
P.S. I know that WholeTime - TimeQueryExecutedSeparately = TimeRendering, but still I want to find a way.
What's the point? Will your users use the VS 2008 Shell?
I would deploy to a test environment of Report Manager or SharePoint and run your reports there. Then you can query the ReportServer.dbo.ExecutionLog3 view to get those statistics.
Related
We are using the IBM Cognos Report Studio for Making the Reports.
And we have 1000s of reports developed and using.
Now i need to fetch all the SQL queries written in these 1000+ reports.
For that at present i am opening the report studio for each individual report and getting the query.
But it is very tedious job and taking months to get all the SQLs in these 1000+ reports.
So i am looking for a way to get all these queries from database behind Cognos studio.
Does these report parameters (including the SQL) store in a Database or only in Contentstore?
If it store in DB then is it possible to access the Report Studio in a Database tool like Oracle SQL Developer?
So that i can fetch all the SQLs in one shot from the database table.
Thanks for the help!
My experience migrating from one reporting product to another is like what you are asking. I think I had 7000 reports that I was aware of plus many reports sitting on workstation hard drives. At some point along the way we realized that the new product had different features than the old one, so report redesign was a good option in most cases. It took 18 months once we actually started working on the reports. That was to replace the 700 "standard" reports. Users were on their own (with support from IT and subject matter experts) for their custom work. I now have about 19,000 reports in Cognos.
Except where the report developer wrote SQL in a SQL object in the Queries area, Cognos reports do not contain SQL code. Cognos generates the SQL at runtime based on the report spec and user interaction (what parameters they set, what page the opened, etc.). Short of writing your own report spec parser, duplicating the work that Cognos does for you, there is no way I know of to generate the SQL.
One possibility: I haven't dug too deeply into the Cognos SDK. There may be a method there to generate the SQL for each report. Then you can do it automatically. Be aware that for thousands of reports you'll want to run this process during non-work hours. It could run for hours and may use a lot of resources.
Another possibility: Turn on native query logging (Cognos Administration | System | All dispatchers | | Set properties | Settings | Logging | Check the boxes for "Audit the native query..."). Then have a person, a product like those from Motio, or a Cognos SDK program you create yourself run every report. Then you can get the SQL from the Audit database. Of course, the problem here is answering prompts. It will probably take a person to run these.
To add two columns to a list, or two data elements to a report or page header or footer, or two filters (I don't know what you mean by "clause"), you'll want to use the Cognos SDK.
Choose relevant examples of different types of reports.
Examine the XML report spec for each of those reports.
Determine how to identify where the new element should appear in the XML.
Write a program (probably in C# or Java) to use the SDK to...
inspect every report in your environment.
determine which pattern the report fits.
add the data elements.
save the report.
I am a developer and performance tester but not a DBA. My team is working on a performance testing tool that is specific to our software. One of the features we want it to have is the ability to generate a database report immediately after the test. Our software is database agnostic. For Oracle, I can easily create a snapshot id before and after the test and programmatically create an AWR report for those snapshots, write to a file and save with other artifacts we gather. Works great.
For SQL Server, however, there is no AWR equivalent (that I know of). I know the MDW as part of the SSMS has a UI for getting things like top 10 slow SQL and things like that. But, I have not yet found a way to programmatically create and extract a SQL performance report (preferably similar to Oracle's AWR) for SQL Server.
I am even willing to create the report myself if I can find a way to extract the raw data.
Any ideas would be greatly appreciated because searching online is not getting me anywhere.
P.S. I'm trying to do this in Java, by the way, but will accept help in any language. Thanks again!
Good news! In SQL Server 2016, you can use Query Store. This is like your flight recorder blackbox.. finding long running queries and waits. Capture baseline built in to SQL Server. You can compare before and after hardware changes and/or upgrades on queries. Maybe this similar to Oracle AWR.
Only available SQL Server 2016 and up.
I have a problem similar to the one within this topic:
SSRS: Showing the correct execution time on a two page report?. Well the problem is practically the same but the BI tool is different it's not in Microsoft SQL Server Report Builder but in PowerBI. I have searched for something similar, some kind of execution time indicator that will show how long report was generated. I know that PowerBI is different from Microsoft SQL Server Report Builder but both are BI tools that allow to create reports from many kinds of sources (SQL queries for example).
Perhaps someone found a solution for my problem during his/hers work and could post a solution for my problem? I would be much obliged.
Next week I will create some simple select queries for PowerBI for a new customer who wants to have more insight in his business.
Until now I have only done this for our own company. I am afraid that by installing SQL Server Management Studio and building some queries in Management Studio I might (in a freak accident scenario) damage his database. I know this is unlikely.
However I do not really want to mess with his configuration. I also do not want to give him any ground to argument against me if anything unrelated does not work afterwards.
What would be a reasonable way to get my queries without really touching his database ? I thought of using a 3rd party frontend like Heidi SQL or FlySpeed SQL (even better because you cannot do admin tasks with it). I cannot just start with PowerBI because I need to analyze his DB first (scroll through tables etc).
Also I thought of making a backup of his DB first but that involves playing around with Management Studio.
Thanks in advance for any suggestions!
Backup and restore. Then use the backup to work as a development system that way you can work out the bugs then put your app or queries into production.
Check out SSMS ToolsPack. It wont stop you from updating/deleting some rows. But will give you a warning if you are running a update/delete without a where clause. Or if you run a TRUNCATE or DROP TABLE statement. See config for settings. Also has color coding for windows.
Also has Window connection coloring - you can color the query windows based on the server/database name
How do I use SQL Server Tuning Advisor to produce recommendations based on Entity Framework queries? Entity Framework uses sp_executesql 'query' instead of executing the query and Tuning Advisor does not recognize these queries. I could get the query text manually, but this will only work for very simple scenarious. How do I do it in an automatic way?
UPDATE
Would it help if I save the profiling information into a table and then run some application which will strip "sp_executesql" and only keep the query text and use this new data to run Tuning Advisor?
I know this topic is a little cold. But since I was having the same issue and found a better solution:
Changing events captured is one way to do it, but there is already a "template", which records everything needed by the SQL server tuning advisor.
If you select the template "tuning", it will effectively remove and add event capture quoted by Doug, but another too.
You can find more about template here
To activate this template, in the "New Trace" windows, select the corresponding template( I didn't create it, it was already there):
Once you did it, you can check the event selection, you have already what is needed:
I additionaly disabled the RPCCompleted, since I've no stored procedure
I hope it will help some people ;)
It looks like the problem is this. If you create a trace using SQL Profiler from the "Tuning" template it does not include the correct events. The Database Engine Tuning Advisor does not understand sp_executsql statements from the batch completed events. It report in the tuning log "Event does not reference any tables" with a category ID of "S008".
When capturing your trace you need to add the "SQL:StmtCompleted" event under the TSQL section as well.
Jeff Walker pointed me in the right direction - but his answer was incomplete (although I'm certain he knew the complete answer and just didn't fully explain it)
In the Event Selection for Sql Server Profiler:
Remove the logging of RPC:Completed under Stored Procedures - this is the item that does poorly with Entity Framework
Expand to all events and ADD SP:StmtCompleted under Stored Procedure in order to get the queries into the trace.
Seems to work for me.
Microsoft Entity Framework People (and profiler people) This is actually lame. It used to work.
Use SQL Profiler to capture a whole session of queries. When you're done you can save the profiler results and run the whole thing through SQL Server Tuning Advisor. In my experience this gives much better results than tuning based on individual queries and in many ways is easier and more realistic since you can use profiler to capture queries from real application usage.
EDIT:
Thanks for bringing more attention to the specific issue you're asking about. I didn't realize you were saying that the Tuning Advisor doesn't understand sp_executesql because that simply isn't true. You can run as many queries as you want through sp_executesql and capture them in a profile and then run that profile through Tuning Advisor and it will give you recommendations.
To be sure, I just did it with MS SQL Server 2008 R2. I created a table with no indexes, ran a bunch of queries through sp_executesql, captured them in SQL Profiler, and then ran the resulting trace through Tuning Advisor. Tuning Advisor gave appropriate recommendations for the queries embedded within sp_executesql.
The exact version of Database Engine Tuning Advisor is 10.50.1600.1, running against Microsoft SQL Server 2008 R2 (RTM) - 10.50.1617.0 (X64) Apr 22 2011 19:23:43 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1).