views:

1017

answers:

5

The DBAs here maintain all SQL Server and SQL Reporting servers. I have a custom developed SQL Reporting 2005 project in Visual Studio that runs fine on my local SQL Database and Reporting instances. I need to deploy to a production server, so I had a folder created on a SQL Reporting 2005 server with permissions to upload files. Normally, a deploy from within Visual Studio is all that is needed to upload the report files.

However, for security purposes, data sources are maintained explicitly by DBAs and stored in a separated locked down common folder on the reporting server. I had them create the data source for me.

When I attempt to deploy from VS, it gives me the error "The item '/Data Sources' already exists." I get this whether I'm deploying the whole project or just a single report file. I already set OverwriteDataSources=false in the project properties. The TargetServer URL and folder are verified correct.

I suppose I could copy the files manually, but I'd like to be able to deploy from within VS. What could I be doing wrong?

A: 

Did you check the configuration you are setting the OverwriteDataSource project property setting to False? The default Configuration is Active(DebugLocal) but you may have to set the OverwriteDataSource setting to False for another Configuration such as Production. You can use the All Configurations to force the OverwriteDataSource setting to False for all deployments.

Chris Woodruff
+1  A: 

You will receive the warning if the properties on the data source are such that they do not allow you to overwrite the data source. However, the rest of your project or report should deploy. Check the properties of your report and I think that you will find that it is the current version. This is only a warning and this is not fatal to your report deployment.

If your deployment is failing because of some security issue with the data source then delete it and the rest of your project should deploy. VS will deploy the reports or models even if you get an error on the data source. If the project will still not deploy then the problem is not your data source.

ddill65
+1  A: 

Add a string parameter called ConnectionString to your report and save it. Next, open your RDL in a text editor and change the data source definitions like this.

  <DataSources>
    <DataSource Name="preserve the datasource name you've been using">
      <ConnectionProperties>
        <DataProvider>SQL</DataProvider>
        <ConnectString>=Parameters!ConnectionString.Value</ConnectString>
      </ConnectionProperties>
      <rd:DataSourceID>preserve your existing GUID</rd:DataSourceID>
    </DataSource>
  </DataSources>

You will now find that you can pass in the database connection string as a report parameter. Be careful not to mention this to your DBAs because there is no provision in the SSRS security system for controlling this and they will go completely nuts when they discover that not only is the cage door open, it can't be closed.

Peter Wone
Ooooh... That's kind of awesome/evil; I can't decide whether to upvote or downvote. ;)
Matt
Interesting. But they'll shut me down for sure. :)
spoulson
The only way they can shut you down is to uninstall SSRS altogether.
Peter Wone
A: 

Forgive the thread necromancy, but this is what came up in Google.

While I can't take credit for the answer, I suspect this is what's actually going on http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/33423ef3-4a28-4c1d-aded-eac33770659d

I'm having the same problem and my DBA is setting me up now.

Perplexed
The thread you linked to only explains how to overwrite the source or deploy elsewhere. He seems to need to know how to deploy even with this warning.
marr75
A: 

This should only be a warning (We have the same situation at my shop). The only way I can imagine this would cause an error is if you had Visual Studio set to treat warnings as errors (It would then not deploy because of the error). Try changing this option if you have it set.

marr75