Showing posts with label delete. Show all posts
Showing posts with label delete. Show all posts

Tuesday, March 27, 2012

Considerations when delete records from table.

Hello, I'm developing application which monitors network packets. The monitoring data are saved into table. Monitoring table maintains the data for fixed quantum time,for example during one 1 hour. So, every minute before or after insert new data, I delete the time-expired data. I doubt that the endless delete operation would results in some problems(increasing index,etc..).

Is this mechanism safe to the dbms?

Aren't there round-robin(?) style table?

thats wat OLTP is for.... just keep the update statistics to auto (its default) , if ur using indexes.....also there may be fragmentation issues ...but thats a DBA activity/Db maintainance...

Monday, March 19, 2012

ConnectionCheckForData Error on Delete

Hi,
I'm trying to delete 1.5 million records from at table containing 121
million records using a delete with a simple subquery. After some time
processing the following error message is returned in Query Analyzer:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
(CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
The system is Windows 2000 Server (SP4) and SQL Server 2000 EE (SP3 -
8.00.818).
I did some checking on the net and saw where an install of SP3a fixed a
related error message however the KB states that because most of the issues
are related to setup that SP3a need not be installed if SP3 is currently
installed.
Has anyone encountered this problem and if so how did you resolve it?
Thanks
JerryFollow up:
Ran the delete statement directly from QA on the SQL Server to remove the
network connectivity as a possible issue. Received the following error:
Server: Msg 8646, Level 21, State 1, Line 1
The index entry for row ID was not found in index ID 2, of table 1403152044,
in database 'XXX'.
Connection Broken
Referenced to KB Article 822747 - possible corrupt nonclustered index.
Dropped the NC index and the deleted now succeeded. Now rebuilding the NC
index again.
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:eC3SJlWXFHA.3188@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I'm trying to delete 1.5 million records from at table containing 121
> million records using a delete with a simple subquery. After some time
> processing the following error message is returned in Query Analyzer:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
> (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broken
> The system is Windows 2000 Server (SP4) and SQL Server 2000 EE (SP3 -
> 8.00.818).
> I did some checking on the net and saw where an install of SP3a fixed a
> related error message however the KB states that because most of the
> issues are related to setup that SP3a need not be installed if SP3 is
> currently installed.
> Has anyone encountered this problem and if so how did you resolve it?
> Thanks
> Jerry
>

ConnectionCheckForData Error on Delete

Hi,
I'm trying to delete 1.5 million records from at table containing 121
million records using a delete with a simple subquery. After some time
processing the following error message is returned in Query Analyzer:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForD
ata
(CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
The system is Windows 2000 Server (SP4) and SQL Server 2000 EE (SP3 -
8.00.818).
I did some checking on the net and saw where an install of SP3a fixed a
related error message however the KB states that because most of the issues
are related to setup that SP3a need not be installed if SP3 is currently
installed.
Has anyone encountered this problem and if so how did you resolve it?
Thanks
JerryFollow up:
Ran the delete statement directly from QA on the SQL Server to remove the
network connectivity as a possible issue. Received the following error:
Server: Msg 8646, Level 21, State 1, Line 1
The index entry for row ID was not found in index ID 2, of table 1403152044,
in database 'XXX'.
Connection Broken
Referenced to KB Article 822747 - possible corrupt nonclustered index.
Dropped the NC index and the deleted now succeeded. Now rebuilding the NC
index again.
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:eC3SJlWXFHA.3188@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I'm trying to delete 1.5 million records from at table containing 121
> million records using a delete with a simple subquery. After some time
> processing the following error message is returned in Query Analyzer:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckFo
rData
> (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broken
> The system is Windows 2000 Server (SP4) and SQL Server 2000 EE (SP3 -
> 8.00.818).
> I did some checking on the net and saw where an install of SP3a fixed a
> related error message however the KB states that because most of the
> issues are related to setup that SP3a need not be installed if SP3 is
> currently installed.
> Has anyone encountered this problem and if so how did you resolve it?
> Thanks
> Jerry
>

ConnectionCheckForData Error on Delete

Hi,
I'm trying to delete 1.5 million records from at table containing 121
million records using a delete with a simple subquery. After some time
processing the following error message is returned in Query Analyzer:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
(CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
The system is Windows 2000 Server (SP4) and SQL Server 2000 EE (SP3 -
8.00.818).
I did some checking on the net and saw where an install of SP3a fixed a
related error message however the KB states that because most of the issues
are related to setup that SP3a need not be installed if SP3 is currently
installed.
Has anyone encountered this problem and if so how did you resolve it?
Thanks
Jerry
Follow up:
Ran the delete statement directly from QA on the SQL Server to remove the
network connectivity as a possible issue. Received the following error:
Server: Msg 8646, Level 21, State 1, Line 1
The index entry for row ID was not found in index ID 2, of table 1403152044,
in database 'XXX'.
Connection Broken
Referenced to KB Article 822747 - possible corrupt nonclustered index.
Dropped the NC index and the deleted now succeeded. Now rebuilding the NC
index again.
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:eC3SJlWXFHA.3188@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I'm trying to delete 1.5 million records from at table containing 121
> million records using a delete with a simple subquery. After some time
> processing the following error message is returned in Query Analyzer:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
> (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broken
> The system is Windows 2000 Server (SP4) and SQL Server 2000 EE (SP3 -
> 8.00.818).
> I did some checking on the net and saw where an install of SP3a fixed a
> related error message however the KB states that because most of the
> issues are related to setup that SP3a need not be installed if SP3 is
> currently installed.
> Has anyone encountered this problem and if so how did you resolve it?
> Thanks
> Jerry
>