G
Guest
I developed a dotnet component it take data from Production Server ( 6 GB)
hence analyze the data after stores into Backup Database hence delete data
from Production server, in both connection opened with Read UnCommited. Iam
doing process for each day, open connection each day process once analyzed
stores data into respective servers then closes the connection.
When iam running this service for 1 month it completes with in 80 min
the same service running for 6 months then take to process for 1 month more
than 8 Hrs.
For intLoopCount = LBound(strArrInterchangeValues) To
UBound(strArrInterchangeValues)
If Not IsNothing(strArrInterchangeValues(intLoopCount)) Then
' Assign dta_outdoc_details Delete Query
strDeleteOutDocQuery = "delete from dta_outdoc_details
where nInDocKey in (select nInDocKey from dta_indoc_details where
nInterchangeKey in (" + strArrInterchangeValues(intLoopCount) + "))"
cmdProdCommand.CommandText = strDeleteOutDocQuery '
Assign dta_outdoc_details Delete Query string
cmdProdCommand.ExecuteNonQuery() ' Execute
dta_outdoc_details Delete Query
' Assign dta_indoc_details Delete Query
strDeleteInDocQuery = "delete from dta_indoc_details
where nInterchangeKey in (" + strArrInterchangeValues(intLoopCount) + ")"
cmdProdCommand.CommandText = strDeleteInDocQuery '
Assign dta_indoc_details Delete Query string
cmdProdCommand.ExecuteNonQuery() ' Execute
dta_indoc_details Delete Query
' Assign dta_interchange_details Delete Query
strDeleteInterchangeDataDetailsQuery = "delete from
dta_interchange_data where nInterchangeDataKey in (select nInterchangeDataKey
from dta_interchange_details where nInterchangeKey in (" +
strArrInterchangeValues(intLoopCount) + "))"
cmdProdCommand.CommandText =
strDeleteInterchangeDataDetailsQuery ' Assign dta_interchange_details Delete
Query string
cmdProdCommand.ExecuteNonQuery() ' Execute
dta_interchange_details Delete Query
' Assign dta_interchange_data Delete Query
strDeleteInterchangeDetailsQuery = "delete from
dta_interchange_details where nInterchangeKey in (" +
strArrInterchangeValues(intLoopCount) + ")"
cmdProdCommand.CommandText =
strDeleteInterchangeDetailsQuery ' Assign dta_interchange_data Delete Query
string
cmdProdCommand.ExecuteNonQuery() ' Execute
dta_interchange_data Delete Query
End If
Next
hence analyze the data after stores into Backup Database hence delete data
from Production server, in both connection opened with Read UnCommited. Iam
doing process for each day, open connection each day process once analyzed
stores data into respective servers then closes the connection.
When iam running this service for 1 month it completes with in 80 min
the same service running for 6 months then take to process for 1 month more
than 8 Hrs.
For intLoopCount = LBound(strArrInterchangeValues) To
UBound(strArrInterchangeValues)
If Not IsNothing(strArrInterchangeValues(intLoopCount)) Then
' Assign dta_outdoc_details Delete Query
strDeleteOutDocQuery = "delete from dta_outdoc_details
where nInDocKey in (select nInDocKey from dta_indoc_details where
nInterchangeKey in (" + strArrInterchangeValues(intLoopCount) + "))"
cmdProdCommand.CommandText = strDeleteOutDocQuery '
Assign dta_outdoc_details Delete Query string
cmdProdCommand.ExecuteNonQuery() ' Execute
dta_outdoc_details Delete Query
' Assign dta_indoc_details Delete Query
strDeleteInDocQuery = "delete from dta_indoc_details
where nInterchangeKey in (" + strArrInterchangeValues(intLoopCount) + ")"
cmdProdCommand.CommandText = strDeleteInDocQuery '
Assign dta_indoc_details Delete Query string
cmdProdCommand.ExecuteNonQuery() ' Execute
dta_indoc_details Delete Query
' Assign dta_interchange_details Delete Query
strDeleteInterchangeDataDetailsQuery = "delete from
dta_interchange_data where nInterchangeDataKey in (select nInterchangeDataKey
from dta_interchange_details where nInterchangeKey in (" +
strArrInterchangeValues(intLoopCount) + "))"
cmdProdCommand.CommandText =
strDeleteInterchangeDataDetailsQuery ' Assign dta_interchange_details Delete
Query string
cmdProdCommand.ExecuteNonQuery() ' Execute
dta_interchange_details Delete Query
' Assign dta_interchange_data Delete Query
strDeleteInterchangeDetailsQuery = "delete from
dta_interchange_details where nInterchangeKey in (" +
strArrInterchangeValues(intLoopCount) + ")"
cmdProdCommand.CommandText =
strDeleteInterchangeDetailsQuery ' Assign dta_interchange_data Delete Query
string
cmdProdCommand.ExecuteNonQuery() ' Execute
dta_interchange_data Delete Query
End If
Next