数据源被锁定时如何部署SQL Reporting 2005?

时间:2022-04-22 08:17:38

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.

这里的DBA维护所有SQL Server和SQL Reporting服务器。我在Visual Studio中有一个自定义开发的SQL Reporting 2005项目,该项目在我的本地SQL数据库和报告实例上运行良好。我需要部署到生产服务器,因此我在SQL Reporting 2005服务器上创建了一个文件夹,该文件夹具有上传文件的权限。通常,只需从Visual Studio中进行部署即可上载报告文件。

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.

但是,出于安全考虑,数据源由DBA显式维护,并存储在报告服务器上的单独锁定公共文件夹中。我让他们为我创建数据源。

When I attempt to deploy from VS, it gives me the error

当我尝试从VS部署时,它给了我错误

The item '/Data Sources' already exists.

项目'/ Data Sources'已经存在。

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.

无论我是部署整个项目还是仅部署一个报告文件,我都会得到这个。我已经在项目属性中设置了OverwriteDataSources = false。 TargetServer URL和文件夹验证正确。

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?

我想我可以手动复制文件,但我希望能够从VS内部署。我能做错什么?

5 个解决方案

#1


3  

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.

将名为ConnectionString的字符串参数添加到报表中并保存。接下来,在文本编辑器中打开RDL并更改这样的数据源定义。

  <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.

您现在将发现可以将数据库连接字符串作为报告参数传递。请注意不要向您的DBA提及这一点,因为SSRS安全系统中没有规定控制它,当他们发现笼门不仅打开而且无法关闭时,他们会完全疯了。

#2


2  

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.

如果由于数据源的某些安全问题导致部署失败,则删除它,并部署项目的其余部分。即使您在数据源上出错,VS也会部署报告或模型。如果项目仍未部署,则问题不是您的数据源。

#3


1  

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

虽然我不能赞同答案,但我怀疑这是实际发生的事情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.

我遇到了同样的问题,我的DBA现在正在安排我。

#4


0  

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.

您是否检查了将OverwriteDataSource项目属性设置为False的配置?默认配置为活动(DebugLocal),但您可能必须将OverwriteDataSource设置为False以用于其他配置(例如生产)。您可以使用“所有配置”将所有部署的OverwriteDataSource设置强制为False。

#5


0  

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.

这应该只是一个警告(我们的店里也有同样的情况)。我可以想象的唯一方法是这会导致错误,如果您将Visual Studio设置为将警告视为错误(由于错误,它将不会部署)。如果已设置,请尝试更改此选项。

#1


3  

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.

将名为ConnectionString的字符串参数添加到报表中并保存。接下来,在文本编辑器中打开RDL并更改这样的数据源定义。

  <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.

您现在将发现可以将数据库连接字符串作为报告参数传递。请注意不要向您的DBA提及这一点,因为SSRS安全系统中没有规定控制它,当他们发现笼门不仅打开而且无法关闭时,他们会完全疯了。

#2


2  

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.

如果由于数据源的某些安全问题导致部署失败,则删除它,并部署项目的其余部分。即使您在数据源上出错,VS也会部署报告或模型。如果项目仍未部署,则问题不是您的数据源。

#3


1  

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

虽然我不能赞同答案,但我怀疑这是实际发生的事情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.

我遇到了同样的问题,我的DBA现在正在安排我。

#4


0  

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.

您是否检查了将OverwriteDataSource项目属性设置为False的配置?默认配置为活动(DebugLocal),但您可能必须将OverwriteDataSource设置为False以用于其他配置(例如生产)。您可以使用“所有配置”将所有部署的OverwriteDataSource设置强制为False。

#5


0  

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.

这应该只是一个警告(我们的店里也有同样的情况)。我可以想象的唯一方法是这会导致错误,如果您将Visual Studio设置为将警告视为错误(由于错误,它将不会部署)。如果已设置,请尝试更改此选项。