Hi SQL Guru's
I have a automation SQL procedure which calls rs.exe using xp_cmdshell and render the report on the same reporting server as excel. I execute the command from SSMS as below
select GETDATE()exec master..xp_cmdshell 'rs -i\\ReportSrv1\GeneratedFiles\RunReport.rss -shttp://ReportSrv1/ReportServer/reportExecution2005.asmx?WSDL -e Exec2005 -vFileName="f:\GeneratedFiles\test.xls" -vReportPath="/Commissions/Report1" -vExportFormat="EXCEL" -vMimeType="MS-EXCEL" -vRevPer="201312" -vSite="05818" -vSiteEntry="0" '
select GETDATE()
Infrastructure:
Report ServerName: ReportSrv1
Location: Same report server location, f:\ drive
Reports connecting to Server/Database: Srv1->Commart
Ran parallel SQL profiler to Srv1->Commart.
Output:
2014-02-06 11:28:30.193
The command completed successfully
NULL
2014-02-06 11:28:40.907
Output of Profiler Trace:
Start Time: 2014-02-06 11:28:38.900
End Time: 2014-02-06 11:28:40.040
Please see there is a signification delay of 8 seconds to make thedatabase connection, which makes my report to complete in 10 seconds including the database calls.
Why would that 8 second delay happens, I will be running the same report for 3000 parameters which is consuming lot of time although the database calls are pretty stable.
Thanks,
Ganesh
Ganesh