使用批处理文件上传rdl

时间:2016-03-22 04:00:33

标签: batch-file reporting-services rss ssrs-2008

我试图通过批量上传rdl,因为我有50个rdl上传到报表服务器。我面临的一个问题是无法通过.rss文件连接到报表服务器,它通过“无法连接到服务器:http://localhost/reportserver_vessel/ReportService2005.asmx”这样的错误

.rss文件的链接:https://drive.google.com/file/d/0Bx2Wo7aMwL3yeDEwT3RBcTd6cW8/view?usp=sharing

批处理文件如下:

 @echo off
::Script Variables
SET LOGFILE="RS Scripter log.txt"
SET SCRIPTLOCATION=C:\SSRS Scripts\PrefixTrendReports
SET REPORTSERVER=http://localhost/reportserver_vessel
SET RS="C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\rs.exe"
SET TIMEOUT=60

::Clear Log file
IF EXIST %logfile% DEL %logfile%

::Write Log Header
ECHO Reporting Services Scripter Load Log >>%LOGFILE%
ECHO. >>%LOGFILE%
ECHO Starting Load at %DATE% %TIME% >>%LOGFILE%
ECHO SCRIPTLOCATION = %SCRIPTLOCATION% >>%LOGFILE%
ECHO REPORTSERVER   = %REPORTSERVER% >>%LOGFILE%
ECHO BACKUPLOCATION = %BACKUPLOCATION% >>%LOGFILE%
ECHO SCRIPTLEVEL    = SQL2005 >>%LOGFILE%
ECHO TIMEOUT        = %TIMEOUT% >>%LOGFILE%
ECHO RS             = %rs% >>%LOGFILE%
ECHO. >>%LOGFILE%

::Run Scripts

%rs% -i "%SCRIPTLOCATION%\TrendReports.rss" -s %REPORTSERVER% -l %TIMEOUT% -v REGIONFOLDER="" -v PARENTFOLDER="CrewingReports" -v RDLNAME="rptPurchaseDetails" -v DATASOURCE="localhost\vessel" >>%LOGFILE% 2>&1
ECHO. >>%LOGFILE%


ECHO. >>%LOGFILE%
ECHO Finished Load at %DATE% %TIME% >>%LOGFILE%
ECHO. >>%LOGFILE%

提前感谢。

0 个答案:

没有答案