SSIS: printing ssrs report - sql-server-2008

There is a package with script task which prints SSRS report. Package runs and everything is just perfect. When I deploy it to production server it doesn't work and I know it's because of the printer I'm sending it to (it's invalid, it's not on the list).
The problem is... SQL Server Agent service account has printers configured, not to mention the printer I'm sending this report to is set as default.
The package is run by another account which has printers configured, correct permissions (for testing purposes this account can do pretty much anything), the fuzzy stuff.
The account running SSIS, in the other hand, can do very little (not even fancy kerberos passing :).
Any suggestions? If you could just point me in the right direction, it would be great.
EDIT
Package runs from SSIS, but doesn't run from SQL Server Agent. We are trying to ad-hoc fix the bug in another companys software (it doesn't create few reports, users don't want to use it, people walking backwards, cats living with dogs), waiting for patch. We can't change the code for obvious reasons, the only solution is to find reports which are not created and create them on our own.

Related

Using Apache Airflow to Automate SSRS and/or SSIS

Does it make sense to use Apache Airflow to orchestrate/automate ETLs, and subsequently dispatch reports via SSRS or SSIS? Put another way, I'm wondering if I can wire up an Airflow DAG to SSRS or SSIS. The MsSqlOperator Airflow operator looks like it interfaces with SQL Server, but I can't find any reference to a provider for SSRS or SSIS.
This is meant a very general question, I'm looking for directional guidance, as opposed to code examples (although I'll happily take those). Just wanting to know if I am going to pursue something that isn't going to work or is otherwise a bad idea.
Assuming you're looking to orchestrate the running of a report or running of an SSIS package, yeah sure, that's doable.
SSIS
Assuming you're working with the project deployment model, a package run is a few stored procedure calls strung together
create_execution creates an instance of an execution
set_execution_parameter_value allows you to configure values for an instance of that execution
start_execution begins the actual running of the package
Depending on whether you want the package running in synchronous or asynchronous (default) mode, you might want to set the SYNCHRONIZED bit.
SSRS
I'm not sure what you're looking for here but we trigger the proc add_event to kick off a subscription which then gets emailed out but I have seen plenty of questions from people that want to run an ssis package that pulls a report and exports to csv/pdf/etc
https://businesswintelligence.com/content/26/manually-trigger-ssrs-subscription
Docs/Learn
https://learn.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-create-execution-ssisdb-database?view=sql-server-ver16
https://learn.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-set-execution-parameter-value-ssisdb-database?view=sql-server-ver16
https://learn.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-start-execution-ssisdb-database?view=sql-server-ver16
https://andyleonard.blog/2015/11/the-synchronized-ssis-execution-parameter/

SQL Server 2008 R2 - Custom SSIS Components work in BIDS not in SQL Server Agent

We have developed Custom SSIS components that integrates with an online REST API (Shopify to be precise) and these components work fine in BIDS and every single time too. However, when I create a SQL Server Agent job for the SSIS package that uses the components, some of the components don’t work, there is no error, just never hits the Pre Execute. The components that don’t work call the REST API and set specific TAGS on some orders, they do so using a JSON. The SQL Server agent is running on the same machine (my own) and it's executing the same SSIS package that works in BIDS. There are no errors and the SQL Server JOB reports success.
My machine is a 64 bit setup, so obviously the Agent will be running in 64bit so there may be issues there.
This is what I have tried already
Changed the SQL Server Agent user to eliminate the issue being a proxy/user issue.
Changed the setting for the step to use 32bit runtime (Ticked “Use 32 bit runtime”)
I have tried compiling my code using Any CPU x86 x64 .. with different results but none of them work etc
The installation project (which is part of the solution) is a WIX Toolset project which can only compile using x86 which I don’t think I can change.
Logged where it is getting to a log file.
I think it might be 32bit/64bit issue but maybe wrong. The log file shows the following
When called from BIDS (works)
• Validate (code running as 32bit)
• Validate (code running as 32bit)
• Hits Pre Execute and it all works thereafter
When called from SQL Server Agent (doesn’t work)
• Validate (code running as 32bit)
• Validate (code running as 64bit)
• Never hits the Pre Execute
Like I said, I suspect it being a 64bit issue but maybe wrong.
Hi guys and sorry for not posting the answer.
First of all thank you for all your help, especially Nick McDermaid as you kept trying and trying. I really appreciated your pointers and without them I wouldn't have solved it ( kind of solved it :o) ).
My SSIS Custom components only work when I have a "Success path" coming out of them. This was only an issue on this particular occasion because it was the last component called in my Data Flow.
This could be down to a bug in my SSIS Custom Component but I am sure I have had this issue with other components in the past (I think it might have been the 'Send Mail Task').
If anyone comes across this issue again then I would love to hear from them.
I'm currently fire fighting at work so hadn't had a chance to look at the SSIS Custom Components again.
Once again, thanks for the help I received.
I realize this question is very old, but I thought I'd put in my answer. I just ran into this very issue and the answer was that the SSIS engine didn't see the custom component doing anything so it removed the component at runtime. I was able to get around this by changing the RunInOptimizedMode property of the Control Flow object to False. After this I was able to run the SSIS package as a SQL Agent job.
If you run the package through dtexec.exe as bilinkc suggested in your comments, it should give you messages that make it obvious if this is occurring.

How SSRS deployment works? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
We currently working on an application where we are asked to generate reports. Our immediate choice was to use SSRS. After studying tutorials we successfully completed designing of all reports. However, I was not clear on how to deploy an SSRS Project for displaying them in a GUI environment.
My questions are:
Where should we deploy this project?
If we deploy in IIS, which server will run it?
Does IIS have the capability to run these?
Do we need to run any report server to run these reports?
Please any any clarification regarding these aspects.
I know how to create reports, but I am struggling with the basic concepts of SSRS. I.E. I need more information on how to setup in a production environment.
There are three parts to every report so let's cover those first:
A DataSource which is the connection string or equivalent to talk to a database, service or flat file. This can be contained in the report or shared. Shared matters in that a shared datasource may be used by one or many reports.
A Dataset which is a query, procedure or structure of obtaining data to be used in a report. This may also be contained in a report or shared. Again shared may be used with one or many reports and may be cached on a server.
The report itself. For the most part the RDL language is a proprietary microsoft language based in XML that takes one or many table, matrix, chart or other display elements and presents data that has been formatted for viewing through one or many datasets talking to one or many data sources.
Deployment in the simplest possible way could be the bold at the very bottom if you are familiar with Business Intelligence Development Studio. However there should be some checks done from the top down of a few things checked first:
Do you have an SSRS instance running on a local instance or a server in a domain you can talk to? You need to ensure the Server running SSRS is actually on and working. On the installation computer you should find it quite simply with All Programs>Microsoft SQL Server (vers)>Configuration Tools>Reporting Services Configuration Manager. Once this tool comes up it will attempt to prompt a window with ServerName and Report Server Instance. The default instance is usually MSSQLSERVER for SQL Server Standard or higher.
If this works great, if not you either never installed SSRS or the service is not running.
**If you believe you did it may not be running the service yet. Go back to All Programs>Microsoft SQL Server (vers)>Configuration Tools>SQL Server Configuration Manager. This will show all services that SQL Server is currently running, including SSRS if it was installed correctly. When it comes up go to 'SQL Server Services' on the left pane and you should see the equivalent of 'SQL Server Reporting Services (SQL instance)'. If it is stopped, start it. If it is not there you need to insure the installation of SSRS was successful or may be on another machine.
If 2 was successful you can hit 'Connect' and you now have a few panes on the left. For the time being deployment should focus on two of those panes 'Web Service URL' and 'Report Manager URL'. One is the ACTUAL SERVICE and the other is just a hosting location the user will see. Click on 'Report Manager URL', you should see a virtual directory and then a link like below. Click on this link and you should be able to get in.
http:// (servername)/Reports
If you could not get in it was probably due to you not being the administrator who installed SSRS or an equivalent admin. You need to be an admin on the server that installed SSRS then and click on this site. Once in you need to add relevant users under "Site Settings" in the upper right under Security. You not only need to do this but also under "Folder Settings" Security do this again. If you are deploying and altering reports you will want to be an 'admin' for the first site settings and a 'content manager' for the second. We need to ensure dedicated users can get to this page before continuing so ensure this can be done.
Once you can do above go back to the SSRS config manager and click on 'Web Service URL' on the left pane. You should see a virtual directory, default is 'ReportServer', and an identification section that generally is set to port 80. Below that is an URL that is most commonly. Click this and ensure you can go to this site as well.
http:// (servername)/ReportServer
Did you notice that this url is similar but different to above? This a huge step that a lot of people new to SSRS miss and end up having their whole deployment process not work.
If you can do both URL's above you are now ready to configure a solution for deployment. The easiest method to deploy code to an SSRS server is with the Visual Studio add on labeled 'Business Intelligence Development Studio'. You get this when you should have installed SSRS, however if you are on a different machine you may get this add on with either SQL Server Standard with advanced Tools or SQL Enterprise. To get to this the versioning is weird, they should match the Visual Studio Edition to the SQL Server version EXCEPT FOR SQL 2012, that is on VS 2010. If you are not sure you can again get to this under All Programs>Microsoft SQL Server (vers)>Business Intelligence Development Studio OR SQL Server Data Tools.
Once you have this tool you would open it up and create a new project 'Report Server Project'. There are tutorials on how to work with IDE but I want to focus on deployment so you should generally have one or many projects under a solution. Right click the project and choose properties. For SSRS deployment this is were everything is done. The main properties are as such (I will not go over all, you may have more):
Overwrite Datasets: False is default (should be kept, you may override if need be)
Overwrite DataSources: False is default (same as above)
TargetDatasetFolder: Datasets(you can change if need be)
TargetDataSourceFolder: Data Sources(same as above)
TargetServerURL: (blank)
The main key to SSRS deployment that 80% of people get confused about first is you deploy to the SERVICE NOT THE REPORT MANAGER URL. So you would put in http:// (servername)/ReportServer to the TARGETSERVERURL, not the other one. So many people say that SSRS deployment just will not work for them and it ends up being they did the targeting wrong.
Final step: You can create folders and datasources and even deploy to multiple locations all at once. But be careful, this is a powerful thing to set up and be aware of this. At the top of Visual Studio there is a ribbon for 'Configuration Management' that is by default selected to show the drop down 'Debug'. Click the drop down arrow. You should see one or many projects you have and you can choose to just 'Build' or also choose to check the 'Deploy' option as well. This would help if you wish to build and deploy to multiple environments or perhaps you can set up another configuration for different environments for QA, DEV, PROD, etc here as well.
If you just want to get started from BIDS follow step 6 and just right click a project and choose 'DEPLOY'. This will deploy all shared objects first (but not overwrite if set to false) and then reports. You may also highlight individual items and choose deploy as well.
First you will need to build the folder and then deploy the report.
You will need to set the url and folder in by right clicking the project on the solution explorer. Here you can set the url as well as the folder location.
About half way down this link, there is a step by step visual on how to deploy a report.
http://www.codeproject.com/Articles/194097/SSRS-Series-Part-I-Various-ways-of-Report-creation
I hope that gets you off to a good start!

TFS Requirements Overview Report showing wrong data

I have an interesting issue with TFS reports. When I run the QUERY: Team Queries->Planning and Tracking->Work Breakdown, I see the correct information, which is to say that I see the work items, etc. that are entered into TFS. However, when I run the REPORT: Reports->Project Management->Requirements Overview I see that same data PLUS data that is no longer in the system.
Important information:
* I am using TFS 2010
* When I originally created this project, I used a Microsoft Project plan to upload the work items. Before my team started using it, I decided to forget about Project and just use the web/studio interface, so I used the query "Delete all items" to clean the database.
While the clean worked in all other cases, this report seems to be holding on to those items, and I would like to know if there is a way to fix that. It has been several weeks, and I ran the cube reports to see if it was updating (everything updates fine).
Anyone have a clue what's going on here?
I'm not familiar with the query that you talk about, but if you do a delete of workitems, the delete may not have been propagated to your warehouse (and subsequently the cube). If you have a relatively small number of WorkItems in your TFSWorkItemTracking database, it may be a good idea to rebuild your TFSWarehouse, which will then refresh your cube.
Take a look at the SetupWarehouse.exe command, which should be installed on your Application Tier. This could take anywhere from an hour to a day to run, depending on your version control and work item tracking database, so you may want to do it off hours. It shouldn't affect the day-to-day execution of TFS, just the reports.
The above is for TFS 2008 Only. Per Matthew below, here's the answer for TFS 2010
From what I found SetupWarehouse.exe
no longer exists with TFS2010. In the
Administration Console, under
Application Tier->Reporting, there is
an option called "Start Rebuild".
Using this completely resolved my
problem. Thank you. It should be noted
that there is NO feedback from
clicking on "Start Rebuild". At first
it looked like the admin panel hung,
then it came back without feedback. It
took about an hour for reports to
start working again, which is the only
way I knew it was done.
If you ever get into the situation again where you need to permanently get rid of one or more workitems, you should get the TFS Power Tools. The TFPT utility has a "destroywi" command that allows you to permanently (and safely) remove workitems from TFS.
Power Tools are available here: http://msdn.microsoft.com/en-us/vstudio/bb980963

How can I report on files with pending changes in TFS?

I'd like to create a simple report that shows files that currently have pending changes (checked out) from a TFS 2008 server. I know that I can use the "Find in Source Control" option from Team Explorer, but I would rather generate a reporting services report. Ideally, I'd be able to show when the file was checked out and the user that checked it out, but that's not imperative.
If the data isn't pushed to the TFS data warehouse by default, then I'd like to find the relational table(s) in the SQL Server instance that would need to be queried.
I've spent some time digging around the TFS data warehouse and looking at all of the canned Reporting Services reports that I can get my hands on, but everything seems to be geared towards work items, check-ins associated with work items, etc...
If you're looking for some easy to read data and not too worried about print outs, have a look at the TFS sidekick application by Attrice. Very helpful and if you have the correct permissions, you'll be able to see all the checked out files.
http://www.attrice.info/cm/tfs/
I doubt the information you're looking for is in the data warehouse and even if it was it might not be fresh enough for your purposes. By default the warehouse is updated once an hour.
You could use SSRS to report directly against the TFSVersionControl database but I would not recommend going this route. The database is not documented and chances are very good that it will change in the next version. It could also have performance implications if your queries are not written correctly.
A better solution would be to use the TFS web services as your SSRS data source. There are services you can call to get all files that are checked out. This iformation is always current and the queries it runs are highly optimized.
Example command line (Studio 2008):
"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\tf.exe" status /recursive /user:*