Sql Query Timeout, Expensive Cast Operation?
Jul 23, 2005
I need some tips to boost the performance on the following query.
The problem is that it times out once in a while, and then again runs
normally in most cases.
The clue is to compare a textual value stored as an image data type, but I
don't know if the cast operation could be done in another way.
Any tips?
SELECT DISTINCT pk_product FROM tbl_product P
JOIN tbl_product_content PC ON P.pk_product = PC.fk_product
JOIN tbl_content C ON PC.fk_content = C.pk_content
JOIN tbl_content_rel REL ON C.pk_content = REL.fk_content
JOIN tbl_filegroup FG ON REL.fk_filegroup = FG.pk_filegroup
JOIN tbl_filegroup_file FF ON fg.pk_filegroup = FF.fk_filegroup
JOIN tbl_file F ON ff.fk_file = F.pk_file
WHERE
P.fk_product_type = 45 AND
CAST(CAST(f.data AS VARBINARY) AS NVARCHAR(20)) = '1234'
/ted
View 1 Replies
ADVERTISEMENT
Dec 28, 2006
Hey,
From time to time i get this error "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding." so I tried to change the connection string by adding thie following "Connect Timeout=200; pooling='true'; Max Pool Size=200" but still it is giving the same error! so why is this happening ? and what can I do!
btw the timeout expired happens when a stored procedure is executed at the Fill method !
Thank you in advance
Hiba
View 2 Replies
View Related
Mar 1, 2007
Hi All,
I am facing a problem in SQL Server 2005 and the .NET Environment. I have an SP, which will return me the result within fraction of second when i execute it in SQL Server Management studio. But randomly (Frequently), its giving timeout when i execute it from .NET Envirnment.
If i execute it at that same time in Management studio, i am not getting the error. But getting the Timeout when i execute it in the Server Explorere of VS 2005 or in the Application which uses it.
Can any one figure out the solution.
View 9 Replies
View Related
May 19, 2007
Hi Team Iam working in a asp.net web application. In my system i have installed the xp as os and the in my network is of 2003 server. All files and database are there. But when me accessing the files from my laptop it shows the error as follows 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:
Line 19: con = New SqlConnection(constring)Line 20: If con.State = ConnectionState.Open Then con.Close()Line 21: con.Open()Line 22: cmdobj = New SqlCommand(query, con) Source File:
Y:Inetpubwwwrootsreeskybuilderssreeskybuildersdbmain.vb Line:
21 If me accessing that same from that mechine there were no errors and i can go thru that program successfully. So please help me to do access the db from anywhere in my network Thanks Rajesh.C.S
View 5 Replies
View Related
Jul 15, 2007
Hi!
I am having a problem with my windows app in VB.net. I am just trying to do a very simple select command to retrieve some data. I am using a hosting server with a VPN.
When i click on the button it keeps giving me the error above. When I use server management express to do the same query it works fine and relatively fast.
So I have tried setting the CommandTimeout to 120 but when it stops, the debugger shows that the value of the COmmandTimeout is 30, although it stops after about 15 secs.
I am really lost and would need some help please! Find my code underneath.
Private Sub RetrieveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RetrieveButton.Click
'Create a connection string to connect to the database. Associate it to a connection object.Dim connString As String = "Data Source=192.168.24.75;Initial Catalog=edenoverseasproperty;" & _
"Integrated Security=SSPI;User ID=edenoverseasproperty;Password=blossomcar"
'Dim connString As String = "Data Source=JPCHENOTSQLEXPRESS;Initial Catalog=EdenOverseasProperty;" & _
' "Integrated Security=SSPI;User ID=sa;"Dim sqlConn As New SqlConnection(connString)
'Create a new command and associate the connection object to it.Dim cmd As New SqlCommand()
cmd.CommandTimeout = 120
cmd = sqlConn.CreateCommand()
'Define the command type and the source
cmd.CommandType = CommandType.Text
cmd.CommandText = "SELECT * FROM Clients"
'Create a data adapter and a datasetDim da As New SqlDataAdapter()Dim ds As New DataSet()
da.SelectCommand = cmd
da.Fill(ds, "Clients")
'Bind the data to the datagrid
EdenDataGridView.DataSource = ds
EdenDataGridView.DataMember = "Clients"
End Sub
Jean-Philippe
View 2 Replies
View Related
Feb 1, 2008
HI,
I am getting this error on web server. My Appication is working fine on my Local Network where DB server and web server are on different machine. But getting TimeOut on web server. I tested the query on Query Analyzer it takes hardly 3 sec (Max) to execute. There is only Select query and total number of records are around 2100 which is not a big data.
I have used Connect Timeout = 180 in connection string which is also not effective.
please tell me how can I handle this exception.
View 1 Replies
View Related
Mar 7, 2008
We've been having timeout problems.
In our development environment we have IIS and SQL Server 2005 both running on the same box. We use VWD or our dev server's IIS to run the apps.
What happens is the database stops responding to our web applications and we continue to get the timeout error. I can still execute queries from Management Studio but all of the web apps all timeout.
Then, the only was we can get the database to start responding again is if we restart the SQL Server service.
Any ideas as to why the database would stop responding to all of the web apps but not Management Studio? It tends to happen a couple times a day when we are developing. Only the other developer and myself use the DEV environment.
View 2 Replies
View Related
Mar 28, 2008
Hi Dear,I have some problem.Problem Is:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.I have two table.1. BlogUrl2.HistoryBlogstable BlogUrl has approximate 30 url(some part of url).and table HistoryBlogs has approximate 2,00,000(2 lac) record.table history blog has a colon blogUrl and a colon subject name.when a user select one url from blogUrl table then display all subject related to blogUrl.it's ok.but i want select all blogUrl related subject.my query is:SSELECT distinct S.subject_id as 'id', cast(S.subject_raw as varchar(8000)) as 'subject' FROM HistoryBlogs S where substring ( cast(S.blog_url as varchar(8000)), charindex('/',cast(S.blog_url as varchar(8000)))+2, charindex('/', substring ( cast(S.blog_url as varchar(8000)), charindex('/',cast(S.blog_url as varchar(8000)))+2, len(cast(S.blog_url as varchar(8000) ) ) ) )-1 ) IN
('-' , 'discussions.apple.com' , 'feeds.gawker.com' ,
'legalalan.blogspot.com' , 'real.estatez.net' , 'szeteng.blogspot.com'
, 'willdo.philadelphiaweekly.com' , 'www.beginnertriathlete.com' ,
'www.bestbuy.ca' , 'www.bestbuy.com' , 'www.binsearch.info' ,
'www.centennialcollege.ca' , 'www.chatsusa.com' , 'www.dvinfo.net' ,
'www.feedhub.com' , 'www.futureshop.ca' , 'www.libble.com' ,
'www.mcdonalds.com' , 'www.monova.org' , 'www.net-security.org' ,
'www.osnews.com' , 'www.senecac.on.ca' , 'www.shop.com' ,
'www.sumotorrent.com' , 'www.theimpulsivebuy.com' ,
'www.tomshardware.com' , 'www.wal-mart.ca' , 'www.walmart.com' ,
'www.xbitlabs.com') group by S.Subject_Id,cast(S.Subject_Raw as
varchar(8000))This query is ok.but when we want select all blogUrl.then i found above mention errori have asp.net 2.0 and sql server 2000.this type problem i am facing on remote serverPlease help me.Yogesh Saini
View 2 Replies
View Related
Apr 8, 2008
Hi I am getting error:Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not respondingMy Connection string is like this. But still i am getting above error: <add key="ConnectionString" value="Initial Catalog=XX;DataBase=XX;Data Source=XX;User ID=XX;pwd=xx;Min Pool Size=5;Max Pool Size=225;Connection Reset=True;Connection Lifetime=180;"></add> Please advice me.Thanks-Dil
View 1 Replies
View Related
May 12, 2008
Hi, I keep getting this error. I have a query that takes 47 seconds when I run it in SQL Server 2005. My connection string looks like this:connectionString="Server=server; Database=db; Pooling = true; Connect Timeout=60; Max Pool Size=300;I understand that Connect Timeout 60 = 60 minutes. Is there any other place where a timeout can be set in an ASP.NET 2.0 application?Thanks for any ideas.
View 6 Replies
View Related
May 27, 2008
Hi....i got this error,I have already set in my connection string:----
Connect Timeout=300; pooling='true'; Max Pool Size=200;but i got this error till now,how can i solve this .......thanks
View 2 Replies
View Related
Jun 9, 2008
When I connect remotely to SQL SERVER 2005 the following error occurs.Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.thanks & regards priya.
View 2 Replies
View Related
Jan 3, 2004
"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
Environment:-
Framework 1.1
DB:SQL Server 2000 (SQL Provider)
OS:Windows 2000
Language: VB.NET
I'm trying to do mass inserts/updates. Using Transactions. The table hierarchy contains 3 levels (TL1, TL2, and TL3):
Here is what I'm trying to accomplish:
1) Start Begin Transaction (in desperation, I've tried all the isolation levels- I was hoping ReadUncommitted would work!)
2) Do an Insert/Update in table TL1 (this works).
3) Grab the ID from step 2 and do a SELECT on table TL2 to determine if I need to an UPDATE or INSERT.
Since I'd be inserting 3 rows into table TL2 (for a particular parent ID with different types), the first SELECT (on TL2) works and then I'm able to do an INSERT into TL2. The transaction is still alive. Now, I try to do a SELECT on table TL2 to see if a record exists for this type and this is when I get the exception "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
My guess is that I have a LOCK on the table TL2 (from the first SELECT), which seems to be causing the problem.
Note:
The INSERTs and UPDATEs are done by executing stored procs.
For the SELECTS, I'm using a different connection (from the one which the transaction is using) and close it after the SELECT is executed.
View 1 Replies
View Related
Jul 17, 2005
Okay all this used to be fine on another machine it has jsut been moved. Original machineWindows 2003 server.Net 2.0Sql server 2005New machine Windows 2003 server.Net 2.0Sql server 2005Not that I don't see how this is a timeout setting issue as it shoudln't take but a second to access what it needs. It also workse fine on the original machine which is still up. I go to the website and try to login and get that error message. Says it timed out or server is not responding. below is the details.HERE IS THE ERROR IN EVENT VIEWER____________________________________________________Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 7/17/2005 3:26:38 AM
Event time (UTC): 7/17/2005 7:26:38 AM
Event ID: 1da418026f5641e8914bcafa571233c3
Event sequence: 10
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/Root/application1-127660587297031250
Trust level: Full
Application Virtual Path: /application
Application Path: D:Websitesapplication
Machine name: DATING
Process information:
Process ID: 3892
Process name: w3wp.exe
Account name: NT AUTHORITYNETWORK SERVICE
Exception information:
Exception type: SqlException
Exception message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Request information:
Request URL: http://dating/application/Login.aspx
Request path: /application/Login.aspx
User host address: 192.168.1.20
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITYNETWORK SERVICE
Thread information:
Thread ID: 7
Thread account name: NT AUTHORITYNETWORK SERVICE
Is impersonating: False
Stack trace: at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at citimatch.Login.LoginButton_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.HERE IS THE ERROR IN INTERNET EXPLORER____________________________________________________Server Error in '/APPlication' Application.
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.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +684931 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207 System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +890 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +601 System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +159 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +346 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +445 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +304 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 citimatch.Login.LoginButton_Click(Object sender, EventArgs e) +576 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +78 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5670
View 1 Replies
View Related
Mar 13, 2008
I am getting this error when I am modifying a table. I am trying to change the IDENTITY seed value for a column. How to handle this error.
Thanks.
View 4 Replies
View Related
Jul 3, 2007
Hi,
I am running a stored procedure that collects some records from two tables do some calculations with those records and insert those calculation result in a temp. table. I am calling this stored procedure in my aspx page and then later select all the records from temp table and show it in a table.
When I run this application on browser it give me Timeout expired error but whn I execute the stored procedure it runs properly but takes around 3:10 mins to execute in query analyzer. I did some google work and based on that I specified CommandTimeout = 300 for SP and Connection timeout=400 in web.config. But still it didnt worked. Sometimes it runs properly but sometimes its not.
Where I am doing mistake? and Wht should i do to resolve this? Plz. help.
Thanks in adv.
Regards,
Yogita
View 1 Replies
View Related
Dec 26, 2007
Guys,
I am trying to attach a database object to the App_Data directory I got thie error
Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
This is what I did. I right click the App_Data folder and click Add New Item. Then I click the SQL Database. This is where I got the error.
What should I do? Please help
View 2 Replies
View Related
Jan 15, 2006
When I run my web app on my dev machine it works perfect. When I precomile it to my web deployment project and then copy the debug files to my web server I get this problem when trying to login (obviously it's using ASPNETDB.mdf). Any ideas?
Server Error in '/' Application.
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.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +684835
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207
System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +890
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +601
System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +159
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +108
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +445
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +304
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +126
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +239
System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved) +815
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +80
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +78
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +161
System.Web.UI.WebControls.Login.AttemptLogin() +94
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +101
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +134
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5670
Version Information: Microsoft .NET Framework Version:2.0.50215.44; ASP.NET Version:2.0.50215.44
View 7 Replies
View Related
Jul 6, 2007
I'm trying to test my backups by restoring from production onto a DEV machine.
However, when I insert the backup tape into the drive, then go into SSMS and right click on
Databases -> Restore Database -> From Device .... -> Tape -> Add -> (my tape drive \.Tape0) -> Contents
it displays the contents as it should.
So I click "Close" to close the contents and bring me back to the Specify Backup where I have \.Tape0 selected and I then click "OK"
SSMS sits for a few seconds, and then I get a time out error message:
TITLE: Microsoft SQL Server Management Studio
------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
ADDITIONAL INFORMATION:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (Microsoft SQL Server, Error: -2)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
That's all the further I can get... any suggestions?
I'm VERY perplexed by this...
View 11 Replies
View Related
Jul 2, 2007
Hi,
I am getting the following error when running SQL Server 2005 Upgrade Advisor on a test database of 300Gb aprox. After a long wait we got the following error:
Database Server,"PreUpgrade","Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.","OLDSYSTEMTABLES",
After that error we got several similar errors of "timeout expired" pointing to FTCATALOGNAMERESTRICTION, and others.
I found the same problem reported in other forums and recommended to run the UA database per database, but we are running the Upgrade Advisor against only one database in periods of low activity.
We cannot advance the upgrade to SQL Server 2005 on other databases due to this error. I would appreciate some clues or suggestions.
Thanks,
Juan
View 1 Replies
View Related
Jul 25, 2005
I have a scheduling application that I created that allows users to select several microscopes from a multiple select list and then select users from a datagrid and change their permissions. ie it will add a record to a table that allows them to use the selected microscopes or it will delete the record from the table if it already exists since the table is only two columns and both make the primary key.So right now I'm just deleting the records when a duplicate primary key exception is thrown (although I'm not sure how to return from the catch and continue the rest of my loops to continue adding or deleting permissions.Alternatively I could check the database before executing the insert or delete command and see if that record already exists and avoid the catch/return scenerio. But which is more intensive on the server? Is there a better way to do this that I haven't thought of? Thanks~Cattrah~
View 6 Replies
View Related
Sep 10, 2006
Hi
I'm using two different server for application(.net version 1.1) and database(sqlserver200) with win2k3 environment. I'm getting the below error message all the times. I've veryfied the communication between the two server is fine.
"The timeout period elapsed prior to completion of the operation or the server is not responding"
Any help is greatly appreciated
Cheers
Veeru
View 1 Replies
View Related
Jul 28, 2014
I am currently running SQL 2014 in my production environment. Both machines are configured for Windows Failover Cluster Services so that we could take advantage of AlwaysOn Availability Groups.
Currently we are experiencing a issue where our web application is throwing an error, "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding." I am pretty sure that the error is being thrown from the application, but I can't prove it. Because the error states it is SQL, the consensus seems to be that SQL is having the issue. I need to know how to troubleshoot it to ensure that SQL is not the problem.
View 9 Replies
View Related
Feb 2, 2004
Hi,
i am experiencing SQl write performance problems on a very shiny server. Got data files on a Raid 1+0, log files on a separate drive, all SCSI, Win2003 server, 6G RAM, 2 Xeon processors. I've created a small benchmarking program and run it on my desktop pc and this 'big' server. Here are the results:
Desktop: SQL server inserts: 78 Seconds, Direct writes to the harddisk(Just write a string to the file 10000 times): 13 seconds
SQLServer: SQL server inserts: 422 Seconds, Direct writes to the harddisk: 16 seconds
So, for some reason, my 'shiny' machine is 6 times slower on writes than my desktop. When i tried comparing the select performance, my shiny server is 10 times faster than my desktop.
Initially i had Raid5 on my server and it had poorer direct write performance but now, direct writes seem to be ok, so, i recon this is a problem related to SQL server.
What can i do to improve the insert performance?
Thanks in advance
View 8 Replies
View Related
Sep 20, 2006
I had an idea to put all my web design settings, css text and web content in the database..This way it would be easy for others to edit remotely. Do you guys think this would have an impact on performance if I do this?
View 7 Replies
View Related
Apr 18, 2008
I've create a bunch of views to expose a logical model of the underlying database of an application server.
To enforce the security control, I've also created a CLR UDF to call the application server's API for security check and audit log.
For example, we have a table, tblSecret, and the view, vwSecret, is,
SELECT
Id,
ParentId,
Description,
SecretData
FROM tblSecret
WHERE udfExpensiveApiCall(Id) = 1
The udfExpensiveApiCall will return 1 if the current user is allowed to access the SecretData else 0. The CLR UDF call is very expensive in terms of execution time and resources required.
Currently, there are millions rows in the tblSecret.
My objective is to tune the view such that when the view is JOINed, the udfExpensiveApiCall will be called the least number of time.
SELECT
ParentId,
SecertData
FROM vwParent
LEFT JOIN vwSecret ON vwSecret.ParentId = vwParent.ParentId
WHERE vwParent.StartDate > '1/1/2008'
AND vwSecret.Description LIKE '%WHATEVER%'
Is there any way to specify the execution cost of the CLR UDF, udfExpensiveApiCall, such that the execution plan will call the UDF while it is absolutely necessary?
Is there any query hint will help?
Any recommendation?
Thanks,
Simon Chan
View 1 Replies
View Related
Aug 10, 2007
I'm relatively new to compact framework and SQL Server Compact so bear with me if I've got an obvious thing I've forgotten.
I've written my own database helper layer. My idea is to generate SQL Insert statements dynamically based on what is in the contents of each object. Peformance however is horrible. I try to do 1800 inserts and it takes about 50 seconds on the device (Release Build, outside of the IDE).
I pass in a list of objects to be inserted which derive from a ModelBase class. ModelBase includes some ORM information (what table the object goes into. what fields are mapped to which properties). I generate one SQLCeCommand object, one sql string (new params for each insert), and am using SqlCeResultResultSets.
What can I do to make this run faster? Thank you
Code Snippet
public bool Insert(List<ModelBase> recs)
{
SqlCeConnection con = new SqlCeConnection(connectionString);
try
{
con.Open();
con.BeginTransaction();
}
catch
{
return false;
}
SqlCeCommand cmd = new SqlCeCommand();
cmd.Connection = con;
String sqlString = "INSERT INTO [" + recs[0].tableName + "] (";
String sqlString2 = ") VALUES (";
PropertyInfo[] props = recs[0].GetType().GetProperties();
for (int x = 0; x < props.Length; x++)
{
PropertyInfo pi = props[x];
if (recs[0].fieldMap.ContainsKey(pi.Name))
{
sqlString += "[" + recs[0].fieldMap[pi.Name] + "]";
sqlString2 += "@" + pi.Name;
sqlString += ", ";
sqlString2 += ", ";
}
}
sqlString = sqlString.Substring(0, sqlString.LastIndexOf(", "));
sqlString2 = sqlString2.Substring(0, sqlString2.LastIndexOf(", "));
sqlString += sqlString2 + ")";
cmd.CommandText = sqlString;
cmd.CommandType = CommandType.Text;
foreach (ModelBase rec in recs)
{
cmd.Parameters.Clear();
for (int x = 0; x < props.Length; x++)
{
PropertyInfo pi = props[x];
if (rec.fieldMap.ContainsKey((pi.Name)))
{
if (pi.GetValue(rec, null) == null)
cmd.Parameters.AddWithValue("@" + pi.Name, DBNull.Value);
else
cmd.Parameters.AddWithValue("@" + pi.Name, pi.GetValue(rec, null));
}
}
try
{
SqlCeResultSet rs = cmd.ExecuteResultSet(ResultSetOptions.None);
}
catch(Exception e)
{
cmd.Connection.Close();
cmd.Connection.Dispose();
Program.log.Error(e.Message,e);
return false;
}
}
con.Close();
return true;
}
View 7 Replies
View Related
Mar 28, 2008
I just want to find out what the difference between a remote login and a remote query is. I'd have thought that a remote query inherently requires a remote login.
View 6 Replies
View Related
Mar 17, 2008
Hello friends,
I am working on web application using sql server 2000, visual Studio 2005. In one of the table I have field 'NetAmount' purposely I had kept datatype as char. Now I want to update that field. for e.g. I have to add 100 to netAmount. How I can do it with sql query. Please let me know.
Thanks & RegardsGirish Nehte
View 1 Replies
View Related
Nov 20, 2013
I'm using SQL Server 2012 Analysis services in Tabular mode and connected to Oracle Database and while importing, I'm getting below error after importing some rows.
OLE DB or ODBC error: Accessor is not a parameter accessor.. The current operation was cancelled because another operation in the transaction failed.
View 1 Replies
View Related
Apr 22, 2015
How do I find out top expensive queries from SQL Server 2008 – Standard edition ?
View 9 Replies
View Related
Apr 30, 2006
Hello, I have my table Produits :
CREATE TABLE [dbo].[Produit] ( [Produit_ID] [int] IDENTITY (1, 1) NOT NULL , [Reference] [nvarchar] (50) COLLATE French_CI_AS NULL , [Designation] [nvarchar] (50) COLLATE French_CI_AS NULL , [Quantite] [int] NULL , [PrixU] [sql_variant] NULL , [MontantHT] [sql_variant] NULL , [TVA] [sql_variant] NULL , [Facture_ID] [int] NOT NULL )GOhere is stored procedure CREATE PROC spBaseTVA_Bis
(
@Facture_ID int
)
AS
SELECT SUM(MontantHT) AS montantHT, TVA
FROM
Produit
GROUP BY TVA, Facture_ID
HAVING ( Facture_ID = @Facture_ID)
GO
My stored procedure fill data in a datagrid with to column TauxTVA and TVA like this : TauxTVA TVA But I would like to add a theard column as (the value of the fisrt colum) * ( the value of the second colum ) I would like to desplay data like this : TauxTVA TVA Prod X Y X*Y How can I modify my stored procedure to perform this ? Regards
View 3 Replies
View Related
May 28, 2015
when run this query
SELECT * FROM TABLE1
EXCEPT
SELECT * FROM TABLE3
showing the below error
Msg 468, Level 16, State 9, Line 1
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the EXCEPT operation.here columns collation of table1 is Latin1_General_CI_AS and columns collation of table3 is SQL_Latin1_General_CP1_CI_AS database collation is Latin1_ General_CI_AS.
View 12 Replies
View Related