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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SQL SERVER 2008R2 concatenation of CAST causes timeout

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :Sql Server


In my company, somebody wrote stored procedure that works with MSDE and doesnt work with sql server 2008R2. With 2000 it takes few seconds and with 2008 there is a timeout after 600 seconds.

This is a part where I isolated the problem:


(SELECT TOP 1 MovementHeaderId

FROM MovementHeader )

FROM RetailTransactionLineItemExtended




FROM  Movement


MovementTypeCode ='SALE'


DocumentReferenceTypeCode ='TRANSACTIONLINE'

AND DocmentReferenceCode = cast(RetailTransactionLineItemExtended.TransactionOriginalTransactionID as varchar(20)) +'/'+    cast (Ordinal as varchar(20) ))

And IsPetrol=0


View Complete Post

More Related Resource Links

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is no



 I keep getting the following error. I also added time out parameter in the connection stirng and it still did not help. Has any one faced similar issues.

Thanks in adavance.

Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.]

Timeout polling in server

hi all,           i have done one website and i upload to all file in server..After two day i got error from website starting page Timout error.. too many connections are there so polling timeout.. i dont know how to solve this problem anybody please reply me..

SQL Server Express 2005 connection timeout issue.

Client: Sql Sever Management Studio Express 2005 (SSMSE) on Vista Server: Sql Server 2005 Express on Windows Server 2008 Standard When I first try to log into SSMSE from the client machine, the login operation times out. When I retry, the login succeeds almost immediately. If I close the app and re-open it, the same thing happens. This appears to be infinitely repeatable. I am able to reproduce this behavior using SQLCMD.exe. Here's the error: "Timeout expired. The timeout elapsed prior to completion of the operation or the server is not responding. (Microsoft SQL Server)" The technical details reference Error Number -2 What may be unique or tricky about this client's network is that it's a mixture of IPv4 and IPv6. I believe the server is configured for both, but honestly the networking side of things is outside of my expertise. Has anyone else experienced a problem like this? I'm looking for some troubleshooting tips and of course a flat-out answer :-). Thank you in advance for your time and expertise - I hope I've broken the problem down to its simplest form. Will.

best practice SQL Server 2008R2 setup on 3 drives

Hi, I have read best practice lists for setting up SQL Server, but I don't have enough available drives to meet the optimal setup. I have 3 drives and below is how I plan on using my 3 drives: C (30GB) - Windows 2008 OS and SQL Program Files E (120GB) - SQL Master/Model/TEMPDB/MDF Files F: (60GB) - SQL LOG Files   Should I configure the above different?

Problem Installing SQL 2005 Enterprise on Server 2008R2 Enterprise???

I am trying to install SQL Server 2005 Enterprise onto a new WinServer Enterprise 2008R2 box.  I am using my MSDN disk that contains the various flavors of SQL Server 2005.  When I select to install Enterprise (64 bit) version all that is available for installation are the client tools, no server tools.  When I install the Standard version, the server tools are available. Is there a problem installing SQL 2005 Enterprise on WinServer Enterprise 2008R2???

Cannot Connect to SQL server with SQL 2008R2 enterprise On windows server 2008R2

I have 2 identical brand new servers Running Windows Server 2008 R2 not on a domain but simple LAN. I Installed a default instance of SQL server 2008 R2 enterprise on each one with all the default settings. No Problems during the Installaion. I Added the Windows Administrators Group and Users group to the SQL admins role during the SQL Server Installation. Remote connections are enabled on each server. I restored the same database from a copy on each Installation. Configured the user accounts on each maching and made them sysadmins and granted permissions where they were needed. Now from server A when i try to establish a connection to Server B from SQl server Management Studio I get An error stating that the server was not found or accesible. keep in mind i can \\server B\c$ and vice versa, named pipes are enabled. I have never had this problem before in my life. And it's happening on both servers. I really need each installation of SQL to be able to see the other remote installation as i have to create a mirror. -Chris

Error Enrolling Instance In Utility Explorer SQL Server 2008R2

When I try enrolling an instance the enrollment errors with "The collection sets on the specified instance of SQL Server must be stopped." I have stopped all the collection sets in various manners including disabling the scheduled job, all with no success. Any suggestions as to what else I can check? I have successfully enrolled another instance on the same server. Thanks!  

SQL server 2008R2 install on a server 2008 R2 failover cluster. Other resources won't failover to o

As the subject says, I've built a fresh install w2k8r2 and sql2k8r2 failover cluster. Sql works fine on the primary node, but when I test a failover it breaks. Specifically, if I were to stop the node1 cluster service (causing the cluster to switch to node2), windows changes the cluster DNS appropriatly and moves the shared storage just fine, but sql server doesn't failover.  Server Name, Disk Drives and Other Resources all go offline. I've verified that the advanced policies of the server name, IP, cluster drives all have both nodes checked as possible owners However, Other resources only lists node1 as a possible owner and there appears to be no way to add node2.  Under the Other resources, SQL Server and SQL Server Agent are listed. I'm sorta stumped, I've been combing the forums and have found similar issues, but nothing seems to explain why the two resources won't failover.

Install App that uses .NET Framework 4 and SQL Server 2008R2 Express (with Tools) - what .NET Framew


I am a little confused about how to install my application.  Written in C# using VS 2010 and targeted for the .NET 4 Framework.  It also uses a SQL Server 2008 R2 database.

In my installer I install .NET 4 Framework if not already present on the host machine.

For SQL Server 2008 R2 (with Tools) I understood I need Installer 4.5 and Powershell 1.0.  The install of install of 4.5 installer goes ok but requires a reboot.  The install of Powershell says it needs .NET Framework 2 SP2 - even tho' .NET 4 is installed.

I decide to ignore this and carry on so manually install SQL Server 2008 R2 Express (with Tools).  It unpacks and complains it needs .NET Framework 3.5 SP1!

My application has to deploy to a disconnected machine installed in the cab of a logging harvester so I can't rely on automatic wwindows updates.


To deploy my app with SQL Server 2008 R2 (with Tools) do I need ...

  • .NET Framework 2.0 SP2 and
  • .NET Framework 3.5 SP1 and
  • .NET Framework 4



I had presumed all I would would be .NET Framework 4 since it is "mostly" backwardly compatible.

Install time and complexity is HUGE is I need all three Frameworks.


Can someone please clarify for me?




New installation of SQL Server 2008R2 -Giving time out error


Hi all

I did side by side installation of SQL Server 2008 R2 RTM with no CU and I given a Alies name to the installation,until now applications working fine.Yester day SAN storage devices(iSCSI) are upgraded with new software.

after that I am getting an error

"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (Microsoft SQL Server, Error: -2)"

action required I found in Microsoft site is "Make sure that you have configured the firewall on the server instance of SQL Server to accept connections"

realy I don't know where I have configure this setting Please some help regarding

Thanks in Advance


Is it possble to create Active-Active Cluster in SQL Server 2008R2


Hi All,

Another question...
I am new to SQL Clustering.

Can we create Active-Active cluster on SQL Server 2008 R2 Server, which will be having facility to loadbalancing Databases on Clustered Hardware, i.e. some Databases will be on SQL_Cluster_Host_A and Some will be on SQL_Cluster_Host_B.

Or is there any way to configure the above thing?


SQL_Cluster_Host_A will host Database 1, and SQL_Cluster_Host_B will host Database 6,7,8,9,10.
When Host A will fail all DBs will goto Host B, and vise versa.


Timeout error from same server but different websites







Hi to all, this is maybe my first time that I have post a question, and it is just because I ran out of ideas... so maybe someone can offer a solution.

First the environment:
OS: Windows Server 2003 R2 - 5.2.3790
Microsoft SQL Server Management Studio        10.0.1600.22 ((SQL_PreRelease).080709-1414 )
Microsoft SQL Server Express 2008
Microsoft Data Access Components (MDAC)        2000.086.3959.00 (srv03_sp2_rtm.070216-1710)
Microsoft MSXML                    2.6 3.0 4.0 6.0
Microsoft Internet Explorer            7.0.5730.13
Microsoft .NET Framework            2.0.50727.3615
IIS 6.0
Intel Xeon CPU 2.8 GHz, 2.79 GHz, 3.5 GB RAM.

I have a website running on this server let us name: the SiteOne which is physically stored in inetpub, and it works fine. within this site I have a .Net Web Page with nine graphs, it pulls the data from 7 SQL Express queries with the production of the day. Showing the graphs takes to the site 2 seconds the most. However, I was in the need to copy the websi

Error when synchronizing a 2008SP1 Database with a 2008R2 database using Microsoft SQL Server Manag


I am trying to synchronize two databases and getting the below error.  I am using Microsoft SQL Server Management Studio 2008 to sync the two databases.  One of the databases is running Analysis Services 2008SP1 (the source) and the other is running Analysis Services 2008R2 (the destination).  I have tried the Microsoft SQL Server 2005 Backward Compatibility tool and that did not work.  My thought is that the different versions are causing a conflict.  The surprising thing is that it appears to be working and then fails.  Keep in mind I am using an administrator account.  Can someone please advise?

Thanks,  A.L.

Total Size=20563KB

Errors in the OLE DB provider. The server returned the following error

SQL Server timeout caused by W3wp.exe crashing




I have a ongoing issue with my website, where it appears the W3wp.exe crashes and in turn anyone attempting to connect to the site will receive a SQL server timeout error.


The error is this...


System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.


What actually happens is when this occurs, the CPU usage on the server maxes out to 100% and stays there. During this time if I try and connect to the homepage the site will appear to be loading and then timeout. This is also the case when i try and connect to the database through management studio.
I get the above SQL timeout error from ELMAH when it emails me exceptions. When I do a iisreset I can once again connect to SQL server and the CPU usage drops immediately.


Now I have already posted a few questions oh here about the issue in regards to the SQL time out exception. So ill list what I have done and what im using...


  • Im using Linq to SQL.
  • SQLCacheDependancy.
  • IIS 7.5 & SQL Server 2008 R2.
  • Disposing of all objects.
  • The call to the Linq to SQL dataContext is always wrapped in a USING Keyword.


These timeout errors

SQL Server 2008r2 Best Practice Analyzer report error


Hi All,

recently I was playing with SQL Server 2008r2 BPA. I have installed Baseline Configuration Analyzer in my workstation and my server has BPA installed.

Now when ever I try to run analysis on my workstation. I always get following errors,

1. User is not a member of Administrators group on remote machine, OR

2. Powershell Remoting is not Enabled on Remote Server


Now I am sure that I am Admin of that server machine and I have enabled the PS Remoting (because when I try to rerun the commands to enable remoting in PS it says it is enabled). Also, I can run BPA on my server if I run it locally (by logging into the server m/c).

If any one has any suggestion, I will really appreciate it.



Row Concatenation on SQL Server 2000


I need help on row concatenation. I only found solutions for SQL Server 2005 but I need one for SQL Server 2000.

Suppose I have a table like this:

Table Name: myGroup

group    |members


1          | member1

1          | member2

2          | member3

3          | member4

3          | member5


I want the output to look like this:

Group    | Members

1          | member1 , member2

2          | member3

3          | member4, member5


Any suggestions on how to do this? Thanks! =)

[Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258]


Hello All,

I am using MS SQL SERVER 2008. Im making an application which queries trillion of records. Im using PHP as scripting language. For those functions , which query database and 200 (approximately) rows of DB are returned, everything works fine. But if I query database and a large recordset should be returned, the following error is thrown:

Array ( [0] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => 258

=> 258 [2] => [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258]. [message] => [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258]. ) [1] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => 258
=> 258 [2] => [Microsoft][SQL Server Native Client 10.0]Communication link failure [message] => [Microsoft][SQL Server Native Client 10.0]Communication link failure ) [2] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => -2147467259
=> -2147467259 [2] => [Microsoft][SQL Server Native Client 10.0]Communication link failure [message] => [Microsoft][SQL Server Native Client 10.0]Communication link failure ) )

If I see the error log it shows:

2010-10-17 12:32:38.88 Logon       Error: 18456, Severity: 14, State: 8.

2010-10-17 12

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