Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 5 Million Record SQL Server DB - Timeout Problem

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-03-08 : 22:20:25
Zack writes "I have a 5 Million record SQL Server DB that keeps timing out on me.

This is my error message...
[Microsoft][ODBC SQL Server Driver]Timeout expired

This is my (ASP) connection string...
sDSN = "dsn=testdata;uid=sa;pwd=sa;"
Set objADO = Server.CreateObject("ADODB.Connection")
objADO.Open sDSN

From reading other timeout problems through past messages, I tried the
following also...
sDSN = "Provider=SQLOLEDB;dsn=testdata;uid=sa;pwd=sa;Timeout=999"
sDSN = "dsn=testdata;uid=sa;pwd=sa;Connect Timeout=360;"

Anyone have any clues on how to prevent this from happening?

This is a DMV record database. There isn't a unique field. The PLATENUMBER is the License Plate Number and it has the various people who have had each plate over the years, so there isn't a Primary Key. There are no stored procedures. I created an IX_testdata index on P_NUMBER, IX_testdata_1 index on OWNER, and IX_testdata_2 on MAKE.

Here is the table structure...
CREATE TABLE [dbo].[testdata] (
[CLASS] [nvarchar] (1) NULL ,
[PLATENUMBER] [nvarchar] (10) NULL ,
[OWNER] [nvarchar] (50) NULL ,
[ODOMETER] [nvarchar] (6) NULL ,
[MAKE] [nvarchar] (4) NULL ,
[YEAR] [nvarchar] (4) NULL ,
[MODEL] [nvarchar] (4) NULL ,
[BODYSTYLE] [nvarchar] (2) NULL ,
[STREET] [nvarchar] (30) NULL ,
[CITY] [nvarchar] (20) NULL ,
[STATE] [nvarchar] (2) NULL ,
[ZIP] [nvarchar] (5) NULL ,
[COUNTY] [nvarchar] (4) NULL ,
) ON [PRIMARY]
GO


Here is my SQL Query...
SELECT PlateNumber, Owner, Make, Model, [Year] FROM testdata WHERE PlateNumber LIKE '%MD%'

Thanks,
Zack"
   

- Advertisement -