I have a database with a lot of old records i want to delete.
when i try to make the delete, i get the timeout message.
I don't care that the delete job will run several hours, but for that i need
to configure a large timeout time for a specific database?
Somebody can advice me how to do that?
Thanks in advance,
BarakBarak
Try keep you transactions small, also you will not lock others during the
transaction.
SET ROWCOUNT 1000
WHILE 1 = 1
BEGIN
--Your DELETE statement
IF @.@.ROWCOUNT = 0
BEGIN
BREAK
END
ELSE
BEGIN
CHECKPOINT
END
END
SET ROWCOUNT 0
"Barak Turovsky" <baraktur@.mail.ru> wrote in message
news:#gDxj1t$DHA.2216@.TK2MSFTNGP10.phx.gbl...
> I have a database with a lot of old records i want to delete.
> when i try to make the delete, i get the timeout message.
> I don't care that the delete job will run several hours, but for that i
need
> to configure a large timeout time for a specific database?
> Somebody can advice me how to do that?
> Thanks in advance,
> Barak
>|||Barak Turovsky (baraktur@.mail.ru) writes:
> I have a database with a lot of old records i want to delete. when i try
> to make the delete, i get the timeout message. I don't care that the
> delete job will run several hours, but for that i need to configure a
> large timeout time for a specific database?
The timeout is a client-side thing, so this is nothing you set in your
database.
From where are you running your command? Many client libraries has a default
timeout of 30 seconds. Enterprise Manager has as well. Query Analyzer on
the other hand has no timeout by default.
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment