Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Friday, March 30, 2012

Resource Accumulation on SQLServer

We have a JDBC project that works with SQLServer, along with other
DBs. During development, we noticed that resource useage on SQLServer
seemed to grow steadily - Processes, Process Locks and/or Object Locks,
according to the "Current Activity" section of Enterprise Manager.
Fairly quickly (a few hours), SQLServer would use so many resources it
used up all available system memory and the system would crash.

Without understanding much about why that was happening, mostly out of
trial and error, we started using transactions, which seemed to fix the
problem. Now, one of our customers seems to be seeing the problem again:

511 Process Locks, 18 Object Locks, 526 Processes

after a few hours. The system runs out of memory and crashes. We have
multiple test configurations, including Linux, Win2K, XP, but we do
not see the same behaviour - we typically see no more than 20 or 30
processes, process locks or object locks, and our tests seem to run
indefinitely. Since we can not reliably reproduce the symptoms that our
customer sees, it is very difficult for us to analyze, let alone, fix
the problem.

Does anyone - especially SQLServer pros - have any insight as to what is
going on here and/or how to fix it? Like how does a process, process
lock or object lock relate to JDBC? process <-> connection,
object <-> row, table... or what, locks?

Thanks,
Gary Whitten
whitteng@.con2inc.comGary Whitten wrote:
> We have a JDBC project that works with SQLServer, along with other
> DBs. During development, we noticed that resource useage on SQLServer
> seemed to grow steadily - Processes, Process Locks and/or Object Locks,
> according to the "Current Activity" section of Enterprise Manager.
> Fairly quickly (a few hours), SQLServer would use so many resources it
> used up all available system memory and the system would crash.
> Without understanding much about why that was happening, mostly out of
> trial and error, we started using transactions, which seemed to fix the
> problem. Now, one of our customers seems to be seeing the problem again:
> 511 Process Locks, 18 Object Locks, 526 Processes
> after a few hours. The system runs out of memory and crashes. We have
> multiple test configurations, including Linux, Win2K, XP, but we do
> not see the same behaviour - we typically see no more than 20 or 30
> processes, process locks or object locks, and our tests seem to run
> indefinitely. Since we can not reliably reproduce the symptoms that our
> customer sees, it is very difficult for us to analyze, let alone, fix
> the problem.
> Does anyone - especially SQLServer pros - have any insight as to what is
> going on here and/or how to fix it? Like how does a process, process
> lock or object lock relate to JDBC? process <-> connection,
> object <-> row, table... or what, locks?

Check that your application is closing Connections, Statements and
ResultSet after they have been used (also when exceptions has occurred)
In SQL server every connection get process id and to me 511
processes/connections sounds a lot.

I saw similar kind of problems at one application and reason was that
developer didn't close resultset's everytime, when he got Exception he
didn't close ResultSets.

- Sampsa

--
--------------
// Sampsa Sohlman //
// My email can be found on my homepage //
// http://sampsa.sohlman.com //
--------------|||[posted and mailed, please reply in news]

Gary Whitten (whitteng@.con2inc.com) writes:
> We have a JDBC project that works with SQLServer, along with other
> DBs. During development, we noticed that resource useage on SQLServer
> seemed to grow steadily - Processes, Process Locks and/or Object Locks,
> according to the "Current Activity" section of Enterprise Manager.
> Fairly quickly (a few hours), SQLServer would use so many resources it
> used up all available system memory and the system would crash.

Hm, what do you mean with "crashes"? If you exhaust some resource, I
would rather expect SQL Server kill a connection, or refuse to let
someone in, but I would not expect it to crash.

One thing I should point out from the beginning: the fact that SQL Server
grabs about all available memory on the machine is perfectly normal. It
thinks that the more data it can have in cache, the better.

That said, if the number of locks accumulate, then you might have a problem.

> Without understanding much about why that was happening, mostly out of
> trial and error, we started using transactions, which seemed to fix the
> problem. Now, one of our customers seems to be seeing the problem again:
> 511 Process Locks, 18 Object Locks, 526 Processes

I don't know what a "process lock" is, but I get the feeling that you've
been running the Performance Monitor; I never run that tool myself. I
would guess it is a lock on the current database, which about every
process has. Thus, nothing to lose sleep over.

18 object locks is not very much at all. It seems like an idle database.

So is 526 connections bad or not? I can't tell, because I don't know
your application. But assuming that you expect a far lower number, you
may need to review how you close connections. (But since I don't know
JDBC or Java, I can tell about the client-side parts here.) The connections
may just be oprhans. Sampsa suggested that you may not close result sets,
but if you had failed to get all data, I would expect a lot more object
locks.

A shot from the hip, is that you should look into to issue SET NOCOUNT
ON when you open your connections. If you are using stored procedures,
but that in your SPs. Without SET NOCOUNT ON, you get empty resultsets
with the row count for INSERT/DELETE/UPDATE statements; these could be
the culprits.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Wednesday, March 21, 2012

Reserved Error importing Access 2003 Report into VS2005 Report Module, How do I troublesho

Hi,
I'm trying to Import an existing Access 2003 report into into an existing
VS2005 Report Project, I am getting the following error. Is there a way to
troubleshoot what is causing this error?
Importing reports from 'C:\db2.mdb'...
Error : An error occurred while the report Test Report Form was being
imported: Reserved ErrorWe ran across a few reports with this issue. I reviewed my notes but didn't
come up with anything.
I found this in a group:
2 From: Albert Yen [MSFT] - view profile
Date: Tues, Jul 26 2005 3:51 pm
Email: "Albert Yen [MSFT]" <albe...@.online.microsoft.com>
Groups: microsoft.public.sqlserver.reportingsvcs
Not yet ratedRating:
show options
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse | Find messages by this author
The first error could be coming from Access. Could you try the following?
Open your database in Microsoft Access. Create a new Module and paste the
following code into it:
Sub Export()
Application.ExportXML ObjectType:=acExportReport, _
DataSource:="DailySales ", _
ImageTarget:=".", _
PresentationTarget:="DailySales .xsl", _
OtherFlags:=acPersistReportML
End Sub
Set the cursor at the beginning of the Sub and click the Run button. If
ExportXML succeeds, it should create a file called "DailySales_report.xml"
in your "My Documents" folder. If you can send the file to me, I'll look at
it. If ExportXML fails, then it's an Access problem. You could try the
Access newsgroups for help.
Albert Yen
SQL Server Reporting Services
Steve MunLeeuw
"Rob Dob" <robdob20012002@.yahoo.com> wrote in message
news:u8Pq0zJ7GHA.4708@.TK2MSFTNGP05.phx.gbl...
> Hi,
> I'm trying to Import an existing Access 2003 report into into an existing
> VS2005 Report Project, I am getting the following error. Is there a way
> to troubleshoot what is causing this error?
> Importing reports from 'C:\db2.mdb'...
> Error : An error occurred while the report Test Report Form was being
> imported: Reserved Error
>

Monday, March 12, 2012

Request Length Exceeded

I am working in Visual Studio 2005. I have a Report Model project with a
data source, a data source view which contains all of the tables in my
database (SQL Server 2005), and a Report Model that contains the items that I
want the users to be able to work with.
When I deploy the project, I get the following error:
Error 2 System.Web.Services.Protocols.SoapException: There was an exception
running the extensions specified in the config file. -->
System.Web.HttpException: Maximum request length exceeded. at
System.Web.HttpRequest.GetEntireRawContent() at
System.Web.HttpRequest.get_InputStream() at
System.Web.Services.Protocols.SoapServerProtocol.Initialize() -- End of
inner exception stack trace -- at
System.Web.Services.Protocols.SoapServerProtocol.Initialize() at
System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing) c:\crimson\wmsdev\vbapps2005\desktopweb\wmsreportmodels\CrimsonWMS.smdl 0 0
How do I fix it?
Thank you,
Mark LauserHi, Mark
It sounds like your report model file is kinda large so when you
upload/deploy it to the server, the asp.net http request times out before the
file is fully uploaded (it uses the web service).
You are gonna have to change the value in the maxRequestLength attribute of
the httpRuntime element in the web.config file of your ReportServer and
Report Manager so it doesn't time out. The default size is 4096 KB (4 MB),
but I bet your file is much larger, so change it to something like:
<httpRuntime ... maxRequestLength="151200" .../>
Hope this helps you!
--
Regards,
Thiago Silva
"Mark Lauser" wrote:
> I am working in Visual Studio 2005. I have a Report Model project with a
> data source, a data source view which contains all of the tables in my
> database (SQL Server 2005), and a Report Model that contains the items that I
> want the users to be able to work with.
> When I deploy the project, I get the following error:
> Error 2 System.Web.Services.Protocols.SoapException: There was an exception
> running the extensions specified in the config file. -->
> System.Web.HttpException: Maximum request length exceeded. at
> System.Web.HttpRequest.GetEntireRawContent() at
> System.Web.HttpRequest.get_InputStream() at
> System.Web.Services.Protocols.SoapServerProtocol.Initialize() -- End of
> inner exception stack trace -- at
> System.Web.Services.Protocols.SoapServerProtocol.Initialize() at
> System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
> HttpContext context, HttpRequest request, HttpResponse response, Boolean&
> abortProcessing) c:\crimson\wmsdev\vbapps2005\desktopweb\wmsreportmodels\CrimsonWMS.smdl 0 0
> How do I fix it?
> Thank you,
> Mark Lauser|||Thanks, that worked. My problem was that my web.config file didn't have a
maxRequestLength attribute for the httpRuntime element, so my 'Find' didn't
find anything. Now that I know where it is supposed to be, I added the
attribute and it worked fine.
There must be a default that is used when the attribute is not present.
Thanks again!
Mark Lauser
"HC" wrote:
> Hi, Mark
> It sounds like your report model file is kinda large so when you
> upload/deploy it to the server, the asp.net http request times out before the
> file is fully uploaded (it uses the web service).
> You are gonna have to change the value in the maxRequestLength attribute of
> the httpRuntime element in the web.config file of your ReportServer and
> Report Manager so it doesn't time out. The default size is 4096 KB (4 MB),
> but I bet your file is much larger, so change it to something like:
> <httpRuntime ... maxRequestLength="151200" .../>
> Hope this helps you!
> --
> Regards,
> Thiago Silva
> "Mark Lauser" wrote:
> > I am working in Visual Studio 2005. I have a Report Model project with a
> > data source, a data source view which contains all of the tables in my
> > database (SQL Server 2005), and a Report Model that contains the items that I
> > want the users to be able to work with.
> >
> > When I deploy the project, I get the following error:
> >
> > Error 2 System.Web.Services.Protocols.SoapException: There was an exception
> > running the extensions specified in the config file. -->
> > System.Web.HttpException: Maximum request length exceeded. at
> > System.Web.HttpRequest.GetEntireRawContent() at
> > System.Web.HttpRequest.get_InputStream() at
> > System.Web.Services.Protocols.SoapServerProtocol.Initialize() -- End of
> > inner exception stack trace -- at
> > System.Web.Services.Protocols.SoapServerProtocol.Initialize() at
> > System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
> > HttpContext context, HttpRequest request, HttpResponse response, Boolean&
> > abortProcessing) c:\crimson\wmsdev\vbapps2005\desktopweb\wmsreportmodels\CrimsonWMS.smdl 0 0
> >
> > How do I fix it?
> >
> > Thank you,
> > Mark Lauser|||Yeah, the default is in the machine.config file
(C:\WINDOWS\Microsoft.NET\Framework\[VERSION_NUMBER]\CONFIG).
The aspnet engine follows a hierarchy of config files. If it doesn't
find a setting in the inner-most config, it will keep searching up the
hierarchy until it finds it.
Most settings are defined with a default in the machine.config file.
So if you don't override a setting in your application folder's
web.config, it will use whatever is defined in the machine.config file.
Regards,
Thiago Silva|||Thanks, that makes sense.
My problem was further complicated by the fact that there was no
maxRequestLength in my machine.config for the version of the .net framework
that I am working in. It must have defaulted all the way up the hierarchy.
I noticed that the notes in the file say to only include a setting if you
want to override the default (for better performance).
Best Regards,
Mark Lauser
"tafs7" wrote:
> Yeah, the default is in the machine.config file
> (C:\WINDOWS\Microsoft.NET\Framework\[VERSION_NUMBER]\CONFIG).
> The aspnet engine follows a hierarchy of config files. If it doesn't
> find a setting in the inner-most config, it will keep searching up the
> hierarchy until it finds it.
> Most settings are defined with a default in the machine.config file.
> So if you don't override a setting in your application folder's
> web.config, it will use whatever is defined in the machine.config file.
> Regards,
> Thiago Silva
>

Request for the permission of type System.Data.SqlClien

I got this message when running the same project at my work which I worked on
at home without encountering it. Thanks for the help.
Request for the permission of type System.Data.SqlClienAdditional
information: Request for the permission of type
System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
bic
Seems that sou didnt approve SQLServer Client to run in the special context
you are using it (wheter you use it with Biztalk or Sharepoint or etc..). It
depends on the type of underlying application you are using, in sharepoint
you have to configure a configfile, in other enviroments you have to set
..NET security for that. (Perhaps at home you have assigned Fulltrust --> To
all and in the comapany there is a domain policy which dont allow any
assemblies to run until they are aproced by some security administrator)
If you have further questions just raise a hand ;-)
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"bic" <bic@.discussions.microsoft.com> schrieb im Newsbeitrag
news:825EDB65-0534-4A1C-B343-DAE786D8E601@.microsoft.com...
>I got this message when running the same project at my work which I worked
>on
> at home without encountering it. Thanks for the help.
> Request for the permission of type System.Data.SqlClienAdditional
> information: Request for the permission of type
> System.Data.SqlClient.SqlClientPermission, System.Data,
> Version=1.0.5000.0,
> Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
> --
> bic

Request for the permission of type System.Data.SqlClien

I got this message when running the same project at my work which I worked o
n
at home without encountering it. Thanks for the help.
Request for the permission of type System.Data.SqlClienAdditional
information: Request for the permission of type
System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
--
bicSeems that sou didnt approve SQLServer Client to run in the special context
you are using it (wheter you use it with Biztalk or Sharepoint or etc..). It
depends on the type of underlying application you are using, in sharepoint
you have to configure a configfile, in other enviroments you have to set
.NET security for that. (Perhaps at home you have assigned Fulltrust --> To
all and in the comapany there is a domain policy which dont allow any
assemblies to run until they are aproced by some security administrator)
If you have further questions just raise a hand ;-)
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"bic" <bic@.discussions.microsoft.com> schrieb im Newsbeitrag
news:825EDB65-0534-4A1C-B343-DAE786D8E601@.microsoft.com...
>I got this message when running the same project at my work which I worked
>on
> at home without encountering it. Thanks for the help.
> Request for the permission of type System.Data.SqlClienAdditional
> information: Request for the permission of type
> System.Data.SqlClient.SqlClientPermission, System.Data,
> Version=1.0.5000.0,
> Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
> --
> bic

Wednesday, March 7, 2012

Reprocessing Errors after using the migrationwizard

Hello,

I have converted a AS2000 project to AS2005 using the migrationwizard. All went well, unfortunately I get the following errors when I try to reprocess in AS2005 and I have no idea how to fix them. Does anybody have an idea what I can do ? The first error seems like there is something wrong in my DB with type matching, but it doesn't say where.

Errors in the high-level relational engine. The following exception occurred while an operation was being performed on a data source view: Parent Columns and Child Columns don't have type-matching columns..

Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Taak', Name of 'Taak' was being processed.

Errors in the OLAP storage engine: An error occurred while the 'Subtaak attribute' attribute of the 'Taak' dimension from the 'DIMSCUBE1' database was being processed.

Are any of your keys TinyInts with IDENTITY clauses on them?
If so, this is a known restriction of SQLXML (which we are using under the covers). It converts all IDENTITY columns to full integers (and thus you are getting a datatype mismatch. Using either a VIEW or a DSV named query (or computed column) convert the keys (both the PK and the FK parent column) to integers and see what happens.

_-_-_ Dave

Tuesday, February 21, 2012

ReportViewerWebControl Problem in ASP.net 2.0

hi,

i have used one of the project ReportViewer Web Control , it works fine in local system, but when i put into the server it say

Reserved.ReportViewerWebControl.axd was not found on this server.,

to rectify

i putted blank Reserved.ReportViewerWebControl.axd file into root of the project and i checked

in config file

<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
validate="false" />
</httpHandlers>

this is exist ,

Please can any body help me , i will be thankful to you .

thanks

Dipesh

Hi Dipesh,

You should have report viewer installed on your web server in order to make the report viewer in your pages to work.

Install theMicrosoft Report Viewer Redistributable 2005 SP1 (Full Installation), you can download it from -http://www.microsoft.com/downloads/details.aspx?familyid=E7D661BA-DC95-4EB3-8916-3E31340DDC2C&displaylang=en

and I am having these two setions related to report viewer -

<compilationdebug="true">

<buildProviders>

<addextension=".rdlc"type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

</buildProviders>

</compilation>

<httpHandlers>

<addpath="Reserved.ReportViewerWebControl.axd"verb="*"type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"validate="false"/>

</httpHandlers>

I think it will solve your problem....