.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

How can i findout why this occurs

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :Sql Server
I am performing backend ( SQL Server2008) stress testing using VSTS2008.TI have a web application which pointing to  CRM DB(SQL Server2008). My Approach is: 1.Seaching an item from the portal. 2.Log in to the DB Server and capture the Stored Procedure from the SQL Server Profiler. 3.I am using that stored procedure to create a DB Unit test. 4.Using this Db Unit test, i am creating a load test. 5.I have run the load test for 200 ,100 and 50 Virtual users.Each time i am getting below errors Error 1:DatabaseUnitTest1.DatabaseTest1 threw exception: System.Data.SqlClient.SqlException: The query processor could not start the necessary thread resources for parallel query execution.(error Count 1000) Error 2:More than 1000 errors of type 'TestError' and sub type 'TestError' have occurred; additional errors of this type will not be reported. So, 1.How can i findout why this occurs. 2.How i will find  the threshold beyond which the number of connection error start showing up in CRM DB. 3.What can be done to fix/tuning?

View Complete Post

More Related Resource Links

Maximum memory for string ? . System.MemoryOutOfException Occurs when reading the Content of the fil



I have a C++ code which reads a file [vtk file - its similar to text file only]. and try to store it in string.

here's the code:

String^ ParallelProjectionRenderer::GetVolumeDataAsString(String^ FileName)

    vtkSmartPointer<vtkDataSetWriter> sWriter = vtkSmartPointer<vtkDataSetWriter>::New();

    String^ FileName = "D:\\Users\\...";

    char * sptName = static_cast<char *>(Marshal::StringToHGlobalAnsi(FileName).ToPointer());







    String^ result= File::ReadAllText(FileName);   [it breaks here with system.memoryoutofexception when the file size is huge]

    return result;


this code executes fine when the file size is less than 8mb.

I wanted to know whats the maximum memory allocated to the string.

As a workaround i skipped reading out in C++ code. and i tried to read the file contents in asp.net C# code and stor

determine the best way to refresh a gridview when textchanged event occurs


Good afternoon.

I have the following gridview inside an updatepanel that makes the bind from a datatable:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <asp:Button ID="ButtonAdd" runat="server" OnClick="ButtonAdd_Click" Text="Novo Artigo" />
                <asp:GridView ID="Dados" runat="server" AutoGenerateColumns="False" 
                    CssClass="Grid" Width="100%" CellPadding="4" ForeColor="#333333" 
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        <asp:Button ID="AbrirModal" runat="server" Text="->" /> 
                                <asp:PopupControlExtender ID="PopupControlExtender1" runat="server"

Error "The process cannot access the file ....." occurs while using function "ExportToStream"


Dear all,

   I sometimes get the following error while printing crystal report to pdf:

   System.Runtime.InteropServices.COMException (0x80004005): The process cannot access the file because
it is being used by another process. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export
(ExportOptions pExportOptions, RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream
(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
 at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options) at
 CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType) at
 CommonWA.CommonFunc.GetPDFMemoryStream(DCMSReportDoc _dcmsreportdoc, Boolean& _DataExist) in E:\wwwroot\ASPWA\CommonWA\CommonCom.vb:line 382

  The error not occurs frequently but sometimes it will happen, can someone tell me why the error occurs and how can I solve the problem?

Thank you very much.


CLR "Out of Memory" problem occurs eventually/inevitably

Windows 2003 server Standard edition, 64 bit SQL Server 2005 Developer and Enterprise Edition, 32 bit Servers are configured with 8GB or 32GB of memory (Eight CPUs / cores / whatever, plenty of hard drive space, network latency irrelevant)   Summary: After days of use, CLR memory usage appears to degrade or fragment to a point where “large” runs that had run succesfully now fail with “out of memory” issues. Resetting the server fixes this, but only for a time. Why, and how do we stop this from happening?   Details:  An overview of what we’re doing:  - Web site app calls SQL Server stored procedure “A” in one of several possible databases  - Procedure A calls CRL procedure “B” (Assembly created with CLR permission_set = “safe”). B is stored in a “library” database on the same SQL instance, i.e. there’s only the one copy  - CLR procedure B calls stored procedure “C” (back in the first database, as specified via parameter)  - Procedure C runs and returns three data sets to B. The second data set ranges from large to very large (over 60MB in our extreme cases)  - CLR procedure B performs some severe mathematical processing, returns a single data set to procedure A  - Procedure A slices, dices, and stores the data  - There could be mul

Cannot timeout connections when a network outage occurs

Hi, We are running SQL Server 2008 in a mirrored configuration.  Client access is performed using the Microsoft JDBC 2.0 driver, configured to failover to the Mirror in the event the Primary database is unavailable.  Additionally, the client maintains a database connection pool using Apache DBCP's BasicDataSource.  During testing, we have found that the failover works flawlessly if either the primary Database is taken offline or the primary SQL Server service is stopped - attempts to use existing pooled connections to the primary database fail immediately and new connections are created to the mirror database. However, when simulating a network failure (by disabling the network interface on the SQL Server machine) things aren't so nice.  The client first attempts to use an existing pooled connection to the primary database.  At this point the client hangs for up to 15 minutes before failing with the following error: Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Connection timed out         at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)         at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1355)         at com.microsoft.sqlserver.jdbc.TDSChannel.r

Foreach Loop Container.ForEachEnumerator.Properties[FileSpec] Exception -This occurs when an attempt

I run into the following 2 exceptions when I execute a package on SQL Server 2005 64 bit machine. The package fails when SQL Server version is 9.0.3310 which is a production box. I have tested it on 3 others development boxes with SQL version 9.0.1399, 9.0.3315 & 9.0.4053 and the package executes fine. I am unable to make a determination if this issue is related to SQL versions or a bug in the package design. I would like to understand the exception better before I request an SP3 & patches installed to upgrade it to version 9.0.4053 on the production box. I have scheduled jobs to run these packages and we are trying to locate Excel files on a drive using For Each Loop Enumerator. The packages are configured to use configuration files. Please note the destination directory does have the Excel files we are looking for. Source: Well_Test_Package Description: The package path referenced an object that cannot be found: "\Package\Daily Alloc Spread Sheet Foreach Loop Container.ForEachEnumerator.Properties[Directory]". This occurs when an attempt is made to resolve a package path to an object that cannot be found.  End Warning  Warning: 2010-08-31 00:41:13.66     Code: 0x80012017     Source: Well_Test_Package      Description: The package path referenced an object that ca

Workflow AND/OR Tasks - how can I create one that occurs/recurrs on a weekly basis.

Hi All, Any ideas how I could configure SharePoint 2010 to trigger a workflow for a site member that notifies them to perform  a specific task ? I have a timesheet template that I intend to create a content type from. the use case is that each site member needs to fill out a timesheet at the start of the week to indicate what work they will be doing for the week. Is it possible ( using customisation ) to create a workflow so that a site member is prompted to create a new timesheet at the start of everyweek ? Alternatively can a recurrent task be created instead ? i.e. on the monday of every week create a new task for each site member to "create new weekly timesheet" Thanks and regards, Counie  

Exception occurs when checking in document with missing required fields

I have a document library with required fields. When the user uploads a document and closes the Properties window without entering the required fields, the document is still uploaded, but is left checked out. If the user subsequently attempts to check in the document without first editing the properties to supply values for those required fields, an exception is thrown and the user sees the following: Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed. The Event Log shows the following: Exception message: You must fill out all required properties before checking in this document. Request path: /_layouts/checkin.aspx Stack trace: at Microsoft.SharePoint.ApplicationPages.Checkin.OnLoad(EventArgs e) ... I would like to trap this error and present it to the user or somehow prevent the check-in event from getting far enough to cause this exception. I have tried coding something like this: public override void ItemCheckingIn(SPItemEventProperties properties) {     try     {         base.ItemCheckingIn(properties);     }     catch (SPException ex)     {         properties.Cancel = true;      &n

trim text when a given character occurs

hi i have a column which is varchar(20) and has a text like this: GHSTAGHJ+0+787000 HJTJ+0+787000431   As you can see, the text has 3 parts the one before +, the part in between the two +es and the last part after the second + what i want do so is, i want to get the first and last parts, and rejoin them please note that none of the parts have fixed lengths. the only constant we have is that definitely there will be two + es.    is there a ways to get my requirement ?   Thanks in Advance    

The variable cannot be found. This error occurs when an attempt to retrieve a variable error from



Sometimes when executing a package (SSIS 2005) from .net users get the error below. What could be the problem?


The variable  cannot be found. This error occurs when an attempt to retrieve a variable from a variables collection on a container during execution of the package occurs, and the variable is not there. A variable name may have changed or the variable is not being created.

duplicate occurs when Org Value are different for 2 transaction node


when <Org Name="A" Value="B"></Org> is same for 2 <Transaction>, then outcome from below are are valid and it return 2 rows for me,

SET @StrXML = '<PDI_Approval_Message>
 <SourceSystem Value="PDI/Workforce" Name="WF"></SourceSystem>

 <Org Name="A" Value="B"></Org>

 <Org Name="A" Value="B"></Org>



System.OutOfMemoryException Occurs on SQL Server 2008



      My darabase server which is sql server 2008 Std. x64 edition throws a memory exception of System.OutOfMemoryException on following operations.

1) when I execute an index script which rebuild my volume tables indexes.

2) When I execute a Stotrd proc.


       Once this exception occurs It contimuesly appears on  other operations also. When I restart the whole server (OS) it get back to normal. But once this message appears all the activity is effected with this message.

My memory is 8gb and I am consumis 7 GB

I am using xeion quad core dual processor with Windows Server 20088 std x64

any suggestions?


Nilkanth Desai



Will sessions kill when application error occurs which is in global.aspx


can you please tell Will sessions kill when application error occurs which is in global.aspx ?



void Application_Error(object sender, EventArgs e)




Event that occurs just after InitializeComponent.



I am creating a UserControl of my own, and put code behinds InitializeComponents.

Is there any event I can capture on my UserControl to do something just after InitializeComponents occurs?


Thanks :)

Why deadlock occurs using INSERT/UPDATE in a table with 2 sessions



I am working on a problem in my odbc application, which i have isolated to the MS SQL Server query analyzer.

The problem is related to the deadlock faced by one of the session, when 2 transactions each running from 2 sessions are trying to INSERT a record from their respective session with the duplicate values for the columns icol1 and cCol2 and then one of the session UPDATE the value of column icol1 in the previously inserted record. After the completion of the test, I see 1 record created in the table from one of the session, but other session becomes deadlock victim.

Following is the table structure:

CREATE TABLE [sgarg].[test_buf](

[icol1] [int] NULL DEFAULT ((0)),
[ccol2] [varchar](30) NULL,
[ccol3] [varchar](30) NULL,
[RECID] [bigint] NULL

Following are the index definitions

CREATE UNIQUE NONCLUSTERED INDEX [test_buf##ixprim] ON [sgarg].[test_buf]
 [icol1] ASC,
 [ccol2] ASC

CREATE NONCLUSTERED INDEX [test_buf#_#recid] ON [sgarg].[test_buf]

How to prevent uncommittable transaction and catch the error message when error occurs?


The situation is I have a daily batch job running SSIS package using the SQL Server Agent. In the daily batch job, the program will generate many dynamic SQL statements and put all SQL statements in a temp table #updateSQLTable. Then, use a cursor to loop through the temp table #updateSQLTable and execute the SQL statments.

The following is the code segment in the cursor:


begin tran t1

--start generating dynamic SQL statements


--after generating dynamic SQL statements

declare @updateSQL nvarchar(4000)

    FOR select updateSQL from #updateSQLTable where updateSQL is not null order by updateSQL
    OPEN mycursor
    FETCH NEXT FROM mycursor
    into @updateSQL

        BEGIN TRY
            --execute the generated dynamic Insert/Update SQL
            EXEC sp_executeSQL @updateSQL

        END TRY

"Object reference not set to an instance of an object" error occurs when trying to edit or open a na


I'm going through the MS SQL Server SSIS Step by Step book from Microsoft Press and I think I have an issue with my install of MS SQL Server.  On the first exercise, the book instructs you to open an existing project and then open a data source view from the project.  The data source view contains several table objects and a named query object.  When I right-click on the named query object and then choose 'Edit Named Query .', I get a pair of 'Object reference not set to an instance of an object' errors.  This also happens if I double-click on the object itself.


I created a blank project.  Then I created a Data Source View and populated it with tables from an existing database using the wizard.  When I tried to add a new named query I got the same error.


Is there a configuration error here?  So far all of the other functions have worked normally.


SQL Server 2005 Developer - SP2 (all patches applied) (SQL Server 2005 Evaluation exhibits the same error)

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend