Showing posts with label execution. Show all posts
Showing posts with label execution. Show all posts

Thursday, March 29, 2012

Getting a Package's ExecutionID

Hello everyone

I'm logging the execution of my package into a SQL SERVER table. Everything works right. I'm also executing this package using a web service, I'd like to retrive the package's executionId after it is executed. By the way, i'm using a Microsft.SqlServer.Dts.Runtime.Package object but i haven't found any property that could give this.

any clue?

thanks a lotHave you searched this forum for executionID? There has been many threads around this topic and the current version of SSIS' shortcomings with respect to logging the execution ID.|||There is a system variable ExecutionId. Try that for now, not sure if the value is available post execution, but would seem sensible.|||I mean there is a system variable called ExecutionInstanceGUID which is the same value as you get logged in the sysdtslog90 table.

Tuesday, March 27, 2012

Getting a 404/401 on a long running report

Greetings.
I have a report that I am running through ASP.Net with the rs.render method.
When I have a longer date range, the execution time of the query gets longer
and I start to get funky errors. Namely, at around 3 minutes, I get
prompted for network credentials by the standard IE prompt. It doesn't
accept what they are, and after a few times, it takes me to a 404 saying that
the page can't be found. If I try to cancel the prompt, I get a 401 that I
don't have access. I'm not sure what else to look at here. This report has
worked fine in the past, and there are no problems if I just scale back the
date range.
I have the render make a pdf file in a virtual directory on my web server
and then my postback page has a client script inserted to open a window
showing that pdf file.
Anyone have any ideas?
Dale.I fixed it.
It turns out that the HTTP connection timeout settings needed to be
increased a little bit to allow the report to complete. The default of 120
seconds had worked fine in IIS 5 on Windows 2000 Server, but the same value
in IIS 6 on Windows 2003 Server didn't fare too well.
Also, I wound up re-writing the stored proc for the report. The original
author of it had cursors and correlated subqueries doing things they were
never intended to do. Execution time is now 33s instead of 10m15s.
:-)
"Dale M." wrote:
> Greetings.
> I have a report that I am running through ASP.Net with the rs.render method.
> When I have a longer date range, the execution time of the query gets longer
> and I start to get funky errors. Namely, at around 3 minutes, I get
> prompted for network credentials by the standard IE prompt. It doesn't
> accept what they are, and after a few times, it takes me to a 404 saying that
> the page can't be found. If I try to cancel the prompt, I get a 401 that I
> don't have access. I'm not sure what else to look at here. This report has
> worked fine in the past, and there are no problems if I just scale back the
> date range.
> I have the render make a pdf file in a virtual directory on my web server
> and then my postback page has a client script inserted to open a window
> showing that pdf file.
> Anyone have any ideas?
> Dale.

Wednesday, March 21, 2012

Get/SetExecutionOptions question

Can Get/SetExecutionOptions really get/set all the Execution properties that
are available via Report Manager? As far as I can see I can set a report to
Live or Snapshot and set a schedule if Snapshot. How do I retrieve the
setting " Cache a temporary copy of the report. Expire copy of report after
a number of minutes" for example ? This comes back as
ExecutionSettingEnum.Live but I can't see how to get the number of minutes?
Same if the expiry is based on a schedule - it does not get populated when
Live. I need to script these settings but can't see how to do this?
--
Cheers,
JasIf execution is set to Live, use GetCacheOptions method to get expiration
definition:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_3cq8.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:%23FuGijFFFHA.2572@.tk2msftngp13.phx.gbl...
> Can Get/SetExecutionOptions really get/set all the Execution properties
> that are available via Report Manager? As far as I can see I can set a
> report to Live or Snapshot and set a schedule if Snapshot. How do I
> retrieve the setting " Cache a temporary copy of the report. Expire copy
> of report after a number of minutes" for example ? This comes back as
> ExecutionSettingEnum.Live but I can't see how to get the number of
> minutes? Same if the expiry is based on a schedule - it does not get
> populated when Live. I need to script these settings but can't see how to
> do this?
> --
> Cheers,
> Jas
>
>|||Perfect, I completely missed that method :-)
--
Cheers,
Jas
"Lev Semenets [MSFT]" <levs@.microsoft.com> wrote in message
news:OdPCASLFFHA.3972@.TK2MSFTNGP15.phx.gbl...
> If execution is set to Live, use GetCacheOptions method to get expiration
> definition:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_3cq8.asp
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> "Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
> news:%23FuGijFFFHA.2572@.tk2msftngp13.phx.gbl...
>> Can Get/SetExecutionOptions really get/set all the Execution properties
>> that are available via Report Manager? As far as I can see I can set a
>> report to Live or Snapshot and set a schedule if Snapshot. How do I
>> retrieve the setting " Cache a temporary copy of the report. Expire copy
>> of report after a number of minutes" for example ? This comes back as
>> ExecutionSettingEnum.Live but I can't see how to get the number of
>> minutes? Same if the expiry is based on a schedule - it does not get
>> populated when Live. I need to script these settings but can't see how to
>> do this?
>> --
>> Cheers,
>> Jas
>>
>

Sunday, February 26, 2012

Get SessionID

How can I get the sessionID for a particular execution. I know the report
server automatically generates a sessionID for each execution, but I need to
grab tht as I use that in my processing of stored procedures.
ThanksIf you render the report by SOAP, the SessionID will be exposed as property
of the RS Web service proxy (rs.SessionHeaderValue.SessionId). Look at the
code example for ReportingService.Render method in BOL.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"NI" <NI@.discussions.microsoft.com> wrote in message
news:14649E15-AD50-4AA6-A635-F1C00B3A31E2@.microsoft.com...
> How can I get the sessionID for a particular execution. I know the report
> server automatically generates a sessionID for each execution, but I need
to
> grab tht as I use that in my processing of stored procedures.
> Thanks|||Grab it from where? From inside your report? The session id is passed as a
session cookie to the browser and ping-pongs between the browser and the
server with each request.
For example, you do some tracing between the browser and the Report Server
when a report is requested by URL, you will see something like:
/<folderpath>/<reportname>=vazffvza1iojxlbtqp4nwged
In my case, vazffvza1iojxlbtqp4nwged is the session id. If you need to get
from inside your report try to parse the HttpContext.Current to get to the
cookie value
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"NI" <NI@.discussions.microsoft.com> wrote in message
news:64288C18-CF50-43A9-B8FA-331557612F41@.microsoft.com...
> Teo:
> I just use the reporting services just as it comes out of the box. All my
> report generation is through the report manager(and not through web
service
> access). In this situation how can I grab a sessionID?
> Thanks
> "Teo Lachev" wrote:
> > If you render the report by SOAP, the SessionID will be exposed as
property
> > of the RS Web service proxy (rs.SessionHeaderValue.SessionId). Look at
the
> > code example for ReportingService.Render method in BOL.
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "NI" <NI@.discussions.microsoft.com> wrote in message
> > news:14649E15-AD50-4AA6-A635-F1C00B3A31E2@.microsoft.com...
> > > How can I get the sessionID for a particular execution. I know the
report
> > > server automatically generates a sessionID for each execution, but I
need
> > to
> > > grab tht as I use that in my processing of stored procedures.
> > >
> > > Thanks
> >
> >
> >|||Let's back up a little. You say that you are passing the session id to your
stored procedure. What is it that you are using the session id for? If what
you want to know is who is running the report then you can pass the global
variable user!userid to the stored procedure.
It would seem to me that the sessionid will mean nothing outside of RS.
Bruce L-C
"NI" <NI@.discussions.microsoft.com> wrote in message
news:2268528A-FA6E-40E2-AF2F-4A6371E1ACBC@.microsoft.com...
> Maybe am missing something here, but how can I use HttpContext.Current
when
> all i have is a bunch of rdl files. I DO NOT have any classic ASP.NEt
pages.
> I just have a few rdl files deployed on my report manager.
> when i go to the reportmanager, and browse thru a few folders and get to
my
> report (report1.rdl)
> http://localhost/reports/(sessiondID)/<report folder>...
> Before I select my parameters and click view report, I need to get this
> sessionID and send it to a stored procedure.
> Thanks. Really appreciate the help
>
> "Teo Lachev" wrote:
> > Grab it from where? From inside your report? The session id is passed as
a
> > session cookie to the browser and ping-pongs between the browser and the
> > server with each request.
> >
> > For example, you do some tracing between the browser and the Report
Server
> > when a report is requested by URL, you will see something like:
> >
> > /<folderpath>/<reportname>=vazffvza1iojxlbtqp4nwged
> >
> > In my case, vazffvza1iojxlbtqp4nwged is the session id. If you need to
get
> > from inside your report try to parse the HttpContext.Current to get to
the
> > cookie value
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "NI" <NI@.discussions.microsoft.com> wrote in message
> > news:64288C18-CF50-43A9-B8FA-331557612F41@.microsoft.com...
> > > Teo:
> > >
> > > I just use the reporting services just as it comes out of the box. All
my
> > > report generation is through the report manager(and not through web
> > service
> > > access). In this situation how can I grab a sessionID?
> > >
> > > Thanks
> > >
> > > "Teo Lachev" wrote:
> > >
> > > > If you render the report by SOAP, the SessionID will be exposed as
> > property
> > > > of the RS Web service proxy (rs.SessionHeaderValue.SessionId). Look
at
> > the
> > > > code example for ReportingService.Render method in BOL.
> > > >
> > > > --
> > > > Hope this helps.
> > > >
> > > > ----
> > > > Teo Lachev, MCSD, MCT
> > > > Author: "Microsoft Reporting Services in Action"
> > > > Publisher website: http://www.manning.com/lachev
> > > > Buy it from Amazon.com: http://shrinkster.com/eq
> > > > Home page and blog: http://www.prologika.com/
> > > > ----
> > > >
> > > > "NI" <NI@.discussions.microsoft.com> wrote in message
> > > > news:14649E15-AD50-4AA6-A635-F1C00B3A31E2@.microsoft.com...
> > > > > How can I get the sessionID for a particular execution. I know the
> > report
> > > > > server automatically generates a sessionID for each execution, but
I
> > need
> > > > to
> > > > > grab tht as I use that in my processing of stored procedures.
> > > > >
> > > > > Thanks
> > > >
> > > >
> > > >
> >
> >
> >|||OK, think of the Report Server is just a web-based application. In your
report you can call custom code located inside your report or in an external
.NET assembly. There, you can get to HttpContect.Current.
Of course, this is not going to work when testing your report within the
Report Designer. So, you need to check if HttpContext.Current is null and,
if yes, default to a dummy session id.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"NI" <NI@.discussions.microsoft.com> wrote in message
news:2268528A-FA6E-40E2-AF2F-4A6371E1ACBC@.microsoft.com...
> Maybe am missing something here, but how can I use HttpContext.Current
when
> all i have is a bunch of rdl files. I DO NOT have any classic ASP.NEt
pages.
> I just have a few rdl files deployed on my report manager.
> when i go to the reportmanager, and browse thru a few folders and get to
my
> report (report1.rdl)
> http://localhost/reports/(sessiondID)/<report folder>...
> Before I select my parameters and click view report, I need to get this
> sessionID and send it to a stored procedure.
> Thanks. Really appreciate the help
>
> "Teo Lachev" wrote:
> > Grab it from where? From inside your report? The session id is passed as
a
> > session cookie to the browser and ping-pongs between the browser and the
> > server with each request.
> >
> > For example, you do some tracing between the browser and the Report
Server
> > when a report is requested by URL, you will see something like:
> >
> > /<folderpath>/<reportname>=vazffvza1iojxlbtqp4nwged
> >
> > In my case, vazffvza1iojxlbtqp4nwged is the session id. If you need to
get
> > from inside your report try to parse the HttpContext.Current to get to
the
> > cookie value
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "NI" <NI@.discussions.microsoft.com> wrote in message
> > news:64288C18-CF50-43A9-B8FA-331557612F41@.microsoft.com...
> > > Teo:
> > >
> > > I just use the reporting services just as it comes out of the box. All
my
> > > report generation is through the report manager(and not through web
> > service
> > > access). In this situation how can I grab a sessionID?
> > >
> > > Thanks
> > >
> > > "Teo Lachev" wrote:
> > >
> > > > If you render the report by SOAP, the SessionID will be exposed as
> > property
> > > > of the RS Web service proxy (rs.SessionHeaderValue.SessionId). Look
at
> > the
> > > > code example for ReportingService.Render method in BOL.
> > > >
> > > > --
> > > > Hope this helps.
> > > >
> > > > ----
> > > > Teo Lachev, MCSD, MCT
> > > > Author: "Microsoft Reporting Services in Action"
> > > > Publisher website: http://www.manning.com/lachev
> > > > Buy it from Amazon.com: http://shrinkster.com/eq
> > > > Home page and blog: http://www.prologika.com/
> > > > ----
> > > >
> > > > "NI" <NI@.discussions.microsoft.com> wrote in message
> > > > news:14649E15-AD50-4AA6-A635-F1C00B3A31E2@.microsoft.com...
> > > > > How can I get the sessionID for a particular execution. I know the
> > report
> > > > > server automatically generates a sessionID for each execution, but
I
> > need
> > > > to
> > > > > grab tht as I use that in my processing of stored procedures.
> > > > >
> > > > > Thanks
> > > >
> > > >
> > > >
> >
> >
> >