Tables Seem Too Big - Timeouts Happening
Jul 23, 2005
I have two problems I need some help with.
First, I've just inherited a system and am delving into a few timeout
problems that are causing problems for the users.
Now, if I do a simple select * from the table (which looks to be the
cause of the problem at this stage) in QA, I get the results back in
less than a second. If I open the table in EM it takes about 10. Is
there a difference in viewing the data this way ? I'm used to EM being
virtually the same speed. There is only one row. Minor question
really, just something I'd like to understand if there is a
difference.
CREATE TABLE [QUERY] (
[QUERY_ID] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,
[CAT_ID] [numeric](18, 0) NOT NULL ,
[QUERY_DESCR] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[USER_NAME] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[USER_ID] [int] NOT NULL ,
[IND_EURO] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
CONSTRAINT [DF_QUERY_IND_EURO] DEFAULT ('N'),
[IND_DGCOLUMNS] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL CONSTRAINT [DF_QUERY_IND_DGCOLUMNS] DEFAULT ('N'),
[NO_GROUPS] [int] NOT NULL CONSTRAINT [DF_QUERY_NO_GROUPS] DEFAULT
(0),
[NO_FIELDS] [int] NOT NULL CONSTRAINT [DF_QUERY_NO_FIELDS] DEFAULT
(0),
[NO_LINES] [int] NOT NULL CONSTRAINT [DF_QUERY_NO_LINES] DEFAULT (0),
CONSTRAINT [PK_QUERY] PRIMARY KEY CLUSTERED
(
[QUERY_ID]
) WITH FILLFACTOR = 90 ON [PRIMARY] ,
CONSTRAINT [FK_QUERY_QUERY_CATEGORY] FOREIGN KEY
(
[CAT_ID]
) REFERENCES [QUERY_CATEGORY] (
[CAT_ID]
) ON DELETE CASCADE ON UPDATE CASCADE
) ON [PRIMARY]
GO
I don't think any re-indexing has been done on this (or the other
tables in the db). I was wondering if constant adding/deleting rows
could cause the index to be massive and in need of a good clear out.
Any pointers would be appreciated. From what I can tell, there was
some problems trying to get replication to work. I need to dig deeper
to see if this is now correct.
-------------------------
Secondly, there is a another table in the same database.
CREATE TABLE [FIELD_DATA] (
[ID] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,
[DATA_ID] [numeric](18, 0) NOT NULL ,
[FIELD_ID] [numeric](18, 0) NULL ,
[FIELD_CODE] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[FIELD_VALUE] [numeric](15, 5) NULL ,
CONSTRAINT [PK_FIELDDATA] PRIMARY KEY CLUSTERED
(
[ID]
) WITH FILLFACTOR = 90 ON [PRIMARY]
) ON [PRIMARY]
GO
It holds approx 4 million rows. The rest of the tables have minimal
data and about the same amount (consider them the same if you will).
Now, another 'copy' of this database is held elsewhere (different
client data) and this holds 40 million rows. The difference is that
the first DB is 4.5GB and the second 6.5GB (approx). Does this prove
my theory that re-indexing would be a good idea ?
Thanks
Ryan
View 3 Replies
ADVERTISEMENT
Feb 25, 2006
I have 2 aspx pages. one is "login.aspx" and the second is "test_connection.aspx". the "login.aspx" is using the membership class for my website's security. if u have have restarted your computer and you first load this "login.aspx", this will work fine and you will see that you can create a user. when you load (or view) next "test_connection.aspx" you will get this error message:
System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.
Login failed for user 'sqluser1'.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
If I will restart my computer and I will load first the "test_connection.aspx", this page will work just fine and if you will load next "login.aspx", i will get this error message:
Cannot open user default database. Login failed.
Login failed for user 'YECIAASPNET'.
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: Cannot open user default database. Login failed.
Login failed for user 'YECIAASPNET'.
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.
the page "test_connection.aspx" is using an sql username i have created. I am only using one database in this project and thats it ASPNET.mdf
what's happening? i cant understand. I dont know what im doing wrong. i am very new to this dotNET and MS-SQL. im not sure if this has relation to the other problem i have on the other thread (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=254568&SiteID=1).
PLS HELP.
View 4 Replies
View Related
Dec 24, 2007
i was working on a production server, and have stopped the sqlserver service along with the sql server agent. since i had to copy a MDF file . now i started the service again . but i find that there are no transactions happening ....what could be the reason.
View 8 Replies
View Related
Jan 12, 2008
Hi,
Im facing one problem When more than one user tries to insert record through the application only one users data is getting inserted. Wat might be the problem?
This is the stored proc im using..
create
proc [dbo].[GSK_insertregion] (@Country varchar(50),@Userid int,@RegionId varchar(50))
as
begin
insert
into UserHierarchy(Country,Userid,RegionId) values(@Country,@Userid,@RegionId)
end
Please help..
Sundaresan.R
View 4 Replies
View Related
May 23, 2008
Hi,
I set up my package for logging to SQL Server. I set up a connection manager for the logging, but did not specify a database. Doesn't that mean that the logging should default to msdb.sysdtslog90?
But when I check the table, there's nothing in it, after I run the package.
What gives?
View 1 Replies
View Related
Jan 13, 2004
Hi
I have deployed a website on a server having Windows2000, IIS5.0 . It uses SQL Server 2000 which is on another remote server. While developing I used the visual tools in VS.net to make a connection and have used DYnamic properties of the connection object to map the connection string to the entry in to the config file.
This works fine on my developement machine which has IIS and SQL Server 2000 on the same machine.
The entry in the web.config for my connection string is:
value= " server=xxx.yyy.com; Trusted_Connection=yes;provider=SQLOLEDB.1;Initial Catalog=events; User id=myuser; Password=password;"
where xxx.yyy.com is the server running SQL Server2000.
I do not get any error but the conncetion doesnot happen and my datagrid doesnot get filled.
The code for creating the connection is designer generated code.
Any clues?
-svp
View 20 Replies
View Related
Jul 11, 2000
I'm no guru but this one has me stumped!!
Each day there is a backup occurring of a database but nothing is scheduled either as a Job or under the database backup scheduling option.
Any suggestions greatly appreciated.
Thanks.
View 1 Replies
View Related
Sep 6, 2007
Hello people, I don't expect anyone to know the answer to this but I guess we'll see huh?
I'm using Microsoft SQL Server Management Studio to do all my SQL stuff, and one of the tools that comes with this is a program called Microsoft SQL Profiler 2005. Anyways, so I'm using this profiler to capture SQL processes in the background while I work with the front end.
Here is a problem I'm facing... I am looking at this table right... and I see that when I do this certain process on the front end, it inserts 3 rows into the table. So I'm thinking "I know that on the tracer, I should be looking for an insert or a Stored Procedure with and insert in it."
So I use the tracer on the front end process and it shows me all the stored procedures that happen during the process of inserting these 3 rows into this table (btw this process is doing other things besides inserting stuff into this table, but it's what i'm currently working with at the moment.)
So what I do here at my job is I take this code, tweak it to work for our front end, and wah lah.... we're good to go. So in saying that, I make my own stored procedure and I all these stored procedures that are happening.
My result......
I get only 2 row inserts into the table.... the 1st row and the last row..... the middle row isn't inserted for some mysterious reason. I tried checking all the stored procedures for unique information pertaining to that specific row insert but to no avail I couldn't.
So my question to you guys is.... is there anything I'm overlooking that could possibly be inserting that row in the table? Thanks guys!
View 2 Replies
View Related
Nov 2, 2006
hi there,
can the SSRS works with DB mirroring?
If yes, how to do it?
I just tried to enble mirroring for reportserver and reportservertempDB, but it doesnt work after failover.
Any idea ?
View 6 Replies
View Related
Jan 17, 2003
18275 :
Unnamed tape (Family ID: 0xcfb8a96c, sequence 1) dismounted from tape drive ‘master tape backup’.
this also happens for the mounted part also, how do I name a tape drive? or stop these warnings in the event logs?
thanks for your help
View 1 Replies
View Related
Feb 11, 2015
Even rowchecksum is different in target from source then also update is not happening
alter Procedure SP_Archive_using_merge
AS
BEGIN
SET NOCOUNT ON
Declare @Source_RowCount int
Declare @New_RowCount int
[Code] ....
View 1 Replies
View Related
Apr 12, 2008
declare @old varchar(30); set @old = 'old';
Command(s) completed successfully.
select @old;
Msg 137, Level 15, State 2, Line 1
Must declare the scalar variable "@old".
Why?!
View 4 Replies
View Related
Jul 30, 2001
Hello,
Has anyone experienced timeouts on SQL Server 2000 that happen at regular intervals?
Regards,
Brent.
View 2 Replies
View Related
Apr 21, 2004
Anyone else expirencing some heavy duty timeouts?
View 2 Replies
View Related
Apr 1, 2008
of query timeouts in SQL Server Management Studio?
I have increased the timeout setting in many places and still receive a timeout message within 40 seconds for certain update queries that involve large tables and many records. The only workaround is to break up the job into smaller queries but this makes management, unmanageable.
Is there a solid alternative to SQL Server Management Studio?
View 6 Replies
View Related
Jul 23, 2005
hi!I am having some timeout issues.I am running sql 2k with 3gig available ram.I did a 600,000 record delete on a table that gets written to by theactive/production application and my application timed out when it wasdoing the delete.why did stored procedures that ran fine before I started the largedelete slow down?Some of the procedures which slowed down were accessing the same tablewhere i was doing the delete.Thanking you in advance!!parez
View 1 Replies
View Related
Feb 9, 2007
"The log file for database is full. Back up the transaction log forthe database to free up some log space."Now I only know this way to deal with that manually,Step1. in option , chance Recovery model from FULL to Simple.Step2: go to task to manually shrink the log fileStep3: Change recovery model back from simple to FULL.But by this way, I could get same problem again, the log file is fill,and need free up.Could you give an idea how to prevent this from happening? what andhow should I do???Thanks a lot in advance for your help.
View 3 Replies
View Related
Apr 16, 2008
Hi,
Iam having 500 pages report,the report ia running for the file key ,I have reference some of the feilds to the reports header segment to display in every page,For every file key the report header feild also will change ,It is working for all file keys but the reference not occuring from body to report header when file key grouping changes to other grouping
Please let me know is there any possible way to do this one
View 1 Replies
View Related
Mar 29, 2007
I am getting Timeout Errors quite often and cannot figure out why. I am using Enterprise Library 2.0 when accessing the database. It is not from any particular function or page either and when I check the database there may only be 2 or 3 connection from my app. Any ideas of what could be causing this? Below is my error and stack.
Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Stack:
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 Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command) at HM.Security.SecurityData.GetAllUsers(Int32 filter) at HM.Admin.Security.SecuritySearch.SetUpAutoFill() in f:InetpubWwwroothomemiSectionsactSearch.aspx.cs:line 74 at HM.Admin.Security.SecuritySearch.Page_Load(Object sender, EventArgs e) in f:InetpubWwwroothomemiSectionsactSearch.aspx.cs:line 26 at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
View 1 Replies
View Related
Apr 27, 1999
Hello all,
I am managaing an NT infrastructure that supports a web application. The web server is configured to use an ODBC System DSN to access data on an SQL server over a 100MB private segment. When users run a particular query through the web page, they get an ODBC "Timeout Expired" message.
Does anyone know a fix for this. I could not find anything that explicitly identified this problem in MS Support. The query runs fine from an Eneteprise Manager T-SQL window both on the server and remotely.
Thanks in advance,
Ed Molinari
Technical Architect
Eamerald Solutions
View 2 Replies
View Related
Sep 5, 2001
A timeout issue is occurring resulting in following error.
This issue is sporadic and may be related to network.
This error occurs on the client: Microsoft OLE DB Provider for SQL Server error `80040e14`
OLE/DB provider returned message: Timeout expired
"conn_info".asp, line 444
View 1 Replies
View Related
Jul 23, 2005
Subject: SQL server job timeouts?We have a job that uses WinHTTP inside a stored procedure. We haveanother SP wrapper that runs this for a couple hundred records.When we add this as a job using SQLAgent it times out half way. Runningit from SQL Query analyser and it completes to the end.Anyway to set the timeouts for jobs?
View 5 Replies
View Related
Jul 20, 2005
I've had my SQL server database running for two years now without aproblem.However, just today one of the main tables started returning an error.The table is contained within a database called engineering. I backit up once a week and the file size is up to about 40 MB.The error returned when trying to return data from one table(DbLucent) is:"[Microsoft][ODBC SQL Server Driver]Timeout expired"I can open/query any of the other tables in the database. I can opendesign table for this table. But it won't return any query.I'm debating whether to restore the database from the last backup.Any suggestions would be appreciated. Being located reomotely, Irather not fly back to the city where the server is and work on itthere either.-David
View 6 Replies
View Related
Aug 14, 2015
I have configured an alert like below to track all blocked events in SQL Server across all databases and then kick start a sql job when a blocking happens which inserts data to a table, when there is a blocking in SQL server , i get an email  --which is working fine and i am able to track all queries.
but, HOW to get notifications ONLY if BLOCKING IS HAPPENING FOR MORE THAN 30 SECONDS OR 1 MINUTE with out using sp_configure?
---ALERT
USE [msdb]
GO
EXEC msdb.dbo.sp_update_alert @name=N'Blocking Process',Â
@message_id=0,Â
@severity=0,Â
@enabled=1,Â
[Code] .....
View 4 Replies
View Related
Oct 22, 2015
I have a SQL server 2014 environment. How to set up a mechanism which will throw a mail alert whenever we get a deadlock on the system.
View 2 Replies
View Related
Jul 14, 2006
hello all,
i am making a query which select the data again a particuler date.
I insert values in the table for with current date(Today's date) and the records is inserted with the date format(2006-07-14 16:12:09),now when i run the query after 2 or 3 minutes to select the records inserted today, my query returns no results.
I think it is because of the the time (14:16 in this case) that after 2 minutes, the query looks for the records inserted at (2006-07-14 18:12 or 2006-07-14 19:12) and does not get the result.
Is there a method to not consider the time(14:16) when running the query but the query fetches the records including the records inserted at this time(14:16) no matter at what time I run the query today?
Please anyone help me!
Thanks in advance!
View 4 Replies
View Related
Dec 16, 2003
I'm having major problems with SqlClient Data provider connections in my application. I'm using Win 2003 Server with SQL Server 2000 (both on the same machine), and my application is developed in VB.NET.
I'm using the following db connection string:
Data Source=(local);Initial Catalog=database;Uid=user;Pwd=password;max pool size=100;
As you can see max pool size is set to 100. The SQL Database has it's MAX_CONNECTIONS property set to >32000.
The symptoms are that at seemingly random times, not nessecarily during peak hours, the application becomes extremely slow and stops responding. The error message that is beeing generated is "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
After monitoring and debugging, I've found two things.
1) At random times, zero-three times a day, the number of database connections (according to performance monitor) rises from normally 2-8 up to 20-25. After a while, usually 10-60 minutes, it drops back to normal. This is directly related to when the timeout errors occur. It doesn't seem to happen more often during peak load, for some reason. I suspect there is connection leakage in the application, but I've done extensive debugging, and I just can't find any. Also, since the peaks occur randomly and I can't reproduce the error in my development environment, I have no solution to this problem. A few weeks ago, the application ran during heavy load without this problem for 7 days. Before and after that, there have been errors at least every second day. That confuses me even more.
2) The number of connections (monitored in perf mon) never reach above 25. Why? I'm using SQL Server enterprise edition, it's connection limit is over 32000. ADO pool size is 100, and I can't find anything else that would limit the amount of concurrent connections. I'm totally confused. Why does number of connections never rise above 25? Is there a setting hidden somewhere that I just can't find? Also, according to Performance Monitor, I don't get any failed connects, I just get failed commands. Maybe that's a clue? Could the problem some kind of deadlocks in the database that causes timeout?
I realize this entire post is rather confusing. It reflects the state of my mind, I guess, after working around the clock on this issue for a month :)
Any help is deeply appreciated!
View 2 Replies
View Related
Jun 24, 2004
I have a basic UPDATE that's something along the lines of:
UPDATE LocalTable SET LocalColumn = RemoteColumn
FROM LocalTable INNER JOIN server.catalog.dbo.RemoteTable ON (...)
After running in Query Analyzer for ten minutes, I get:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'SQLOLEDB' reported an error. Execution terminated by the provider because a resource limit was reached.
[OLE/DB provider returned message: Timeout expired]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ICommandText::Execute returned 0x80040e31: Execution terminated by the provider because a resource limit was reached.].
I checked the linked server settings in EnterpriseManager and both timeout settings are at 0 (no timeout). Any idea how I can remove whatever timeout is causing this?
Anyone know how remote join performance compares to moving remote data over via DTS, running an UPDATE, and dropping the data?
View 1 Replies
View Related
Feb 29, 2008
I'm having a problem with SQL Server 2005 not being able to send all of my messages. Occasionally when we batch a large number of messages together, we run into problems because the SMTP server can't process them fast enough, and the message doesn't send due to a timeout. I know I have increase the number of retries, but I'd rather just increase the timeout setting. Does anyone know where I might be able to do this at? The mail admins are also looking at modifying the rules in SMTP so that messages from these servers don't go through the vigor of SPAM and phishing detection. Hopefully that will speed it up, but I'd like to give it a little extra leniency on the SQL side as well. Any suggestions?
View 3 Replies
View Related
Jul 20, 2005
HiGot a strange problem.For some reason our web client box times out occasionally. Maybe afew times a day.Nothing appears in the logs.What I do know is that the disk queue ramps up to <high>(think top ofthe graph), processor queue jumps up and the tps drops to 0 (naturallyenough!) along with reduced pagefile usage. Usually at this time thetps is between 20 and 300. Running a pair of mirrored 18gb scsi disksfor the whole server (yeah yeah) and a whopping 640mb memory. Oh anda single piii 1 gig. Sql2k standard vanilla, server2k.What server trace events is it worth my catching to try and get abetter Idea of what may be causing this? No major jobs (backups etcseem to be occuring at these times).Cheers
View 1 Replies
View Related
Jul 20, 2005
Dear Group,I am tring to use a command that calls the server to fill an adapter, itnever seems to get to the adapter, command and the server either times outor does not respond. The timeout is set at 10 hours. I am using VisualStudio to acces MS SQL - Server.I think I have all the rights and permissions set correctly. Also, I haveused this command to fill other adapters and tables.Does anyone have a suggestion.Jeff Magouirk
View 1 Replies
View Related
Apr 29, 2008
im testing some database cleanup scripts that dont seem to be working. im calling stored procedures through a VBScript file to clean out a table in the database at night. there are a couple of tables to clean out (around 12 tables) and i have a sleep in between each call to the stored procedure.
the sqlcmd im using is in this format:
cmd /C osql -E -S computernameSQLEXPRESS -d database -Q ""{CALL SP_MY_PROC}" -l 20 -o debug.txt
so this is called a few times, once for each table, and sleeps for ~10 seconds before the next call to give some lead time.
the output i see is below
[SQL Native Client]SQL Network Interfaces: Error Locating
Server/Instance Specified [xFFFFFFFF].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a
connection to the server. When connecting to SQL Server 2005, this
failure may be caused by the fact that under the default settings SQL
Server does not allow remote connections.
now when i run these SPs manually in SSMSE, it executes fine with no problems. is there some timeout valuee im doing wrong? or am i using the wrong syntax for the osql?
View 3 Replies
View Related
Sep 6, 2006
Getting an issue with SQL Server 2005 in my production environment and
wanted to see if anyone else has seen similar behavior. First the
environment:
SQL Server 2005 on the backend, main site is running on ColdFusion 5
and there are various internal applications written in VB6 and .NET.
Upgraded to SQL Server 2005 about three weeks ago and since then about
once a week the server throws a fit and causes all sorts of timeouts.
Event Viewer is showing a bunch of same event:
Event ID: 8628
Description: A time out occurred while waiting to optimize the query.
Rerun the query.
The events occur a rate of about 10/minute and basically lock up the
server. Last time this happened I was not able to open a connection to
the SQL Server to even analyze the issue. All connections timed out...
Had to shutdown and restart the server to recover.
The first time this happened I saw a lot of waittypes
RESOURCE_SEMAPHORE_QUERY_COMPILE in the processes table and thought
that this might be related to the known bug with 2005 that has to do
with implicit conversions between Ascii and Unicode. This might be the
case since I know we have a lot of NVARCHAR columns and most searches
are using ASCII text so the result looks something like this:
SELECT cols FROM table WHERE nvarchar_column = 'Something'
There is a published article regarding this issue here:
http://support.microsoft.com/?kbid=919636
Any thoughts?
Thanks
View 8 Replies
View Related