Showing posts with label trace. Show all posts
Showing posts with label trace. Show all posts

Saturday, February 25, 2012

Custom Data Extension Trace

Hi,
could anybody help to figure out what is the correct (recommended) way to
write trace messages for custom data processing extension? I have written
such an extension and I would like to enable trace for it to be able to see
how it performs through the time.
I tried to write trace messages using RSTrace, but I got permission
exception and I guess it means that reporting services prevents to use this
class in different assembly than ReportingServices.Diagnostics.dll.
Then I tried to add trace listener (TextWriterTraceListener) to
<system.diagnostics> section of ReportingServicesService.exe.config file.
Doing so I got an IOException that the target file is used by different
process and report server refuse to start at all.
Is it possible to somhow use System.Diagnostics.Trace in custom data
extension?
Thanks,
MarekI'm not sure, but I'm just guessing you'll need to add some lines to the
rssrvpolicy.config file located here:
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer
Have you done this?
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Marek Zoth" <MarekZoth@.discussions.microsoft.com> wrote in message
news:EE4A6E80-6FDB-4900-8835-5F8117285E6F@.microsoft.com...
> Hi,
> could anybody help to figure out what is the correct (recommended) way to
> write trace messages for custom data processing extension? I have written
> such an extension and I would like to enable trace for it to be able to
> see
> how it performs through the time.
> I tried to write trace messages using RSTrace, but I got permission
> exception and I guess it means that reporting services prevents to use
> this
> class in different assembly than ReportingServices.Diagnostics.dll.
> Then I tried to add trace listener (TextWriterTraceListener) to
> <system.diagnostics> section of ReportingServicesService.exe.config file.
> Doing so I got an IOException that the target file is used by different
> process and report server refuse to start at all.
> Is it possible to somhow use System.Diagnostics.Trace in custom data
> extension?
> Thanks,
> Marek|||Thanks Jeff,
I tried, my extension runs in FullTrust mode and I tried to increase
permissions also for ReportingServices.Diagnostics.dll but no success. The
exception I got is:
--> System.Security.SecurityException: Request for the permission of type
System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at DataExtension.TACommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.ReportProcessing.a0.v()
The state of the failed permission was:
<IPermission
class="System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100272736AD6E5F9586BAC2D531EABC3ACC666C2F8EC879FA94F8F7B0327D2FF2ED523448F83C3D5C5DD2DFC7BC99C5286B2C125117BF5CBE242B9D41750732B2BDFFE649C6EFB8E5526D526FDD130095ECDB7BF210809C6CDAD8824FAA9AC0310AC3CBA2AA0523567B2DFA7FE250B30FACBD62D4EC99B94AC47C7D3B28F1F6E4C8"/>
I am not sure what it exactly means but looking to MSDN it seeem to me RS
prevents calling RSTrace. Or am I wrong?
Any idea how to write traces in custom data extensions is appreciated.
Thanks,
M.
"Jeff A. Stucker" wrote:
> I'm not sure, but I'm just guessing you'll need to add some lines to the
> rssrvpolicy.config file located here:
> C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer
> Have you done this?
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "Marek Zoth" <MarekZoth@.discussions.microsoft.com> wrote in message
> news:EE4A6E80-6FDB-4900-8835-5F8117285E6F@.microsoft.com...
> > Hi,
> >
> > could anybody help to figure out what is the correct (recommended) way to
> > write trace messages for custom data processing extension? I have written
> > such an extension and I would like to enable trace for it to be able to
> > see
> > how it performs through the time.
> >
> > I tried to write trace messages using RSTrace, but I got permission
> > exception and I guess it means that reporting services prevents to use
> > this
> > class in different assembly than ReportingServices.Diagnostics.dll.
> >
> > Then I tried to add trace listener (TextWriterTraceListener) to
> > <system.diagnostics> section of ReportingServicesService.exe.config file.
> > Doing so I got an IOException that the target file is used by different
> > process and report server refuse to start at all.
> >
> > Is it possible to somhow use System.Diagnostics.Trace in custom data
> > extension?
> >
> > Thanks,
> >
> > Marek
>
>

Tuesday, February 14, 2012

cursors CPU usage

h
i started trace and found some procedures running in background
1) sp_cursorope
2) sp_cursorfetch and sp_cursorclose.
wot are these system procedures and it runs after every 2-3 mins and taking too much cpu.
any help would be appreciated
SanjayGenerally, those are SP's used by the MDAC client when a cursor is opened to
retrieve data by an application. Have a look at what application is being
used at the time. Maybe that application needs tuning.
Those 3 are Extended SP's that are shipped with SQL as standard and can not
be changed.
Cheers
--
Mike Epprecht, Microsoft SQL Server MVP
Epprecht Consulting (PTY) LTD
Johannesburg, South Africa
Mobile: +27-82-552-0268
IM: mike@.NOSPAMepprecht.net
Specialist SQL Server Solutions and Consulting
"sanjay" <anonymous@.discussions.microsoft.com> wrote in message
news:59A038C1-4F19-4AD0-8FD2-440ECEDF008E@.microsoft.com...
> hi
> i started trace and found some procedures running in background.
> 1) sp_cursoropen
> 2) sp_cursorfetch and sp_cursorclose..
> wot are these system procedures and it runs after every 2-3 mins and
taking too much cpu..
> any help would be appreciated.
> Sanjay|||hi mike,
i checked the application..but this sp's run continously after every 2-3 mins and there are no background processes running on..
do they utilise cpu..as site is working too slow..
can we avoid them'
regards
sanjay|||These stored procedures are being called on the behalf of
the application. For instance, if your application
executes a query "select field1, field2,... from table1",
the ADO drivers are converting this to the three cursor
stored procedure calls. Essentially what is happening is
that the first one, sp_cursoropen executes the query
storing the results in a server side cursor (sort of a
temp table), and the sequence of sp_cursorfetch's return
the rows to the application on the client side.
sp_cursorclose closes the server side cursor.
This is usually the result of an application written to
use the defaults when populating an ADO recordset. It
becomes very inefficient if you have a large number of
rows to return, since the default is to return one row to
the client for each execution of the sp_cursorfetch
stored proc. If the third parameter for sp_cursorfetch
is 1 (one), then you are seeing this default behavior.
To fix this you would have to recode the application to
use non-default ADO property settings for properties like
cachesize or cursorlocation.
I hope that this helps.
Matthew Bando
BandoM@.CSCTGI(RemoveThis).com
>--Original Message--
>hi mike,
> i checked the application..but this sp's run
continously after every 2-3 mins and there are no
background processes running on..
>do they utilise cpu..as site is working too slow..
>can we avoid them'
>regards
>sanjay
>.
>