ssms script trigger timeout - ide

Using the SSMS (Sql server management studio) 2008 ide, I frequently get timeouts asking it to script a trigger (or table) to a new query editor window.
This particular time, the error message is Script failed for Trigger 'spbldrom_update'.
Additional information:
- An exception occurred while executing a Trasact-SQL statement or batch.
- Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (Microsoft SQL Server)
It takes about 5 minutes for the timeout to occur.
It happened on my prior computer. It happens on my new Windows XP computer, and my new Windows 7 computer.
I have searched for other people reporting this, but have not found many reports, and no answers, other than increasing the timeout. But since it takes about 5 minutes to get the timeout, I don't think increasing the timeout will help.

Related

Random delays on opening connection to SQL Server

In one of our systems we experience random delays when opening a connection to SQL Server.
The system is running Windows Server 2012 R2 Standard and SQL Server 2012, located on the same physical machine as our application.
Even when our application is idle, it is executing DB operations once every few seconds on average.
DB operations our application executes usually consist of 3 steps:
open a connection to SQL server
run a stored procedure
close the connection
Normally the first step takes a tiny fraction of second, while running a stored procedure may take much longer, depending on many factors.
The problem: opening a connection may randomly take 5-13 seconds. This only happens rarely, once in a few hours, even once in a day.
In other words this could happen once per a few thousand DB operations. We have not detected any discernable pattern in the timing of these delays.
There is nothing suspicious in the SQL Server log files.
Running SQL Server profiler does not seem practical, as the fault may not be exhibited for 10-20 hours.
We have not seen this phenomenon on any other machine.
It looks like we've fixed the problem. Somewhere I read a recommendation to try to use SQL Server authentication instead of Windows authentication. The problem discussed there was not exactly the same as ours but somewhat similar. Since connection string is used in every Open Connection operation, I decided to give it a try. As a result, our application has been working for 3 days in a row by now and there has not been a single incident of opening connection being slow. To put this in a context, before this fix we had several incidents in 24 hours on average, and not a single incident-free 24-hour period for the last two months.

What would cause SQL Server to stop writing to the error log?

Error logs for our SQL Server instance are gathering a large amount of data (250k records in a month) all day, then all of a sudden stop at roughly the same time of day (9:15pm), though on different days of the week and at seemingly random intervals of days.
This corresponds to other issues on the server: 1) jobs that move files to shares on the database server fail 2) I am not able to access the server via any method (tried RDP and SSMS). Once the servers are rebooted, SQL Server comes up and SQL Server error logging resumes.
Windows Event Viewer doesn't show any notable error messages for System (the other event logs have wrapped already).
The error logs are being written to the D:\ drive, which has over 100GB free currently. The error log files are in the range of tens of megabytes.
Appreciate any ideas on what might have caused this or how troubleshoot it. Thanks!
The cause appears to have been a corrupted maintenance plan. I discovered this by correlating the timing of the lock-up to the times the maintenance plan was running. The lack of logging made this difficult to confirm. Guessing that at least some parts of it ran normally, but got rolled back on restart.
The current fix was to disable the maintenance plan and replace it with a collection of jobs that do the same tasks. I will likely recreate the original maintenance plan if the server remains stable for another week or two. If we stay stable past that point, it should solidly confirm the maintenance plan as the source of the problem.

LOCK_MODE_WAIT Configuration in Geronimo Datasource for Informix DB

The application which we are currently working on with Informix DB and Geronimo app server, is throwing Lock Timeout expired exception since one of the "READ" operations is taking a long to time to complete the transaction and there is another UPDATE operation changing the record.
The approach was to increase the lock wait time out value, so that the transactions can wait for existing transactions to be completed.
The following configuration was made in the datasource definition for the informix database under the geronimo console.
IfxIFX_LOCK_MODE_WAIT - 3000
However we are still getting the lock wait timeout exception.
Is there any other solution to increase the lock wait timeout value?

Intermittent sqlexception timeout expired errors

We have an app with around 200-400 users and once a day or every other day we get the dreaded sql exception:
"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding".
Once we get this then it happens several times for different users and then all users are stuck. They can't perform any operations.
I don't have the full specs of the boxes right in front of me but we have:
IIS and SQL Server running on separate boxes
each box has 64gb of memory with multiple cores
We get nothing in the SQL server logs (as would be expected) and our application catches the sqlexception so we just see the timeout error there - on an UPDATE. In the database we have only a few key tables. The timeout happens on one of the tables where there is 30k of rows. We have run profiler on these queries hitting the UI against a copy of production to get the size and made sure we have all of the right indexes (clustered/non-clustered). In a local environment (smaller box, same size database) everything runs fast and to the users most of the day the system runs fast. The exact same query (which had the timeout error in production) ran in less than a second.
We did change our command timeout from 30 seconds to 300 seconds (I know that 0 is unlimited and I guess we should use that, but it seems like that's just masking the real problem).
We had the profiler running in production, but unfortunately it wasn't fully enabled the last time it happened. We are setting it up correctly now.
Any ideas on what this might be?

SQL server user session time out?

i use window application and i want to fire trigger after user session time out So ,
How to detect if user abort or his session timeout using SQ L server 2008 ?
SQL Server never times out sessions nor requests. A query issued against SQL Server may run for hours, days even, uninterrupted. You may be under the wrong impression that queries against SQL Server time out and get aborted because the ADO.Net client chooses to abort queries after 30 seconds, because that is the default value of the SqlCommand.CommandTimeout:
The time in seconds to wait for the
command to execute. The default is 30
seconds.
However, aborting the queries is a client specific behavior that SQL Server is not involved in. Other clients (eg. JDBC) use different policies.
Similarly, a SQL Server session never times out, even if not used for days. The application has to explicitly close the connection for its sessions to terminate. While is true that there are administrative ways to disconnect sessions (the KILL command) these are never to be used except for extreme last measure administrative operations.
So the good news is that you don't have to do anything, what you're asking for doesn't exists, or shouldn't be done to start with.